1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7670,e=>{"use strict";function t(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(n&&(n+=" "),n+=t);return n}e.s(["clsx",0,t,"default",0,t])},78756,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isUnsafeProperty=function(e){return"__proto__"===e}},33858,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}},96736,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.toKey=function(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}},48018,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");let r=String(t);return"0"===r&&Object.is(Number(t),-0)?"-0":r}},79232,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(48018),i=e.r(96736);r.toPath=function(e){if(Array.isArray(e))return e.map(i.toKey);if("symbol"==typeof e)return[e];e=n.toString(e);let t=[],r=e.length;if(0===r)return t;let a=0,s="",o="",l=!1;for(46===e.charCodeAt(0)&&(t.push(""),a++);a<r;){let n=e[a];o?"\\"===n&&a+1<r?s+=e[++a]:n===o?o="":s+=n:l?'"'===n||"'"===n?o=n:"]"===n?(l=!1,t.push(s),s=""):s+=n:"["===n?(l=!0,s&&(t.push(s),s="")):"."===n?s&&(t.push(s),s=""):s+=n,a++}return s&&t.push(s),t}},18915,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(78756),i=e.r(33858),a=e.r(96736),s=e.r(79232);r.get=function e(t,r,o){if(null==t)return o;switch(typeof r){case"string":{if(n.isUnsafeProperty(r))return o;let a=t[r];if(void 0===a)if(i.isDeepKey(r))return e(t,s.toPath(r),o);else return o;return a}case"number":case"symbol":{"number"==typeof r&&(r=a.toKey(r));let e=t[r];if(void 0===e)return o;return e}default:{if(Array.isArray(r)){var l=t,u=r,c=o;if(0===u.length)return c;let e=l;for(let t=0;t<u.length;t++){if(null==e||n.isUnsafeProperty(u[t]))return c;e=e[u[t]]}return void 0===e?c:e}if(r=Object.is(r?.valueOf(),-0)?"-0":String(r),n.isUnsafeProperty(r))return o;let e=t[r];if(void 0===e)return o;return e}}}},92068,(e,t,r)=>{t.exports=e.r(18915).get},10185,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.uniqBy=function(e,t){let r=new Map;for(let n=0;n<e.length;n++){let i=e[n],a=t(i);r.has(a)||r.set(a,i)}return Array.from(r.values())}},36074,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.identity=function(e){return e}},52603,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isObjectLike=function(e){return"object"==typeof e&&null!==e}},44936,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(69642),i=e.r(52603);r.isArrayLikeObject=function(e){return i.isObjectLike(e)&&n.isArrayLike(e)}},77473,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(18915);r.property=function(e){return function(t){return n.get(t,e)}}},75234,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}},44695,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(90820),i=e.r(75234),a=e.r(23855);function s(e,t,r,u){if(t===e)return!0;switch(typeof t){case"object":return function(e,t,r,n){if(null==t)return!0;if(Array.isArray(t))return o(e,t,r,n);if(t instanceof Map){var a=e,s=t,u=r,c=n;
1if(0===s.size)return!0;if(!(a instanceof Map))return!1;for(let[e,t]of s.entries())if(!1===u(a.get(e),t,e,a,s,c))return!1;return!0}if(t instanceof Set)return l(e,t,r,n);let d=Object.keys(t);if(null==e||i.isPrimitive(e))return 0===d.length;if(0===d.length)return!0;if(n?.has(t))return n.get(t)===e;n?.set(t,e);try{for(let a=0;a<d.length;a++){let s=d[a];if(!i.isPrimitive(e)&&!(s in e)||void 0===t[s]&&void 0!==e[s]||null===t[s]&&null!==e[s]||!r(e[s],t[s],s,e,t,n))return!1}return!0}finally{n?.delete(t)}}(e,t,r,u);case"function":if(Object.keys(t).length>0)return s(e,{...t},r,u);return a.eq(e,t);default:if(!n.isObject(e))return a.eq(e,t);if("string"==typeof t)return""===t;return!0}}function o(e,t,r,n){if(0===t.length)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let s=t[a],o=!1;for(let l=0;l<e.length;l++){if(i.has(l))continue;let u=e[l],c=!1;if(r(u,s,a,e,t,n)&&(c=!0),c){i.add(l),o=!0;break}}if(!o)return!1}return!0}function l(e,t,r,n){return 0===t.size||e instanceof Set&&o([...e],[...t],r,n)}r.isMatchWith=function e(t,r,n){return"function"!=typeof n?e(t,r,()=>void 0):s(t,r,function e(t,r,i,a,o,l){let u=n(t,r,i,a,o,l);return void 0!==u?!!u:s(t,r,e,l)},new Map)},r.isSetMatch=l},3450,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(44695);r.isMatch=function(e,t){return n.isMatchWith(e,t,()=>void 0)}},45403,(e,t,r)=>{"use strict";function n(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:4*(e!=e)}Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.compareValues=(e,t,r)=>{if(e!==t){let i=n(e),a=n(t);if(i===a&&0===i){if(e<t)return"desc"===r?1:-1;if(e>t)return"desc"===r?-1:1}return"desc"===r?a-i:i-a}return 0}},9542,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}},38104,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(9542),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;r.isKey=function(e,t){return!Array.isArray(e)&&(!!("number"==typeof e||"boolean"==typeof e||null==e||n.isSymbol(e))||"string"==typeof e&&(a.test(e)||!i.test(e))||null!=t&&Object.hasOwn(t,e))}},910,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(45403),i=e.r(38104),a=e.r(79232);r.orderBy=function(e,t,r,s){if(null==e)return[];r=s?void 0:r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=null==t?[null]:[t]),0===t.length&&(t=[null]),Array.isArray(r)||(r=null==r?[]:[r]),r=r.map(e=>String(e));let o=(e,t)=>{let r=e;for(let e=0;e<t.length&&null!=r;++e)r=r[t[e]];return r},l=t.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||i.isKey(e))?e:{key:e,path:a.toPath(e)});return e.map(e=>({original:e,criteria:l.map(t=>{var r,n;return r=t,null==(n=e)||null==r?n:"object"==typeof r&&"key"in r?Object.hasOwn(n,r.key)?n[r.key]:o(n,r.path):"function"==typeof r?r(n):Array.isArray(r)?o(n,r):"object"==typeof n?n[r]:n})})).slice().sort((e,t)=>{for(let i=0;i<l.length;i++){let a=n.compareValues(e.criteria[i],t.criteria[i],r[i]);if(0!==a)return a}return 0}).map(e=>e.original)}},44647,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.flatten=function(e,t=1){let r=[],n=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let s=e[a];Array.isArray(s)&&t<n?i(s,t+1):r.push(s)}};return i(e,0),r}},5257,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=/^(?:0|[1-9]\d*)$/;r.isIndex=function(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return n.test(e)}}},70871,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}},69642,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(70871);r.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&n.isLength(e.length)}},90820,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},23855,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.eq=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}},15111,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(5257),i=e.r(69642),a=e.r(90820),s=e.r(23855);r.isIterateeCall=function(e,t,r){return!!a.isObject(r)&&(!!("number"==typeof t&&i.isArrayLike(r)&&n.isIndex(t))&&t<r.length||"string"==typeof t&&t in r)&&s.eq(r[t],e)}},69955,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(910),i=e.r(44647),a=e.r(15111);r.sortBy=function(e,...t){let r=t.length;return r>1&&a.isIterateeCall(e,t[0],t[1])?t=[]:r>2&&a.isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),n.orderBy(e,i.flatten(t),["asc"])}},42342,(e,t,r)=>{t.exports=e.r(69955).sortBy},24798,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.debounce=function(e,t,{signal:r,edges:n}={}){let i,a=null,s=null!=n&&n.includes("leading"),o=null==n||n.includes("trailing"),l=()=>{null!==a&&(e.apply(i,a),i=void 0,a=null)},u=null,c=()=>{null!=u&&clearTimeout(u),u=setTimeout(()=>{u=null,o&&l(),d()},t)},d=()=>{null!==u&&(clearTimeout(u),u=null),i=void 0,a=null},h=function(...e){if(r?.aborted)return;i=this,a=e;let t=null==u;c(),s&&t&&l()};return h.schedule=c,h.cancel=d,h.flush=()=>
1{l()},r?.addEventListener("abort",d,{once:!0}),h}},96074,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(24798);r.debounce=function(e,t=0,r={}){let i;"object"!=typeof r&&(r={});let{leading:a=!1,trailing:s=!0,maxWait:o}=r,l=[,,];a&&(l[0]="leading"),s&&(l[1]="trailing");let u=null,c=n.debounce(function(...t){i=e.apply(this,t),u=null},t,{edges:l}),d=function(...t){return null!=o&&(null===u&&(u=Date.now()),Date.now()-u>=o)?(i=e.apply(this,t),u=Date.now(),c.cancel(),c.schedule(),i):(c.apply(this,t),i)};return d.cancel=c.cancel,d.flush=()=>(c.flush(),i),d}},46508,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(96074);r.throttle=function(e,t=0,r={}){let{leading:i=!0,trailing:a=!0}=r;return n.debounce(e,t,{leading:i,maxWait:t,trailing:a})}},58723,(e,t,r)=>{t.exports=e.r(46508).throttle},9866,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}},23678,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}},55813,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.argumentsTag="[object Arguments]",r.arrayBufferTag="[object ArrayBuffer]",r.arrayTag="[object Array]",r.bigInt64ArrayTag="[object BigInt64Array]",r.bigUint64ArrayTag="[object BigUint64Array]",r.booleanTag="[object Boolean]",r.dataViewTag="[object DataView]",r.dateTag="[object Date]",r.errorTag="[object Error]",r.float32ArrayTag="[object Float32Array]",r.float64ArrayTag="[object Float64Array]",r.functionTag="[object Function]",r.int16ArrayTag="[object Int16Array]",r.int32ArrayTag="[object Int32Array]",r.int8ArrayTag="[object Int8Array]",r.mapTag="[object Map]",r.numberTag="[object Number]",r.objectTag="[object Object]",r.regexpTag="[object RegExp]",r.setTag="[object Set]",r.stringTag="[object String]",r.symbolTag="[object Symbol]",r.uint16ArrayTag="[object Uint16Array]",r.uint32ArrayTag="[object Uint32Array]",r.uint8ArrayTag="[object Uint8Array]",r.uint8ClampedArrayTag="[object Uint8ClampedArray]"},1645,(e,t,r)=>{"use strict";var n=e.i(67034);Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let i=e.r(38351),a=e.r(9866),s=e.r(23678),o=e.r(55813),l=e.r(23855);r.isEqualWith=function(e,t,r){return function e(t,r,u,c,d,h,f){let p=f(t,r,u,c,d,h);if(void 0!==p)return p;if(typeof t==typeof r)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===r;case"number":return t===r||Object.is(t,r)}return function t(r,u,c,d){if(Object.is(r,u))return!0;let h=s.getTag(r),f=s.getTag(u);if(h===o.argumentsTag&&(h=o.objectTag),f===o.argumentsTag&&(f=o.objectTag),h!==f)return!1;switch(h){case o.stringTag:return r.toString()===u.toString();case o.numberTag:{let e=r.valueOf(),t=u.valueOf();return l.eq(e,t)}case o.booleanTag:case o.dateTag:case o.symbolTag:return Object.is(r.valueOf(),u.valueOf());case o.regexpTag:return r.source===u.source&&r.flags===u.flags;case o.functionTag:return r===u}let p=(c=c??new Map).get(r),m=c.get(u);if(null!=p&&null!=m)return p===u;c.set(r,u),c.set(u,r);try{switch(h){case o.mapTag:if(r.size!==u.size)return!1;for(let[t,n]of r.entries())if(!u.has(t)||!e(n,u.get(t),t,r,u,c,d))return!1;return!0;case o.setTag:{if(r.size!==u.size)return!1;let t=Array.from(r.values()),n=Array.from(u.values());for(let i=0;i<t.length;i++){let a=t[i],s=n.findIndex(t=>e(a,t,void 0,r,u,c,d));if(-1===s)return!1;n.splice(s,1)}return!0}case o.arrayTag:case o.uint8ArrayTag:case o.uint8ClampedArrayTag:case o.uint16ArrayTag:case o.uint32ArrayTag:case o.bigUint64ArrayTag:case o.int8ArrayTag:case o.int16ArrayTag:case o.int32ArrayTag:case o.bigInt64ArrayTag:case o.float32ArrayTag:case o.float64ArrayTag:if(void 0!==n.Buffer&&n.Buffer.isBuffer(r)!==n.Buffer.isBuffer(u)||r.length!==u.length)return!1;for(let t=0;t<r.length;t++)if(!e(r[t],u[t],t,r,u,c,d))return!1;return!0;case o.arrayBufferTag:if(r.byteLength!==u.byteLength)return!1;return t(new Uint8Array(r),new Uint8Array(u),c,d);case o.dataViewTag:if(r.byteLength!==u.byteLength||r.byteOffset!==u.byteOffset)return!1;return t(new Uint8Array(r),new Uint8Array(u),c,d);case o.errorTag:return r.name===u.name&&r.message===u.message;
1case o.objectTag:{if(!(t(r.constructor,u.constructor,c,d)||i.isPlainObject(r)&&i.isPlainObject(u)))return!1;let n=[...Object.keys(r),...a.getSymbols(r)],s=[...Object.keys(u),...a.getSymbols(u)];if(n.length!==s.length)return!1;for(let t=0;t<n.length;t++){let i=n[t],a=r[i];if(!Object.hasOwn(u,i))return!1;let s=u[i];if(!e(a,s,i,r,u,c,d))return!1}return!0}default:return!1}}finally{c.delete(r),c.delete(u)}}(t,r,h,f)}(e,t,void 0,void 0,void 0,void 0,r)}},75752,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.noop=function(){}},95144,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(1645),i=e.r(75752);r.isEqual=function(e,t){return n.isEqualWith(e,t,i.noop)}},13287,(e,t,r)=>{t.exports=e.r(95144).isEqual},38351,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isPlainObject=function(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}},55424,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),r.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}},92348,(e,t,r)=>{"use strict";var n=e.i(67034);Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let i=e.r(9866),a=e.r(23678),s=e.r(55813),o=e.r(75234),l=e.r(55424);function u(e,t,r,i=new Map,d){let h=d?.(e,t,r,i);if(void 0!==h)return h;if(o.isPrimitive(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){let t=Array(e.length);i.set(e,t);for(let n=0;n<e.length;n++)t[n]=u(e[n],n,r,i,d);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;for(let[n,a]of(i.set(e,t),e))t.set(n,u(a,n,r,i,d));return t}if(e instanceof Set){let t=new Set;for(let n of(i.set(e,t),e))t.add(u(n,void 0,r,i,d));return t}if(void 0!==n.Buffer&&n.Buffer.isBuffer(e))return e.subarray();if(l.isTypedArray(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,t);for(let n=0;n<e.length;n++)t[n]=u(e[n],n,r,i,d);return t}if(e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,t),c(t,e,r,i,d),t}if("u">typeof File&&e instanceof File){let t=new File([e],e.name,{type:e.type});return i.set(e,t),c(t,e,r,i,d),t}if("u">typeof Blob&&e instanceof Blob){let t=new Blob([e],{type:e.type});return i.set(e,t),c(t,e,r,i,d),t}if(e instanceof Error){let t=new e.constructor;return i.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,c(t,e,r,i,d),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return i.set(e,t),c(t,e,r,i,d),t}if(e instanceof Number){let t=new Number(e.valueOf());return i.set(e,t),c(t,e,r,i,d),t}if(e instanceof String){let t=new String(e.valueOf());return i.set(e,t),c(t,e,r,i,d),t}if("object"==typeof e&&function(e){switch(a.getTag(e)){case s.argumentsTag:case s.arrayTag:case s.arrayBufferTag:case s.dataViewTag:case s.booleanTag:case s.dateTag:case s.float32ArrayTag:case s.float64ArrayTag:case s.int8ArrayTag:case s.int16ArrayTag:case s.int32ArrayTag:case s.mapTag:case s.numberTag:case s.objectTag:case s.regexpTag:case s.setTag:case s.stringTag:case s.symbolTag:case s.uint8ArrayTag:case s.uint8ClampedArrayTag:case s.uint16ArrayTag:case s.uint32ArrayTag:return!0;default:return!1}}(e)){let t=Object.create(Object.getPrototypeOf(e));return i.set(e,t),c(t,e,r,i,d),t}return e}function c(e,t,r=e,n,a){let s=[...Object.keys(t),...i.getSymbols(t)];for(let i=0;i<s.length;i++){let o=s[i],l=Object.getOwnPropertyDescriptor(e,o);(null==l||l.writable)&&(e[o]=u(t[o],o,r,n,a))}}r.cloneDeepWith=function(e,t){return u(e,void 0,e,new Map,t)},r.cloneDeepWithImpl=u,r.copyProperties=c},99510,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(92348);r.cloneDeep=function(e){return n.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}},67284,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(3450),i=e.r(99510);r.matches=function(e){return e=i.cloneDeep(e),t=>n.isMatch(t,e)}},68110,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(92348),i=e.r(55813);r.cloneDeepWith=function(e,t){return n.cloneDeepWith(e,(r,a,s,o)=>{let l=t?.(r,a,s,o);if(void 0!==l)return l;if("object"==typeof e)switch(Object.prototype.toString.call(e)){case i.numberTag:case i.stringTag:case i.booleanTag:{let t=new e.constructor(e?.valueOf());return n.copyProperties(t,e),t}case i.argumentsTag:{let t={};return n.copyProperties(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}})}},93141,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(68110);r.cloneDeep=function(e){return n.cloneDeepWith(e)}},17858,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(23678);r.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===n.getTag(e)}},56518,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(33858),i=e.r(5257),a=e.r(17858),s=e.r(79232);r.has=function(e,t){let r;if(0===(r=Array.isArray(t)?t:"string"==typeof t&&n.isDeepKey(t)&&e?.[t]==null?s.toPath(t):[t]).length)return!1;let o=e;for(let e=0;e<r.length;e++){let t=r[e];if((null==o||!Object.hasOwn(o,t))&&!((Array.isArray(o)||a.isArguments(o))&&i.isIndex(t)&&t<o.length))return!1;o=o[t]}return!0}},40656,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(3450),i=e.r(96736),a=e.r(93141),s=e.r(18915),o=e.r(56518);r.matchesProperty=function(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=i.toKey(e)}return t=a.cloneDeep(t),function(r){let i=s.get(r,e);return void 0===i?o.has(r,e):void 0===t?void 0===i:n.isMatch(i,t)}}},27519,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(36074),i=e.r(77473),a=e.r(67284),s=e.r(40656);r.iteratee=function(e){if(null==e)return n.identity;switch(typeof e){case"function":return e;case"object":if(Array.isArray(e)&&2===e.length)return s.matchesProperty(e[0],e[1]);return a.matches(e);case"string":case"symbol":case"number":return i.property(e)}}}
vendor: 4,145 bytes, line 1
1,77008,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(10185),i=e.r(36074),a=e.r(44936),s=e.r(27519);r.uniqBy=function(e,t=i.identity){return a.isArrayLikeObject(e)?n.uniqBy(Array.from(e),s.iteratee(t)):[]}},92809,(e,t,r)=>{t.exports=e.r(77008).uniqBy},78492,(e,t,r)=>{"use strict";var n=Object.prototype.hasOwnProperty,i="~";function a(){}function s(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,r,n,a){if("function"!=typeof r)throw TypeError("The listener must be a function");var o=new s(r,n||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function u(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},u.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=Array(a);n<a;n++)s[n]=r[n].fn;return s},u.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},u.prototype.emit=function(e,t,r,n,a,s){var o=i?i+e:e;if(!this._events[o])return!1;var l,u,c=this._events[o],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,n),!0;case 5:return c.fn.call(c.context,t,r,n,a),!0;case 6:return c.fn.call(c.context,t,r,n,a,s),!0}for(u=1,l=Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,n);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},u.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},u.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},u.prototype.removeListener=function(e,t,r,n){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||n&&!s.once||r&&s.context!==r||l(this,a);else{for(var o=0,u=[],c=s.length;o<c;o++)(s[o].fn!==t||n&&!s[o].once||r&&s[o].context!==r)&&u.push(s[o]);u.length?this._events[a]=1===u.length?u[0]:u:l(this,a)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new a,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,t.exports=u},67034,(e,t,r)=>{var n={872:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,a=l(e),s=a[0],o=a[1],u=new i((s+o)*3/4-o),c=0,d=o>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],s=0,o=n-i;s<o;s+=16383)a.push(function(e,t,n){for(var i,a=[],s=t;s<n;s+=3)i=(e[s]<<16&0xff0000)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(e,s,s+16383>o?o:s+16383));return 1===i?a.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&a.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",s=0,o=a.length;s<o;++s)r[s]=a[s],n[a.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},230:function(e,t,r){"use strict";var n=r(872),i=r(321),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!o.isEncoding(i))throw TypeError("Unknown encoding: "+i);var a=0|f(n,i),l=s(a),u=l.write(n,i);return u!==a&&(l=l.slice(0,u)),l}if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(P(e,ArrayBuffer)||e&&P(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(P(e,SharedArrayBuffer)||e&&P(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),o.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var c=e.valueOf&&e.valueOf();if(null!=c&&c!==e)return o.from(c,t,r);var p=function(e){if(o.isBuffer(e)){var t=0|h(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(p)return p;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),s(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!o.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return(u(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)};function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||P(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return A(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var i,a,s,o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=I[e[a]];return i}(this,t,r);case"utf8":case"utf-8":return y(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=this,a=t,s=r,0===a&&s===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(a,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}(this,t,r);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){var a;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(a=r*=1)!=a&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return v(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var a,s=1,o=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,o/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=r;a<o;
vendor: 12,407 bytes, line 1
1a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*s}else -1!==c&&(a-=a-c),c=-1}else for(r+l>o&&(r=o-l),a=r;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(u(e,a+h)!==u(t,h)){d=!1;break}if(d)return a}return -1}o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(P(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),P(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(P(a,Uint8Array)&&(a=o.from(a)),!o.isBuffer(a))throw TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},o.byteLength=f,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?y(this,0,e):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(o.prototype[a]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(P(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,s=r-t,l=Math.min(a,s),u=this.slice(n,i),c=e.slice(t,r),d=0;d<l;++d)if(u[d]!==c[d]){a=u[d],s=c[d];break}return a<s?-1:+(s<a)},o.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)};function y(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,s,o,l,u=e[i],c=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:(192&(a=e[i+1]))==128&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[i+1],s=e[i+2],(192&a)==128&&(192&s)==128&&(l=(15&u)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],(192&a)==128&&(192&s)==128&&(192&o)==128&&(l=(15&u)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}var h=n,f=h.length;if(f<=4096)return String.fromCharCode.apply(String,h);for(var p="",m=0;m<f;)p+=String.fromCharCode.apply(String,h.slice(m,m+=4096));return p}function x(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function b(e,t,r,n,i,a){if(!o.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function _(e,t,r,n,i,a){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,a){return t*=1,r>>>=0,a||_(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function w(e,t,r,n,a){return t*=1,r>>>=0,a||_(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,a,s,o,l,u,c,d,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;n>a/2&&(n=a/2);for(var s=0;s<n;++s){var o,l=parseInt(t.substr(2*s,2),16);if((o=l)!=o)break;e[r+s]=l}return s}(this,e,t,r);case"utf8":case"utf-8":return i=t,a=r,C(T(e,this.length-i),this,i,a);case"ascii":return s=t,o=r,C(E(e),this,s,o);case"latin1":case"binary":return function(e,t,r,n){return C(E(t),e,r,n)}(this,e,t,r);case"base64":return l=t,u=r,C(A(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,d=r,C(function(e,t){for(var r,n,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return(e>>>=0,t||x(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),i.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),i.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),i.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),i.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;b(this,e,t,r,i,0)}var a=1,s=0;for(this[t]=255&e;++s<r&&(a*=256);)this[t+s]=e/a&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;b(this,e,t,r,i,0)}var a=r-1,s=1;for(this[t+a]=255&e;--a>=0&&(s*=256);)this[t+a]=e/s&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);b(this,e,t,r,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a<r&&(s*=256);)e<0&&0===o&&0!==this[t+a-1]&&(o=1),this[t+a]=(e/s|0)-o&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);b(this,e,t,r,i-1,-i)}var a=r-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s|0)-o&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return w(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return w(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var a=i-1;a>=0;--a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=o.isBuffer(e)?e:o.from(e,n),l=s.length;
1if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%l]}return this};var M=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function E(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function A(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function C(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function P(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var I=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},321:function(e,t){t.read=function(e,t,r,n,i){var a,s,o=8*i-n-1,l=(1<<o)-1,u=l>>1,c=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,a=f&(1<<-c)-1,f>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=h,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=256*s+e[t+d],d+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),a-=u}return(f?-1:1)*s*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var s,o,l,u=8*a-i-1,c=(1<<u)-1,d=c>>1,h=5960464477539062e-23*(23===i),f=n?0:a-1,p=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(o=+!!isNaN(t),s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*l-1)*Math.pow(2,i),s+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+f]=255&o,f+=p,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;e[r+f]=255&s,f+=p,s/=256,u-=8);e[r+f-p]|=128*m}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},s=!0;try{n[e](r,r.exports,a),s=!1}finally{s&&delete i[e]}return r.exports}a.ab="/ROOT/node_modules/next/dist/compiled/buffer/",t.exports=a(230)},52210,(e,t,r)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,x=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case h:case s:case l:case o:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case g:case u:return e;default:return t}}case a:return t}}}function w(e){return S(e)===h}r.AsyncMode=d,r.ConcurrentMode=h,r.ContextConsumer=c,r.ContextProvider=u,r.Element=i,r.ForwardRef=f,r.Fragment=s,r.Lazy=v,r.Memo=g,r.Portal=a,r.Profiler=l,r.StrictMode=o,r.Suspense=p,r.isAsyncMode=function(e){return w(e)||S(e)===d},r.isConcurrentMode=w,r.isContextConsumer=function(e){return S(e)===c},r.isContextProvider=function(e){return S(e)===u},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},r.isForwardRef=function(e){return S(e)===f},r.isFragment=function(e){return S(e)===s},r.isLazy=function(e){return S(e)===v},r.isMemo=function(e){return S(e)===g},r.isPortal=function(e){return S(e)===a},r.isProfiler=function(e){return S(e)===l},r.isStrictMode=function(e){return S(e)===o},r.isSuspense=function(e){return S(e)===p},r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===h||e===l||e===o||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===x||e.$$typeof===b||e.$$typeof===_||e.$$typeof===y)},r.typeOf=S},79684,(e,t,r)=>{"use strict";e.i(47167),t.exports=e.r(52210)},41015,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(9542);r.toNumber=function(e){return n.isSymbol(e)?NaN:Number(e)}},89793,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(41015);r.toFinite=function(e){return e?(e=n.toNumber(e))===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e==e?e:0:0===e?e:0}},45264,(e,t,r)=>{"use strict";Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});let n=e.r(15111),i=e.r(89793);r.range=function(e,t,r){r&&"number"!=typeof r&&n.isIterateeCall(e,t,r)&&(t=r=void 0),e=i.toFinite(e),void 0===t?(t=e,e=0):t=i.toFinite(t),r=void 0===r?e<t?1:-1:i.toFinite(r);let a=Math.max(Math.ceil((t-e)/(r||1)),0),s=Array(a);for(let t=0;t<a;t++)s[t]=e,e+=r;return s}},66814,(e,t,r)=>{t.exports=e.r(45264).range},51655,(e,t,r)=>{!function(r){"use strict";
1var n,i={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},a=!0,s="[DecimalError] ",o=s+"Invalid argument: ",l=s+"Exponent out of range: ",u=Math.floor,c=Math.pow,d=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,h=u(1286742750677284.5),f={};function p(e,t){var r,n,i,s,o,l,u,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),a?M(t,h):t;if(u=e.d,c=t.d,o=e.e,i=t.e,u=u.slice(),s=o-i){for(s<0?(n=u,s=-s,l=c.length):(n=c,i=o,l=u.length),s>(l=(o=Math.ceil(h/7))>l?o+1:l+1)&&(s=l,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for((l=u.length)-(s=c.length)<0&&(s=l,n=c,c=u,u=n),r=0;s;)r=(u[--s]=u[s]+c[s]+r)/1e7|0,u[s]%=1e7;for(r&&(u.unshift(r),++i),l=u.length;0==u[--l];)u.pop();return t.d=u,t.e=i,a?M(t,h):t}function m(e,t,r){if(e!==~~e||e<t||e>r)throw Error(o+e)}function g(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(a+=_(r)),a+=n;(r=7-(n=(s=e[t])+"").length)&&(a+=_(r))}else if(0===s)return"0";for(;s%10==0;)s/=10;return a+s}f.absoluteValue=f.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},f.comparedTo=f.cmp=function(e){var t,r,n,i;if(e=new this.constructor(e),this.s!==e.s)return this.s||-e.s;if(this.e!==e.e)return this.e>e.e^this.s<0?1:-1;for(n=this.d.length,t=0,r=n<(i=e.d.length)?n:i;t<r;++t)if(this.d[t]!==e.d[t])return this.d[t]>e.d[t]^this.s<0?1:-1;return n===i?0:n>i^this.s<0?1:-1},f.decimalPlaces=f.dp=function(){var e=this.d.length-1,t=(e-this.e)*7;if(e=this.d[e])for(;e%10==0;e/=10)t--;return t<0?0:t},f.dividedBy=f.div=function(e){return v(this,new this.constructor(e))},f.dividedToIntegerBy=f.idiv=function(e){var t=this.constructor;return M(v(this,new t(e),0,1),t.precision)},f.equals=f.eq=function(e){return!this.cmp(e)},f.exponent=function(){return x(this)},f.greaterThan=f.gt=function(e){return this.cmp(e)>0},f.greaterThanOrEqualTo=f.gte=function(e){return this.cmp(e)>=0},f.isInteger=f.isint=function(){return this.e>this.d.length-2},f.isNegative=f.isneg=function(){return this.s<0},f.isPositive=f.ispos=function(){return this.s>0},f.isZero=function(){return 0===this.s},f.lessThan=f.lt=function(e){return 0>this.cmp(e)},f.lessThanOrEqualTo=f.lte=function(e){return 1>this.cmp(e)},f.logarithm=f.log=function(e){var t,r=this.constructor,i=r.precision,o=i+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(n))throw Error(s+"NaN");if(this.s<1)throw Error(s+(this.s?"NaN":"-Infinity"));return this.eq(n)?new r(0):(a=!1,t=v(S(this,o),S(e,o),o),a=!0,M(t,i))},f.minus=f.sub=function(e){return e=new this.constructor(e),this.s==e.s?T(this,e):p(this,(e.s=-e.s,e))},f.modulo=f.mod=function(e){var t,r=this.constructor,n=r.precision;if(!(e=new r(e)).s)throw Error(s+"NaN");return this.s?(a=!1,t=v(this,e,0,1).times(e),a=!0,this.minus(t)):M(new r(this),n)},f.naturalExponential=f.exp=function(){return y(this)},f.naturalLogarithm=f.ln=function(){return S(this)},f.negated=f.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},f.plus=f.add=function(e){return e=new this.constructor(e),this.s==e.s?p(this,e):T(this,(e.s=-e.s,e))},f.precision=f.sd=function(e){var t,r,n;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(o+e);if(t=x(this)+1,r=7*(n=this.d.length-1)+1,n=this.d[n]){for(;n%10==0;n/=10)r--;for(n=this.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},f.squareRoot=f.sqrt=function(){var e,t,r,n,i,o,l,c=this.constructor;if(this.s<1){if(!this.s)return new c(0);throw Error(s+"NaN")}for(e=x(this),a=!1,0==(i=Math.sqrt(+this))||i==1/0?(((t=g(this.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=u((e+1)/2)-(e<0||e%2),n=new c(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):n=new c(i.toString()),i=l=(r=c.precision)+3;;)if(n=(o=n).plus(v(this,o,l+2)).times(.5),g(o.d).slice(0,l)===(t=g(n.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&"4999"==t){if(M(o,r+1,0),o.times(o).eq(this)){n=o;break}}else if("9999"!=t)break;l+=4}return a=!0,M(n,r)},f.times=f.mul=function(e){var t,r,n,i,s,o,l,u,c,d=this.constructor,h=this.d,f=(e=new d(e)).d;if(!this.s||!e.s)return new d(0);for(e.s*=this.s,r=this.e+e.e,(u=h.length)<(c=f.length)&&(s=h,h=f,f=s,o=u,u=c,c=o),s=[],n=o=u+c;n--;)s.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;
1i>n;)l=s[i]+f[n]*h[i-n-1]+t,s[i--]=l%1e7|0,t=l/1e7|0;s[i]=(s[i]+t)%1e7|0}for(;!s[--o];)s.pop();return t?++r:s.shift(),e.d=s,e.e=r,a?M(e,d.precision):e},f.toDecimalPlaces=f.todp=function(e,t){var r=this,n=r.constructor;return(r=new n(r),void 0===e)?r:(m(e,0,1e9),void 0===t?t=n.rounding:m(t,0,8),M(r,e+x(r)+1,t))},f.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=E(n,!0):(m(e,0,1e9),void 0===t?t=i.rounding:m(t,0,8),r=E(n=M(new i(n),e+1,t),!0,e+1)),r},f.toFixed=function(e,t){var r,n,i=this.constructor;return void 0===e?E(this):(m(e,0,1e9),void 0===t?t=i.rounding:m(t,0,8),r=E((n=M(new i(this),e+x(this)+1,t)).abs(),!1,e+x(n)+1),this.isneg()&&!this.isZero()?"-"+r:r)},f.toInteger=f.toint=function(){var e=this.constructor;return M(new e(this),x(this)+1,e.rounding)},f.toNumber=function(){return+this},f.toPower=f.pow=function(e){var t,r,i,o,l,c,d=this,h=d.constructor,f=+(e=new h(e));if(!e.s)return new h(n);if(!(d=new h(d)).s){if(e.s<1)throw Error(s+"Infinity");return d}if(d.eq(n))return d;if(i=h.precision,e.eq(n))return M(d,i);if(c=(t=e.e)>=(r=e.d.length-1),l=d.s,c){if((r=f<0?-f:f)<=0x1fffffffffffff){for(o=new h(n),t=Math.ceil(i/7+4),a=!1;r%2&&A((o=o.times(d)).d,t),0!==(r=u(r/2));)A((d=d.times(d)).d,t);return a=!0,e.s<0?new h(n).div(o):M(o,i)}}else if(l<0)throw Error(s+"NaN");return l=l<0&&1&e.d[Math.max(t,r)]?-1:1,d.s=1,a=!1,o=e.times(S(d,i+12)),a=!0,(o=y(o)).s=l,o},f.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?(r=x(i),n=E(i,r<=a.toExpNeg||r>=a.toExpPos)):(m(e,1,1e9),void 0===t?t=a.rounding:m(t,0,8),r=x(i=M(new a(i),e,t)),n=E(i,e<=r||r<=a.toExpNeg,e)),n},f.toSignificantDigits=f.tosd=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(m(e,1,1e9),void 0===t?t=r.rounding:m(t,0,8)),M(new r(this),e,t)},f.toString=f.valueOf=f.val=f.toJSON=function(){var e=x(this),t=this.constructor;return E(this,e<=t.toExpNeg||e>=t.toExpPos)};var v=function(){function e(e,t){var r,n=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+n,e[i]=r%1e7|0,n=r/1e7|0;return n&&e.unshift(n),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r){for(var n=0;r--;)e[r]-=n,n=+(e[r]<t[r]),e[r]=1e7*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,a,o){var l,u,c,d,h,f,p,m,g,v,y,b,_,S,w,T,E,A,C=n.constructor,P=n.s==i.s?1:-1,I=n.d,O=i.d;if(!n.s)return new C(n);if(!i.s)throw Error(s+"Division by zero");for(u=n.e-i.e,E=O.length,w=I.length,m=(p=new C(P)).d=[],c=0;O[c]==(I[c]||0);)++c;if(O[c]>(I[c]||0)&&--u,(b=null==a?a=C.precision:o?a+(x(n)-x(i))+1:a)<0)return new C(0);if(b=b/7+2|0,c=0,1==E)for(d=0,O=O[0],b++;(c<w||d)&&b--;c++)_=1e7*d+(I[c]||0),m[c]=_/O|0,d=_%O|0;else{for((d=1e7/(O[0]+1)|0)>1&&(O=e(O,d),I=e(I,d),E=O.length,w=I.length),S=E,v=(g=I.slice(0,E)).length;v<E;)g[v++]=0;(A=O.slice()).unshift(0),T=O[0],O[1]>=1e7/2&&++T;do d=0,(l=t(O,g,E,v))<0?(y=g[0],E!=v&&(y=1e7*y+(g[1]||0)),(d=y/T|0)>1?(d>=1e7&&(d=1e7-1),f=(h=e(O,d)).length,v=g.length,1==(l=t(h,g,f,v))&&(d--,r(h,E<f?A:O,f))):(0==d&&(l=d=1),h=O.slice()),(f=h.length)<v&&h.unshift(0),r(g,h,v),-1==l&&(v=g.length,(l=t(O,g,E,v))<1&&(d++,r(g,E<v?A:O,v))),v=g.length):0===l&&(d++,g=[0]),m[c++]=d,l&&g[0]?g[v++]=I[S]||0:(g=[I[S]],v=1);while((S++<w||void 0!==g[0])&&b--)}return m[0]||m.shift(),p.e=u,M(p,o?a+x(p)+1:a)}}();function y(e,t){var r,i,s,o,u,d=0,h=0,f=e.constructor,p=f.precision;if(x(e)>16)throw Error(l+x(e));if(!e.s)return new f(n);for(null==t?(a=!1,u=p):u=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),h+=5;for(u+=Math.log(c(2,h))/Math.LN10*2+5|0,r=i=s=new f(n),f.precision=u;;){if(i=M(i.times(e),u),r=r.times(++d),g((o=s.plus(v(i,r,u))).d).slice(0,u)===g(s.d).slice(0,u)){for(;h--;)s=M(s.times(s),u);return f.precision=p,null==t?(a=!0,M(s,p)):s}s=o}}function x(e){for(var t=7*e.e,r=e.d[0];r>=10;r/=10)t++;return t}function b(e,t,r){if(t>e.LN10.sd())throw a=!0,r&&(e.precision=r),Error(s+"LN10 precision limit exceeded");return M(new e(e.LN10),t)}function _(e){for(var t="";e--;)t+="0";return t}function S(e,t){var r,i,o,l,u,c,d,h,f,p=1,m=e,y=m.d,_=m.constructor,w=_.precision;if(m.s<1)throw Error(s+(m.s?"NaN":"-Infinity"));if(m.eq(n))return new _(0);if(null==t?(a=!1,h=w):h=t,m.eq(10))return null==t&&(a=!0),b(_,h);if(_.precision=h+=10,i=(r=g(y)).charAt(0),!(15e14>Math.abs(l=x(m))))return d=b(_,h+2,w).times(l+""),m=S(new _(i+"."+r.slice(1)),h-10).plus(d),_.precision=w,null==t?(a=!0,M(m,w)):m;for(;i<7&&1!=i||1==i&&r.charAt(1)>3;)i=(r=g((m=m.times(e)).d)).charAt(0),p++;for(l=x(m),i>1?(m=new _("0."+r),l++):m=new _(i+"."+r.slice(1)),c=u=m=v(m.minu
1s(n),m.plus(n),h),f=M(m.times(m),h),o=3;;){if(u=M(u.times(f),h),g((d=c.plus(v(u,new _(o),h))).d).slice(0,h)===g(c.d).slice(0,h))return c=c.times(2),0!==l&&(c=c.plus(b(_,h+2,w).times(l+""))),c=v(c,new _(p),h),_.precision=w,null==t?(a=!0,M(c,w)):c;c=d,o+=2}}function w(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);)++n;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(n,i)){if(i-=n,e.e=u((r=r-n-1)/7),e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),a&&(e.e>h||e.e<-h))throw Error(l+r)}else e.s=0,e.e=0,e.d=[0];return e}function M(e,t,r){var n,i,s,o,d,f,p,m,g=e.d;for(o=1,s=g[0];s>=10;s/=10)o++;if((n=t-o)<0)n+=7,i=t,p=g[m=0];else{if((m=Math.ceil((n+1)/7))>=(s=g.length))return e;for(p=s=g[m],o=1;s>=10;s/=10)o++;n%=7,i=n-7+o}if(void 0!==r&&(d=p/(s=c(10,o-i-1))%10|0,f=t<0||void 0!==g[m+1]||p%s,f=r<4?(d||f)&&(0==r||r==(e.s<0?3:2)):d>5||5==d&&(4==r||f||6==r&&(n>0?i>0?p/c(10,o-i):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(s=x(e),g.length=1,t=t-s-1,g[0]=c(10,(7-t%7)%7),e.e=u(-t/7)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(0==n?(g.length=m,s=1,m--):(g.length=m+1,s=c(10,7-n),g[m]=i>0?(p/c(10,o-i)%c(10,i)|0)*s:0),f)for(;;)if(0==m){1e7==(g[0]+=s)&&(g[0]=1,++e.e);break}else{if(g[m]+=s,1e7!=g[m])break;g[m--]=0,s=1}for(n=g.length;0===g[--n];)g.pop();if(a&&(e.e>h||e.e<-h))throw Error(l+x(e));return e}function T(e,t){var r,n,i,s,o,l,u,c,d,h,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),a?M(t,p):t;if(u=e.d,h=t.d,n=t.e,c=e.e,u=u.slice(),o=c-n){for((d=o<0)?(r=u,o=-o,l=h.length):(r=h,n=c,l=u.length),o>(i=Math.max(Math.ceil(p/7),l)+2)&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for((d=(i=u.length)<(l=h.length))&&(l=i),i=0;i<l;i++)if(u[i]!=h[i]){d=u[i]<h[i];break}o=0}for(d&&(r=u,u=h,h=r,t.s=-t.s),l=u.length,i=h.length-l;i>0;--i)u[l++]=0;for(i=h.length;i>o;){if(u[--i]<h[i]){for(s=i;s&&0===u[--s];)u[s]=1e7-1;--u[s],u[i]+=1e7}u[i]-=h[i]}for(;0===u[--l];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(t.d=u,t.e=n,a?M(t,p):t):new f(0)}function E(e,t,r){var n,i=x(e),a=g(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+_(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+_(-i-1)+a,r&&(n=r-s)>0&&(a+=_(n))):i>=s?(a+=_(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+_(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=_(n))),e.s<0?"-"+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function C(e){if(!e||"object"!=typeof e)throw Error(s+"Object expected");var t,r,n,i=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(n=e[r=i[t]]))if(u(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(o+r+": "+n);if(void 0!==(n=e[r="LN10"]))if(n==Math.LN10)this[r]=new this(n);else throw Error(o+r+": "+n);return this}if((i=function e(t){var r,n,i;function a(e){if(!(this instanceof a))return new a(e);if(this.constructor=a,e instanceof a){this.s=e.s,this.e=e.e,this.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(o+e);if(e>0)this.s=1;else if(e<0)e=-e,this.s=-1;else{this.s=0,this.e=0,this.d=[0];return}if(e===~~e&&e<1e7){this.e=0,this.d=[e];return}return w(this,e.toString())}if("string"!=typeof e)throw Error(o+e);if(45===e.charCodeAt(0)?(e=e.slice(1),this.s=-1):this.s=1,d.test(e))w(this,e);else throw Error(o+e)}if(a.prototype=f,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e,a.config=a.set=C,void 0===t&&(t={}),t)for(r=0,i=["precision","rounding","toExpNeg","toExpPos","LN10"];r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return a.config(t),a}(i)).default=i.Decimal=i,n=new i(1),"function"==typeof define&&define.amd){let t;e.r,void 0!==(t=i)&&e.v(t)}else t.exports?t.exports=i:(r||(r="u">typeof self&&self&&self.self==self?self:Function("return this")()),r.Decimal=i)}(e.e)},237,1725,e=>{"use strict";e.s(["Area",()=>ew,"computeArea",()=>eS],237);var t=e.i(71645),r=e.i(7670),n=e.i(97865),i=e.i(69212),a=e.i(86031),s=e.i(94395),o=e.i(79812),l=e.i(81977),u=e.i(41818),c=e.i(844),d=e.i(59798),h=e.i(61849),f=e.i(61764),p=e.i(46710),m=e.i(92860),g=e.i(91526),v=e.i(77320),y=e.i(29194);function x(e,t){var r,n;return null!=(r=null==(n=e.graphicalItems.cartesianItems.find(e=>e.id===t))?void 0:n.xAxisId)?r:y.defaultAxisId}function b(e,t){var r,n;return null!=(r=null==(n=e.graphicalItems.cartesianItems.find(e=>e.id===t))?void 0:n.yAxisId)?r:y.defaultAxisId}var _=(e,t,r)=>(0,f.selectAxisWithScale)(e,"xAxis",x(e,t),r),S=(e,t,r)=>(0,f.selectTicksOfGraphicalItem)(e,"xAxis",x(e,t),r),w=(e,t,r)=>(0,f.selectAxisWithScale)(e,"yAxis",b(e,t),r),M=(e,t,r)=>(0,f.selectTicksOfGraphicalItem)(e,"yAxis",b(e,t),r),T=(0,h.createSelector)([p.selectChartLayout,_,w,S,M],(e,t,r,n,i)=>(0,o.isCategoricalAxis)(e,"xAxis")?(0,o.getBandSizeOfAxis)(t,n,!1):(0,o.getBandSizeOfAxis)(r,i,!1)),E=(0,h.createSelector)([f.selectUnfilteredCartesianItems,(e,t)=>t],(e,t)=>e.filter(e=>"area"===e.type).find(e=>e.id===t)),A=e=>{var t=(0,p.selectChartLayout)(e);return(0,o.isCategoricalAxis)(t,"xAxis")?"yAxis":"xAxis"},C=(e,t,r)=>(0,f.selectStackGroups)(e,A(e),"yAxis"===A(e)?b(e,t):x(e,t),r),P=(0,h.createSelector)([E,C],(e,t)=>{if(null!=e&&null!=t){var r,n=e.stackId,i=(0,g.getStackSeriesIdentifier)(e);if(null!=n&&null!=i){var a=null==(r=t[n])?void 0:r.stackedData,s=null==a?void 0:a.find(e=>e.key===i);if(null!=s)return s.map(e=>[e[0],e[1]])}}}),I=(0,h.createSelector)([E,C],(e,t)=>{if(null!=e&&null!=e.stackId&&null!=t){var r=t[e.stackId];if(null!=r)return r.graphicalItems.map(e=>e.dataKey).filter(s.isNotNil)}}
1),O=(0,h.createSelector)([p.selectChartLayout,_,w,S,M,P,m.selectChartDataWithIndexesIfNotInPanoramaPosition3,T,E,v.selectChartBaseValue,I],(e,t,r,n,i,a,s,o,l,u,c)=>{var d,h=s.chartData,f=s.dataStartIndex,p=s.dataEndIndex;if(null!=l&&("horizontal"===e||"vertical"===e)&&null!=t&&null!=r&&null!=n&&null!=i&&0!==n.length&&0!==i.length&&null!=o){var m=l.data;if(null!=(d=m&&m.length>0?m:null==h?void 0:h.slice(f,p+1)))return eS({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:f,areaSettings:l,stackedData:a,displayedData:d,chartBaseValue:u,bandSize:o,stackDataKeys:c})}}),R=e.i(75337),L=e.i(75502),N=e.i(95146),D=e.i(27241),k=e.i(30174),U=e.i(8436),F=e.i(63567),z=e.i(51883),j=e.i(52734),B=e.i(15549),V=e.i(91187),G=e.i(57999),H=e.i(81583),W=e.i(43404),X=e.i(18519),q=e.i(29601),Y=e.i(18457),$=e.i(20135),K=e.i(72733),Z=e.i(22075),J=e.i(8191),Q=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],ee=["id","baseLine"];function et(){return(et=Object.assign.bind()).apply(null,arguments)}function er(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function en(e){var r,n,i=e.alpha,a=e.baseLine,o=e.points,l=e.strokeWidth,u=null==(r=o[0])?void 0:r.x,c=null==(n=o[o.length-1])?void 0:n.x;if(!(0,Z.isWellBehavedNumber)(u)||!(0,Z.isWellBehavedNumber)(c))return null;var d=i*Math.abs(u-c),h=Math.max(...o.map(e=>e.y||0));return((0,s.isNumber)(a)?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(...a.map(e=>e.y||0),h)),(0,s.isNumber)(h))?t.createElement("rect",{x:u<c?u:u-d,y:0,width:d,height:Math.floor(h+(l?parseInt("".concat(l),10):1))}):null}function ei(e){var r,n,i=e.alpha,a=e.baseLine,o=e.points,l=e.strokeWidth,u=null==(r=o[0])?void 0:r.y,c=null==(n=o[o.length-1])?void 0:n.y;if(!(0,Z.isWellBehavedNumber)(u)||!(0,Z.isWellBehavedNumber)(c))return null;var d=i*Math.abs(u-c),h=Math.max(...o.map(e=>e.x||0));return((0,s.isNumber)(a)?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(...a.map(e=>e.x||0),h)),(0,s.isNumber)(h))?t.createElement("rect",{x:0,y:u<c?u:u-d,width:h+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}function ea(e){var r=e.alpha,n=e.layout,i=e.points,a=e.baseLine,s=e.strokeWidth;return"vertical"===n?t.createElement(ei,{alpha:r,points:i,baseLine:a,strokeWidth:s}):t.createElement(en,{alpha:r,points:i,baseLine:a,strokeWidth:s})}var es=["id"],eo=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function el(){return(el=Object.assign.bind()).apply(null,arguments)}function eu(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ed(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var eh={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:U.matchByIndex,animationInterpolateFn:(e,t)=>null==e?[]:1===t?e.flatMap(e=>"removed"===e.status?[]:[e.next]):e.flatMap(e=>"matched"===e.status?[ed(ed({},e.next),{},{x:(0,s.interpolate)(e.prev.x,e.next.x,t),y:(0,s.interpolate)(e.prev.y,e.next.y,t)})]:"added"===e.status?[e.next]:[]),connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:function(e){var r,i=e.animationElapsedTime,a=void 0===i?1:i,s=e.isAnimating,o=e.isEntrance,l=e.layout,u=e.isRange,c=e.stroke,d=e.connectNulls,h=er(e,Q),f="vertical"===l?"vertical":"horizontal",p=null!=d&&d,m=(0,J.useId)(),g=h.id,v=h.baseLine,y=er(h,ee),x=(0,G.svgPropertiesNoEvents)(y),b=t.createElement(K.Curve,et({},h,{id:g,baseLine:v,connectNulls:p,stroke:"none",className:"recharts-area-area",layout:f})),_="none"!==c&&t.createElement(K.Curve,et({},x,{className:"recharts-area-curve",layout:f,type:h.type,connectNulls:p,fill:"none",stroke:c,points:h.points})),S="none"!==c&&u&&Array.isArray(v)&&t.createElement(K.Curve,et({},x,{className:"recharts-area-curve",layout:f,type:h.type,connectNulls:p,fill:"none",stroke:c,points:v}));return void 0!==o&&o&&(void 0!==s&&s||a<1)?t.createElement(n.Layer,null,t.createElement("defs",null,t.createElement("clipPath",{id:m},t.createElement(ea,{alpha:a,points:null!=(r=h.points)?r:[],baseLine:v,layout:f,strokeWidth:h.strokeWidth}))),t.createElement(n.Layer,{clipPath:"url(#".concat(m,")")},b,_,S)):t.createElement(t.Fragment,null,b,_,S)},xAxisId:0,yAxisId:0,zIndex:Y.DefaultZIndexes.area};function ef(e,t){return e&&"none"!==e?e:t}var ep=t.memo(e=>{var r=e.dataKey,n=e.data,i=e.stroke,a=e.strokeWidth,l=e.fill,u=e.name,d=e.hide,h=e.unit,f=e.formatter,p=e.tooltipType,m=e.id,g={dataDefinedOnItem:n,getPosition:s.noop,settings:{stroke:i,strokeWidth:a,fill:l,dataKey:r,nameKey:void 0,name:(0,o.getTooltipNameProp)(u,r),hide:d,type:p,color:ef(i,l),unit:h,formatter:f,graphicalItemId:m}};return t.createElement(c.SetTooltipEntrySettings,{tooltipEntrySettings:g})});function em(e){var r=e.clipPathId,n=e.points,i=e.props,s=i.needClip,o=i.dot,l=i.dataKey,u=(0,G.svgPropertiesNoEvents)(i);return t.createElement(a.Dots,{points:n,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:u,needClip:s,clipPathId:r})}function eg(e){var r=e.showLabels,n=e.children,a=e.points.map(e=>{var t,r,n={x:null!=(t=e.x)?t:0,y:null!=(r=e.y)?r:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ed(ed({},n),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:n,fill:void 0})});return t.createElement(i.CartesianLabelListContextProvider,{value:r?a:void 0},n)}function ev(e){var r=e.points,i=e.baseLine,a=e.needClip,s=e.clipPathId,o=e.props,l=e.animationElapsedTime,u=e.isAnimating,c=e.isEntrance,d=o.layout,h=o.type,f=o.stroke,p=o.connectNulls,m=o.isRange,g=o.shape,v=o.id,y=eu(o,es),x=ed(ed({},(0,W.svgPropertiesAndEvents)(y)),{},{id:v,points:r,connectNulls:p,type:h,baseLine:i,layout:d,stroke:f,isRange:m,animationElapsedTime:l,isAnimating:u,isEntrance:c});return t.createElement(t.Fragment,null,(null==r?void 0:r.length)>1&&t.createElement(n.Layer,{clipPath:a?"url(#clipPath-".concat(s,")"):void 0},t.createElement(X.Shape,{option:g,DefaultShape:eh.shape,shapeProps:x})),t.createElement(em,{points:r,props:y,clipPathId:s}))}function ey(e){var r,n=e.needClip,a=e.clipPathId,o=e.props,l=e.previousPointsRef,u=e.previousBaselineRef,c=o.points,d=o.baseLine,h=o.isAnimationActive,f=o.animationBegin,m=o.animationDuration,g=o.animationEasing,v=o.animationMatchBy,y=o.animationInterpolateFn,x=(0,t.useMemo)(()=>({points:c,baseLine:d}),[c,d]),b=(0,F.useAnimationStartSnapshot)(x,u),_=(0,p.useCartesianChartLayout)(),S=(0,k.useAnimationCallbacks)(o.onAnimationStart,o.onAnimationEnd),w=S.isAnimating,M=S.handleAnimationStart,T=S.handleAnimationEnd,E=b.startValue;return null==_?null:(r=Array.isArray(d)&&Array.isArray(E)?(0,U.matchAnimationItems)(E,d,v):Array.isArray(d)?(0,U.matchAnimationItems)(null,d,v):null,t.createElement(k.AnimatedItems,{animationInput:x,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:l,isAnimationActive:h,animationBegin:f,animationDuration:m,animationEasing:g,onAnimationStart:M,onAnimationEnd:T,animationInterpolateFn:y,animationMatchBy:v,layout:_},(e,l,u)=>{var h;return h=1===l?d:Array.isArray(d)?y(r,l,_):u?d:function(e,t,r){if((0,s.isNumber)(e)){var n=(0,s.isNumber)(t)?t:void 0;return(0,s.interpolate)(n,e,r)}if((0,s.isNullish)(e)||(0,s.isNan)(e)){var i=(0,s.isNumber)(t)?t:void 0;return(0,s.interpolate)(i,0,r)}return e}(d,E,l),b.syncStepValue(h,l),t.createElement(eg,{showLabels:!w,points:c},o.children,t.createElement(ev,{points:e,baseLine:h,needClip:n,clipPathId:a,props:o,animationElapsedTime:l,isAnimating:w||l<1,isEntrance:u}),t.createElement(i.LabelListFromLabelProp,{label:o.label}))}))}function ex(e){var r=e.needClip,n=e.clipPathId,i=e.props,a=(0,t.useRef)(null),s=(0,t.useRef)();return t.createElement(ey,{needClip:r,clipPathId:n,props:i,previousPointsRef:a,previousBaselineRef:s})}class eb extends t.PureComponent{render(){var e=this.props,i=e.hide,a=e.dot,s=e.points,o=e.className,c=e.top,h=e.left,f=e.needClip,p=e.xAxisId,m=e.yAxisId,g=e.width,v=e.height,y=e.id,x=e.baseLine,b=e.zIndex;if(i)return null;var _=(0,r.clsx)("recharts-area",o),S=(0,H.getRadiusAndStrokeWidthFromDot)(a),w=S.r,M=S.strokeWidth,T=(0,l.isClipDot)(a),E=2*w+M,A=f?"url(#clipPath-".concat(T?"":"dots-").concat(y,")"):void 0;return t.createElement(q.ZIndexLayer,{zIndex:b},t.createElement(n.Layer,{className:_},f&&t.createElement("defs",null,t.createElement(d.GraphicalItemClipPath,{clipPathId:y,xAxisId:p,yAxisId:m}),!T&&t.createElement("clipPath",{id:"clipPath-dots-".concat(y)},t.createElement("rect",{x:h-E/2,y:c-E/2,width:g+E,height:v+E}))),t.createElement(ex,{needClip:f,clipPathId:y,props:this.props})),t.createElement(u.ActivePoints,{points:s,mainColor:ef(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:A}),this.props.isRange&&Array.isArray(x)&&t.createElement(u.ActivePoints,{points:x,mainColor:ef(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:A}))}}function e_(e){var r,n=e.activeDot,i=e.animationBegin,a=e.animationDuration,s=e.animationEasing,o=e.connectNulls,l=e.dot,u=e.fill,c=e.fillOpacity,h=e.hide,f=e.isAnimationActive,m=e.legendType,g=e.stroke,v=e.xAxisId,y=e.yAxisId,x=eu(e,eo),b=(0,p.useChartLayout)(),_=(0,L.useChartName)(),S=(0,d.useNeedsClip)(v,y).needClip,w=(0,R.useIsPanorama)(),M=null!=(r=(0,D.useAppSelector)(t=>O(t,e.id,w)))?r:{},T=M.points,E=M.isRange,A=M.baseLine,C=(0,j.usePlotArea)();if("horizontal"!==b&&"vertical"!==b||null==C||"AreaChart"!==_&&"ComposedCh
1art"!==_)return null;var P=C.height,I=C.width,N=C.x,k=C.y;return T&&T.length?t.createElement(eb,el({},x,{activeDot:n,animationBegin:i,animationDuration:a,animationEasing:s,baseLine:A,connectNulls:o,dot:l,fill:u,fillOpacity:c,height:P,hide:h,layout:b,isAnimationActive:f,isRange:E,legendType:m,needClip:S,points:T,stroke:g,width:I,left:N,top:k,xAxisId:v,yAxisId:y})):null}function eS(e){var t,r=e.areaSettings,n=r.connectNulls,i=r.baseValue,a=r.dataKey,l=e.stackedData,u=e.layout,c=e.chartBaseValue,d=e.xAxis,h=e.yAxis,f=e.displayedData,p=e.dataStartIndex,m=e.xAxisTicks,g=e.yAxisTicks,v=e.bandSize,y=e.stackDataKeys,x=l&&l.length,b=((e,t,r,n,i)=>{var a=null!=r?r:t;if((0,s.isNumber)(a))return a;var o="horizontal"===e?i:n,l=o.scale.domain();if("number"===o.type){var u=Math.max(l[0],l[1]),c=Math.min(l[0],l[1]);return"dataMin"===a?c:"dataMax"===a||u<0?u:Math.max(Math.min(l[0],l[1]),0)}return"dataMin"===a?l[0]:"dataMax"===a?l[1]:l[0]})(u,c,i,d,h),_="horizontal"===u,S=!1,w=f.map((e,t)=>{if(x)u=l[p+t];else{var r,i,s,u,c,f=(0,o.getValueByDataKey)(e,a);Array.isArray(f)?(u=f,S=!0):u=[b,f]}var w=null!=(r=null==(i=u)?void 0:i[1])?r:null,M=(0,o.getValueByDataKey)(e,a),T=x&&null==M&&null!=y&&y.length>0&&y.every(t=>null==(0,o.getValueByDataKey)(e,t)),E=null==w||x&&!n&&null==M||T;return _?{x:(0,o.getCateCoordinateOfLine)({axis:d,ticks:m,bandSize:v,entry:e,index:t}),y:E?null:null!=(c=h.scale.map(w))?c:null,value:u,payload:e}:{x:E?null:null!=(s=d.scale.map(w))?s:null,y:(0,o.getCateCoordinateOfLine)({axis:h,ticks:g,bandSize:v,entry:e,index:t}),value:u,payload:e}});return t=x||S?w.map(e=>{var t,r,n=Array.isArray(e.value)?e.value[0]:null;return _?{x:e.x,y:null!=n&&null!=e.y&&null!=(r=h.scale.map(n))?r:null,payload:e.payload}:{x:null!=n&&null!=(t=d.scale.map(n))?t:null,y:e.y,payload:e.payload}}):_?h.scale.map(b):d.scale.map(b),{points:w,baseLine:null!=t?t:0,isRange:S}}var ew=t.memo(function(e){var r=(0,z.resolveDefaultProps)(e,eh),n=(0,R.useIsPanorama)();return t.createElement(B.RegisterGraphicalItemId,{id:r.id,type:"area"},e=>{var i,a,s,l,u;return t.createElement(t.Fragment,null,t.createElement(N.SetLegendPayload,{legendPayload:(i=r.dataKey,a=r.name,s=r.stroke,l=r.fill,u=r.legendType,[{inactive:r.hide,dataKey:i,type:u,color:ef(s,l),value:(0,o.getTooltipNameProp)(a,i),payload:r}])}),t.createElement(ep,{dataKey:r.dataKey,data:r.data,stroke:r.stroke,strokeWidth:r.strokeWidth,fill:r.fill,name:r.name,hide:r.hide,unit:r.unit,formatter:r.formatter,tooltipType:r.tooltipType,id:e}),t.createElement(V.SetCartesianGraphicalItem,{type:"area",id:e,data:r.data,dataKey:r.dataKey,xAxisId:r.xAxisId,yAxisId:r.yAxisId,zAxisId:0,stackId:(0,o.getNormalizedStackId)(r.stackId),hide:r.hide,barSize:void 0,baseValue:r.baseValue,isPanorama:n,connectNulls:r.connectNulls}),t.createElement(e_,el({},r,{id:e})))})},$.propsAreEqual);ew.displayName="Area";var eM=e.i(25949),eT=e.i(33369),eE=["axis"],eA=(0,t.forwardRef)((e,r)=>t.createElement(eT.CartesianChart,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:eE,tooltipPayloadSearcher:eM.arrayTooltipSearcher,categoricalChartProps:e,ref:r}));e.s(["AreaChart",0,eA],1725)},72526,e=>{"use strict";var t=e.i(71645),r=e.i(29071),n=e.i(94395),i=e.i(79812),a=e.i(28108),s=e.i(9928),o=e.i(46710),l=e.i(61764),u=e.i(27241),c=e.i(75337),d=e.i(51883),h=e.i(57999),f=e.i(22075),p=e.i(29601),m=e.i(18457),g=(0,t.createContext)({grid:{stroke:"#ccc",fill:"none"}});g.Provider;var v=["x1","y1","x2","y2","key"],y=["offset"],x=["xAxisId","yAxisId"],b=["xAxisId","yAxisId"];function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function w(){return(w=Object.assign.bind()).apply(null,arguments)}function M(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var T=e=>{var r=e.fill;if(!r||"none"===r)return null;var n=e.fillOpacity,i=e.x,a=e.y,s=e.width,o=e.height,l=e.ry;return t.createElement("rect",{x:i,y:a,ry:l,width:s,height:o,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function E(e){var r=e.option,n=e.lineItemProps;if(t.isValidElement(r))i=t.cloneElement(r,n);else if("function"==typeof r)i=r(n);else{var i,a,s=n.x1,o=n.y1,l=n.x2,u=n.y2,c=n.key,d=M(n,v),f=null!=(a=(0,h.svgPropertiesNoEvents)(d))?a:{},p=(f.offset,M(f,y)),m=Array.isArray(p.strokeDasharray)?p.strokeDasharray.join(","):p.strokeDasharray;i=t.createElement("line",w({},p,{strokeDasharray:m,x1:s,y1:o,x2:l,y2:u,fill:"none",key:c}))}return i}function A(e){var r=e.x,n=e.width,i=e.horizontal,a=void 0===i||i,s=e.horizontalPoints;if(!a||!s||!s.length)return null;e.xAxisId,e.yAxisId;var o=M(e,x),l=s.map((e,i)=>{var s=S(S({},o),{},{x1:r,y1:e,x2:r+n,y2:e,key:"line-".concat(i),index:i});return t.createElement(E,{key:"line-".concat(i),option:a,lineItemProps:s})});return t.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function C(e){var r=e.y,n=e.height,i=e.vertical,a=void 0===i||i,s=e.verticalPoints;if(!a||!s||!s.length)return null;e.xAxisId,e.yAxisId;var o=M(e,b),l=s.map((e,i)=>{var s=S(S({},o),{},{x1:e,y1:r,x2:e,y2:r+n,key:"line-".concat(i),index:i});return t.createElement(E,{option:a,lineItemProps:s,key:"line-".concat(i)})});return t.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function P(e){var r=e.horizontalFill,n=e.fillOpacity,i=e.x,a=e.y,s=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal;if(!(void 0===u||u)||!r||!r.length||null==l)return null;var c=l.map(e=>Math.round(e+a-a)).sort((e,t)=>e-t);a!==c[0]&&c.unshift(0);var d=c.map((e,l)=>{var u=c[l+1],d=null==u?a+o-e:u-e;if(d<=0)return null;var h=l%r.length;return t.createElement("rect",{key:"react-".concat(l),y:e,x:i,height:d,width:s,stroke:"none",fill:r[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return t.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function I(e){var r=e.vertical,n=e.verticalFill,i=e.fillOpacity,a=e.x,s=e.y,o=e.width,l=e.height,u=e.verticalPoints;if(!(void 0===r||r)||!n||!n.length)return null;var c=u.map(e=>Math.round(e+a-a)).sort((e,t)=>e-t);a!==c[0]&&c.unshift(0);var d=c.map((e,r)=>{var u=c[r+1],d=null==u?a+o-e:u-e;if(d<=0)return null;var h=r%n.length;return t.createElement("rect",{key:"react-".concat(r),x:e,y:s,width:d,height:l,stroke:"none",fill:n[h],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return t.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var O=(e,t)=>{var r=e.xAxis,n=e.width,o=e.height,l=e.offset;return(0,i.getCoordinatesOfGrid)((0,a.getTicks)(S(S(S({},s.defaultCartesianAxisProps),r),{},{ticks:(0,i.getTicksOfAxis)(r,!0),viewBox:{x:0,y:0,width:n,height:o}})),l.left,l.left+l.width,t)},R=(e,t)=>{var r=e.yAxis,n=e.width,o=e.height,l=e.offset;return(0,i.getCoordinatesOfGrid)((0,a.getTicks)(S(S(S({},s.defaultCartesianAxisProps),r),{},{ticks:(0,i.getTicksOfAxis)(r,!0),viewBox:{x:0,y:0,width:n,height:o}})),l.top,l.top+l.height,t)},L={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:m.DefaultZIndexes.grid};function N(e){var i,a,s,h,m,v,y=(0,o.useChartWidth)(),x=(0,o.useChartHeight)(),b=(0,o.useOffsetInternal)(),_=S(S({},(0,d.resolveDefaultProps)(e,L)),{},{x:(0,n.isNumber)(e.x)?e.x:b.left,y:(0,n.isNumber)(e.y)?e.y:b.top,width:(0,n.isNumber)(e.width)?e.width:b.width,height:(0,n.isNumber)(e.height)?e.height:b.height}),M=_.xAxisId,E=_.yAxisId,N=_.x,D=_.y,k=_.width,U=_.height,F=_.syncWithTicks,z=_.horizontalValues,j=_.verticalValues,B=(0,c.useIsPanorama)(),V=(0,u.useAppSelector)(e=>(0,l.selectAxisPropsNeededForCartesianGridTicksGenerator)(e,"xAxis",M,B)),G=(0,u.useAppSelector)(e=>(0,l.selectAxisPropsNeededForCartesianGridTicksGenerator)(e,"yAxis",E,B)),H=(0,t.useContext)(g),W={stroke:null!=(i=_.stroke)?i:H.grid.stroke,strokeWidth:null!=(a=_.strokeWidth)?a:H.grid.strokeWidth,strokeOpacity:null!=(s=_.strokeOpacity)?s:H.grid.strokeOpacity,strokeDasharray:null!=(h=_.strokeDasharray)?h:H.grid.strokeDasharray};if(!(0,f.isPositiveNumber)(k)||!(0,f.isPositiveNumber)(U)||!(0,n.isNumber)(N)||!(0,n.isNumber)(D))return null;var X=_.verticalCoordinatesGenerator||O,q=_.horizontalCoordinatesGenerator||R,Y=_.horizontalPoints,$=_.verticalPoints;if((!Y||!Y.length)&&"function"==typeof q){var K=z&&z.length,Z=q({yAxis:G?S(S({},G),{},{ticks:K?z:G.ticks}):void 0,width:null!=y?y:k,height:null!=x?x:U,offset:b},!!K||F);(0,r.warn)(Array.isArray(Z),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof Z,"]")),Array.isArray(Z)&&(Y=Z)}if((!$||!$.length)&&"function"==typeof X){var J=j&&j.length,Q=X({xAxis:V?S(S({},V),{},{ticks:J?j:V.ticks}):void 0,width:null!=y?y:k,height:null!=x?x:U,offset:b},!!J||F);(0,r.warn)(Array.isArray(Q),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof Q,"]")),Array.isArray(Q)&&($=Q)}return t.createElement(p.ZIndexLayer,{zIndex:_.zIndex},t.createElement("g",{className:"recharts-cartesian-grid"},t.createElement(T,{fill:null!=(m=_.fill)?m:H.grid.fill,fillOpacity:null!=(v=_.fillOpacity)?v:H.grid.fillOpacity,x:_.x,y:_.y,width:_.width,height:_.height,ry:_.ry}),t.createElement(P,w({},_,{horizontalPoints:Y})),t.createElement(I,w({},_,{verticalPoints:$})),t.createElement(A,w({},_,W,{offset:b,horizontalPoints:Y,xAxis:V,yAxis:G})),t.createElement(C,w({},_,W,{offset:b,verticalPoints:$,xAxis:V,yAxis:G}))))}
1N.displayName="CartesianGrid",e.s(["CartesianGrid",0,N],72526)},55706,29228,e=>{"use strict";e.s(["Line",()=>eh,"computeLinePoints",()=>ed],55706);var t=e.i(71645),r=e.i(7670),n=e.i(97865),i=e.i(72733),a=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function s(){return(s=Object.assign.bind()).apply(null,arguments)}function o(e,t){return"".concat(t,"px ").concat(e,"px")}var l=e.i(36536),u=e.i(69212),c=e.i(86031),d=e.i(94395),h=e.i(81977),f=e.i(79812),p=e.i(41818),m=e.i(844),g=["children"],v=(0,t.createContext)({data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function y(e){var r=e.children,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,g);return t.createElement(v.Provider,{value:n},r)}var x=e.i(59798),b=e.i(46710),_=e.i(75337),S=e.i(61849),w=e.i(92860),M=e.i(61764),T=(e,t,r,n)=>(0,M.selectAxisWithScale)(e,"xAxis",t,n),E=(e,t,r,n)=>(0,M.selectTicksOfGraphicalItem)(e,"xAxis",t,n),A=(e,t,r,n)=>(0,M.selectAxisWithScale)(e,"yAxis",r,n),C=(e,t,r,n)=>(0,M.selectTicksOfGraphicalItem)(e,"yAxis",r,n),P=(0,S.createSelector)([b.selectChartLayout,T,A,E,C],(e,t,r,n,i)=>(0,f.isCategoricalAxis)(e,"xAxis")?(0,f.getBandSizeOfAxis)(t,n,!1):(0,f.getBandSizeOfAxis)(r,i,!1));function I(e){return"line"===e.type}var O=(0,S.createSelector)([M.selectUnfilteredCartesianItems,(e,t,r,n,i)=>i],(e,t)=>e.filter(I).find(e=>e.id===t)),R=(0,S.createSelector)([b.selectChartLayout,T,A,E,C,O,P,w.selectChartDataWithIndexesIfNotInPanoramaPosition4],(e,t,r,n,i,a,s,o)=>{var l,u=o.chartData,c=o.dataStartIndex,d=o.dataEndIndex;if(null!=a&&null!=t&&null!=r&&null!=n&&null!=i&&0!==n.length&&0!==i.length&&null!=s&&("horizontal"===e||"vertical"===e)){var h=a.dataKey,f=a.data;if(null!=(l=null!=f&&f.length>0?f:null==u?void 0:u.slice(c,d+1)))return ed({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:h,bandSize:s,displayedData:l})}}),L=e.i(27241),N=e.i(95146),D=e.i(30174),k=e.i(8436),U=e.i(51883),F=e.i(52734),z=e.i(15549),j=e.i(91187),B=e.i(57999),V=e.i(43404),G=e.i(81583),H=e.i(18519),W=e.i(29601),X=e.i(18457),q=e.i(20135),Y=["id"],$=["type","layout","connectNulls","needClip","shape","strokeDasharray"],K=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Z(){return(Z=Object.assign.bind()).apply(null,arguments)}function J(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var et={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:(e,t)=>{if(null==e)return[];if(1===t)return e.flatMap(e=>"removed"===e.status?[]:[e.next]);var r=function(e){var t=0,r=0;for(var n of e)"matched"===n.status&&null!=n.prev.x&&null!=n.next.x&&(t+=n.next.x-n.prev.x,r++);return r>0?t/r:0}(e),n=[];for(var i of e)if("matched"===i.status)n.push(ee(ee({},i.next),{},{x:(0,d.interpolate)(i.prev.x,i.next.x,t),y:(0,d.interpolate)(i.prev.y,i.next.y,t)}));else if("added"===i.status)if(null!=i.next.x){var a=i.next.x-r;n.push(ee(ee({},i.next),{},{x:(0,d.interpolate)(a,i.next.x,t),y:i.next.y}))}else n.push(i.next);else if("removed"===i.status&&null!=i.prev.x){var s=i.prev.x+r;n.push(ee(ee({},i.prev),{},{x:(0,d.interpolate)(i.prev.x,s,t),y:i.prev.y}))}return n},animationMatchBy:k.matchByIndex,connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendT
1ype:"line",shape:function(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var r=e.visibleLength,n=e.strokeDasharray,l=e.connectNulls,u=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,a);if(null!=r){var c,d,h=u.pathRef,f=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(null!=(d=null==h?void 0:h.current)?d:null);c=n?function(e,t,r){var n=r.length%2!=0?[...r,...r]:r,i=n.reduce((e,t)=>e+t,0);if(!i)return o(t,e);for(var a=Math.floor(e/i),s=e%i,l=[],u=0,c=0;u<n.length;c+=null!=(d=n[u])?d:0,++u){var d,h=n[u];if(null!=h&&c+h>s){l=[...n.slice(0,u),s-c];break}}var f=l.length%2==0?[0,t]:[t];return[...function(e,t){for(var r=[],n=0;n<t;++n)r.push(...e);return r}(n,a),...l,...f].map(e=>"".concat(e,"px")).join(", ")}(r,f,"".concat(n).split(/[,\s]+/gim).map(e=>parseFloat(e))):o(f,r)}else null!=n&&(c=String(n));return t.createElement(i.Curve,s({},u,{connectNulls:null!=l&&l,strokeDasharray:c}))},stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:X.DefaultZIndexes.line,type:"linear"},er=t.memo(e=>{var r=e.dataKey,n=e.data,i=e.stroke,a=e.strokeWidth,s=e.fill,o=e.name,l=e.hide,u=e.unit,c=e.formatter,h=e.tooltipType,p=e.id,g={dataDefinedOnItem:n,getPosition:d.noop,settings:{stroke:i,strokeWidth:a,fill:s,dataKey:r,nameKey:void 0,name:(0,f.getTooltipNameProp)(o,r),hide:l,type:h,color:i,unit:u,formatter:c,graphicalItemId:p}};return t.createElement(m.SetTooltipEntrySettings,{tooltipEntrySettings:g})});function en(e){var r=e.clipPathId,n=e.points,i=e.props,a=i.dot,s=i.dataKey,o=i.needClip;i.id;var l=J(i,Y),u=(0,B.svgPropertiesNoEvents)(l);return t.createElement(c.Dots,{points:n,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:s,baseProps:u,needClip:o,clipPathId:r})}function ei(e){var r=e.showLabels,n=e.children,i=e.points,a=(0,t.useMemo)(()=>null==i?void 0:i.map(e=>{var t,r,n={x:null!=(t=e.x)?t:0,y:null!=(r=e.y)?r:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ee(ee({},n),{},{value:e.value,payload:e.payload,viewBox:n,parentViewBox:void 0,fill:void 0})}),[i]);return t.createElement(u.CartesianLabelListContextProvider,{value:r?a:void 0},n)}function ea(e){var r=e.clipPathId,n=e.pathRef,i=e.points,a=e.props,s=e.animationElapsedTime,o=e.isAnimating,l=e.isEntrance,u=e.visibleLength,c=a.type,d=a.layout,h=a.connectNulls,f=a.needClip,p=a.shape,m=a.strokeDasharray,g=J(a,$),v=ee(ee({},(0,V.svgPropertiesAndEvents)(g)),{},{fill:"none",className:"recharts-line-curve",clipPath:f?"url(#clipPath-".concat(r,")"):void 0,points:i,type:c,layout:d,connectNulls:h,strokeDasharray:null!=m?m:a.strokeDasharray,pathRef:n,animationElapsedTime:s,isAnimating:o,isEntrance:!!a.animateNewValues&&l,visibleLength:u});return t.createElement(t.Fragment,null,(null==i?void 0:i.length)>1&&t.createElement(H.Shape,{option:p,DefaultShape:et.shape,shapeProps:v}),t.createElement(en,{points:i,clipPathId:r,props:a}))}function es(e){var r,n,i,a,s=e.clipPathId,o=e.props,c=e.pathRef,d=e.previousPointsRef,h=o.points,f=o.isAnimationActive,p=o.animationBegin,m=o.animationDuration,g=o.animationEasing,v=o.animationMatchBy,y=o.animationInterpolateFn,x=o.layout,b=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(c.current),_=(0,D.useAnimationCallbacks)(o.onAnimationStart,o.onAnimationEnd),S=_.isAnimating,w=_.handleAnimationStart,M=_.handleAnimationEnd,T=(r=(0,t.useRef)(0),n=(0,t.useRef)(0),i=(0,t.useRef)(!1),(a=(0,t.useRef)(h)).current!==h&&(r.current=n.current,a.current=h),(0,t.useCallback)((e,t)=>{if(i.current)return null;var a=Math.min((0,l.round)(r.current+e*t),t);return e>0&&t>0&&(n.current=Math.max(n.current,a),a>=t)?(i.current=!0,null):a},[])),E=(0,t.useCallback)(e=>e>0&&b>0,[b]);return t.createElement(ei,{points:h,showLabels:!S},o.children,t.createElement(D.AnimatedItems,{animationInput:h,animationIdPrefix:"recharts-line-",items:h,previousItemsRef:d,isAnimationActive:f,animationBegin:p,animationDuration:m,animationEasing:g,onAnimationStart:w,onAnimationEnd:M,animationInterpolateFn:y,animationMatchBy:v,shouldUpdatePreviousRef:E,layout:x},(e,r,n)=>{var i=S||r<1,a=i?T(r,b):null;return t.createElement(ea,{props:o,points:e,clipPathId:s,pathRef:c,animationElapsedTime:r,isAnimating:i,isEntrance:n,visibleLength:a})}),t.createElement(u.LabelListFromLabelProp,{label:o.label}))}function eo(e){var r=e.clipPathId,n=e.props,i=(0,t.useRef)(null),a=(0,t.useRef)(null);return t.createElement(es,{props:n,clipPathId:r,previousPointsRef:i,pathRef:a})}var el=(e,t)=>
1{var r,n;return{x:null!=(r=e.x)?r:void 0,y:null!=(n=e.y)?n:void 0,value:e.value,errorVal:(0,f.getValueByDataKey)(e.payload,t)}};class eu extends t.Component{render(){var e=this.props,i=e.hide,a=e.dot,s=e.points,o=e.className,l=e.xAxisId,u=e.yAxisId,c=e.top,d=e.left,f=e.width,m=e.height,g=e.id,v=e.needClip,b=e.zIndex;if(i)return null;var _=(0,r.clsx)("recharts-line",o),S=(0,G.getRadiusAndStrokeWidthFromDot)(a),w=S.r,M=S.strokeWidth,T=(0,h.isClipDot)(a),E=2*w+M,A=v?"url(#clipPath-".concat(T?"":"dots-").concat(g,")"):void 0;return t.createElement(W.ZIndexLayer,{zIndex:b},t.createElement(n.Layer,{className:_},v&&t.createElement("defs",null,t.createElement(x.GraphicalItemClipPath,{clipPathId:g,xAxisId:l,yAxisId:u}),!T&&t.createElement("clipPath",{id:"clipPath-dots-".concat(g)},t.createElement("rect",{x:d-E/2,y:c-E/2,width:f+E,height:m+E}))),t.createElement(y,{xAxisId:l,yAxisId:u,data:s,dataPointFormatter:el,errorBarOffset:0},t.createElement(eo,{props:this.props,clipPathId:g}))),t.createElement(p.ActivePoints,{activeDot:this.props.activeDot,points:s,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}function ec(e){var r=(0,U.resolveDefaultProps)(e,et),n=r.activeDot,i=r.animateNewValues,a=r.animationBegin,s=r.animationDuration,o=r.animationEasing,l=r.connectNulls,u=r.dot,c=r.hide,d=r.isAnimationActive,h=r.label,f=r.legendType,p=r.xAxisId,m=r.yAxisId,g=r.id,v=J(r,K),y=(0,x.useNeedsClip)(p,m).needClip,S=(0,F.usePlotArea)(),w=(0,b.useChartLayout)(),M=(0,_.useIsPanorama)(),T=(0,L.useAppSelector)(e=>R(e,p,m,M,g));if("horizontal"!==w&&"vertical"!==w||null==T||null==S)return null;var E=S.height,A=S.width,C=S.x,P=S.y;return t.createElement(eu,Z({},v,{id:g,connectNulls:l,dot:u,activeDot:n,animateNewValues:i,animationBegin:a,animationDuration:s,animationEasing:o,isAnimationActive:d,hide:c,label:h,legendType:f,xAxisId:p,yAxisId:m,points:T,layout:w,height:E,width:A,left:C,top:P,needClip:y}))}function ed(e){var t=e.layout,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.dataKey,o=e.bandSize;return e.displayedData.map((e,l)=>{var u=(0,f.getValueByDataKey)(e,s);if("horizontal"===t){var c=(0,f.getCateCoordinateOfLine)({axis:r,ticks:i,bandSize:o,entry:e,index:l}),h=(0,d.isNullish)(u)?null:n.scale.map(u);return{x:c,y:null!=h?h:null,value:u,payload:e}}var p=(0,d.isNullish)(u)?null:r.scale.map(u),m=(0,f.getCateCoordinateOfLine)({axis:n,ticks:a,bandSize:o,entry:e,index:l});return null==p||null==m?null:{x:p,y:m,value:u,payload:e}}).filter(Boolean)}var eh=t.memo(function(e){var r=(0,U.resolveDefaultProps)(e,et),n=(0,_.useIsPanorama)();return t.createElement(z.RegisterGraphicalItemId,{id:r.id,type:"line"},e=>{var i,a,s,o;return t.createElement(t.Fragment,null,t.createElement(N.SetLegendPayload,{legendPayload:(i=r.dataKey,a=r.name,s=r.stroke,o=r.legendType,[{inactive:r.hide,dataKey:i,type:o,color:s,value:(0,f.getTooltipNameProp)(a,i),payload:r}])}),t.createElement(er,{dataKey:r.dataKey,data:r.data,stroke:r.stroke,strokeWidth:r.strokeWidth,fill:r.fill,name:r.name,hide:r.hide,unit:r.unit,formatter:r.formatter,tooltipType:r.tooltipType,id:e}),t.createElement(j.SetCartesianGraphicalItem,{type:"line",id:e,data:r.data,xAxisId:r.xAxisId,yAxisId:r.yAxisId,zAxisId:0,dataKey:r.dataKey,hide:r.hide,isPanorama:n}),t.createElement(ec,Z({},r,{id:e})))})},q.propsAreEqual);eh.displayName="Line";var ef=e.i(25949),ep=e.i(33369),em=["axis"],eg=(0,t.forwardRef)((e,r)=>t.createElement(ep.CartesianChart,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:em,tooltipPayloadSearcher:ef.arrayTooltipSearcher,categoricalChartProps:e,ref:r}));e.s(["LineChart",0,eg],29228)},97865,57999,43404,36536,94395,51883,22075,27241,61849,79812,75337,29071,31195,46710,18457,29601,494,69212,81977,86031,92860,77320,91526,61764,29194,52734,41818,844,59798,75502,95146,8436,63567,30174,8191,15549,91187,81583,18519,20135,72733,25949,31725,89763,33369,44171,28108,9928,29905,34239,85183,93230,e=>{"use strict";var t,r,n,i,a,s,o,l,u,c,d,h,f,p,m,g,v,y,x,b,_,S,w,M,T,E,A,C,P,I,O,R=e.i(71645),L=e.i(7670),N=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
1ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function D(e){return"string"==typeof e&&N.includes(e)}var k=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","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","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","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","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function U(e){return"string"==typeof e&&k.has(e)}function F(e){return"string"==typeof e&&e.startsWith("data-")}function z(e){if("object"!=typeof e||null===e)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(U(r)||F(r))&&(t[r]=e[r]);return t}function j(e){return null==e?null:(0,R.isValidElement)(e)&&"object"==typeof e.props&&null!==e.props?z(e.props):"object"!=typeof e||Array.isArray(e)?null:z(e)}function B(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(U(r)||F(r)||D(r))&&(t[r]=e[r]);return t}function V(e){return null==e?null:(0,R.isValidElement)(e)?B(e.props):"object"!=typeof e||Array.isArray(e)?null:B(e)}e.s(["isDataAttribute",0,F,"isSvgElementPropKey",0,U,"svgPropertiesNoEvents",0,z,"svgPropertiesNoEventsFromUnknown",0,j],57999),e.s(["svgPropertiesAndEvents",0,B,"svgPropertiesAndEventsFromUnknown",0,V],43404);var G=["children","className"];function H(){return(H=Object.assign.bind()).apply(null,arguments)}var W=R.forwardRef((e,t)=>
1{var r=e.children,n=e.className,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,G),a=(0,L.clsx)("recharts-layer",n);return R.createElement("g",H({className:a},B(i),{ref:t}),r)});e.s(["Layer",0,W],97865);var X=e.i(92068);function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Y(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((e,t,n)=>{var i=r[n-1];return"string"==typeof i?e+i+t:void 0!==i?e+q(i)+t:e+t},"")}e.s(["round",0,q,"roundTemplateLiteral",0,Y],36536);var $=e=>0===e?0:e>0?1:-1,K=e=>"number"==typeof e&&e!=+e,Z=e=>"string"==typeof e&&e.length>1&&e.indexOf("%")===e.length-1,J=e=>("number"==typeof e||e instanceof Number)&&!K(e),Q=e=>J(e)||"string"==typeof e,ee=0,et=e=>{var t=++ee;return"".concat(e||"").concat(t)},er=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!J(e)&&"string"!=typeof e)return n;if(Z(e)){if(null==t)return n;var a=e.indexOf("%");r=t*parseFloat(e.slice(0,a))/100}else r=+e;return K(r)&&(r=n),i&&null!=t&&r>t&&(r=t),r},en=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(r[String(e[n])])return!0;else r[String(e[n])]=!0;return!1};function ei(e,t,r){return J(e)&&J(t)?q(e+r*(t-e)):t}function ea(e,t,r){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):(0,X.default)(e,t))===r)}var es=e=>null==e,eo=e=>es(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function el(e){return null!=e}function eu(){}e.s(["findEntryInArray",0,ea,"getPercentValue",0,er,"hasDuplicate",0,en,"interpolate",0,ei,"isNan",0,K,"isNotNil",0,el,"isNullish",0,es,"isNumOrStr",0,Q,"isNumber",0,J,"isPercent",0,Z,"mathSign",0,$,"noop",0,eu,"uniqueId",0,et,"upperFirst",0,eo],94395);var ec={devToolsEnabled:!0,isSsr:!("u">typeof window&&window.document&&window.document.createElement&&window.setTimeout)};function ed(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var eh=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ed(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),ef=new class{constructor(e){!function(e,t,r){var n;(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(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){var r=this.cache.keys().next().value;null!=r&&this.cache.delete(r)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(eh.cacheSize),ep={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},em="recharts_measurement_span",eg=(e,t)=>{try{var r=document.getElementById(em);r||((r=document.createElement("span")).setAttribute("id",em),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,ep,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch(e){return{width:0,height:0}}},ev=function(e){var t,r,n,i,a,s,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||ec.isSsr)return{width:0,height:0};if(!eh.enableCache)return eg(e,o);var l=(t=o.fontSize||"",r=o.fontFamily||"",n=o.fontWeight||"",i=o.fontStyle||"",a=o.letterSpacing||"",s=o.textTransform||"","".concat(e,"|").concat(t,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(s)),u=ef.get(l);if(u)return u;var c=eg(e,o);return ef.set(l,c),c};function ey(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}
1finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ex(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ex(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ex(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,e_=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,eS=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,ew=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,eM={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},eT=["cm","mm","pt","pc","in","Q","px"];class eE{static parse(e){var t,r=ey(null!=(t=ew.exec(e))?t:[],3),n=r[1],i=r[2];return null==n?eE.NaN:new eE(parseFloat(n),null!=i?i:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,K(e)&&(this.unit=""),""===t||eS.test(t)||(this.num=NaN,this.unit=""),function(e){return eT.includes(e)}(t)&&(this.num=function(e,t){return e*eM[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new eE(NaN,""):new eE(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new eE(NaN,""):new eE(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new eE(NaN,""):new eE(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new eE(NaN,""):new eE(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return K(this.num)}}function eA(e){if(null==e||e.includes("NaN"))return"NaN";for(var t=e;t.includes("*")||t.includes("/");){var r,n=ey(null!=(r=eb.exec(t))?r:[],4),i=n[1],a=n[2],s=n[3],o=eE.parse(null!=i?i:""),l=eE.parse(null!=s?s:""),u="*"===a?o.multiply(l):o.divide(l);if(u.isNaN())return"NaN";t=t.replace(eb,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,d=ey(null!=(c=e_.exec(t))?c:[],4),h=d[1],f=d[2],p=d[3],m=eE.parse(null!=h?h:""),g=eE.parse(null!=p?p:""),v="+"===f?m.add(g):m.subtract(g);if(v.isNaN())return"NaN";t=t.replace(e_,v.toString())}return t}r="NaN",n=new eE(NaN,""),(r="symbol"==typeof(t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"))?t:t+"")in eE?Object.defineProperty(eE,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):eE[r]=n;var eC=/\(([^()]*)\)/;function eP(e){var t=function(e){try{var t;return t=e.replace(/\s+/g,""),t=function(e){for(var t,r=e;null!=(t=eC.exec(r));){var n=ey(t,2)[1];r=r.replace(eC,eA(n))}return r}(t),t=eA(t)}catch(e){return"NaN"}}(e.slice(5,-1));return"NaN"===t?"":t}function eI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eO(e,t){var r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eI(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eI(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e);return Object.keys(t).reduce((e,r)=>(void 0===e[r]&&void 0!==t[r]&&(e[r]=t[r]),e),r)}function eR(e){return Number.isFinite(e)}function eL(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}e.s(["resolveDefaultProps",0,eO],51883),e.s(["isPositiveNumber",0,eL,"isWellBehavedNumber",0,eR],22075);var eN=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],eD=["dx","dy","angle","className","breakAll"];function ek(){return(ek=Object.assign.bind()).apply(null,arguments)}function eU(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function eF(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}
1finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ez(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ez(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ez(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ej=/[ \f\n\r\t\v\u2028\u2029]+/,eB=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];es(t)||(i=r?t.toString().split(""):t.toString().split(ej));var a=i.map(e=>({word:e,width:ev(e,n).width})),s=r?0:ev(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch(e){return null}};function eV(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var eG=(e,t,r,n)=>e.reduce((e,i)=>{var a=i.word,s=i.width,o=e[e.length-1];return o&&null!=s&&(null==t||n||o.width+s+r<Number(t))?(o.words.push(a),o.width+=s+r):e.push({words:[a],width:s}),e},[]),eH=e=>e.reduce((e,t)=>e.width>t.width?e:t),eW=(e,t,r,n,i,a,s,o)=>{var l=eB({breakAll:r,style:n,children:e.slice(0,t)+"â¦"});if(!l)return[!1,[]];var u=eG(l.wordsWithComputedWidth,a,s,o);return[u.length>i||eH(u).width>Number(a),u]},eX=e=>[{words:es(e)?[]:e.toString().split(ej),width:void 0}],eq="#808080",eY={angle:0,breakAll:!1,capHeight:"0.71em",fill:eq,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},e$=(0,R.forwardRef)((e,t)=>{var r,n=eO(e,eY),i=n.x,a=n.y,s=n.lineHeight,o=n.capHeight,l=n.fill,u=n.scaleToFit,c=n.textAnchor,d=n.verticalAnchor,h=eU(n,eN),f=(0,R.useMemo)(()=>(e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,a=e.breakAll,s=e.maxLines;if((t||r)&&!ec.isSsr){var o=eB({breakAll:a,children:n,style:i});if(!o)return eX(n);var l=o.wordsWithComputedWidth,u=o.spaceWidth;return((e,t,r,n,i)=>{var a,s=e.maxLines,o=e.children,l=e.style,u=e.breakAll,c=J(s),d=String(o),h=eG(t,n,r,i);if(!c||i||!(h.length>s||eH(h).width>Number(n)))return h;for(var f=0,p=d.length-1,m=0;f<=p&&m<=d.length-1;){var g=Math.floor((f+p)/2),v=eF(eW(d,g-1,u,l,s,n,r,i),2),y=v[0],x=v[1],b=eF(eW(d,g,u,l,s,n,r,i),1)[0];if(y||b||(f=g+1),y&&b&&(p=g-1),!y&&b){a=x;break}m++}return a||h})({breakAll:a,children:n,maxLines:s,style:i},l,u,t,!!r)}return eX(n)})({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:u,style:h.style,width:h.width}),[h.breakAll,h.children,h.maxLines,u,h.style,h.width]),p=h.dx,m=h.dy,g=h.angle,v=h.className,y=h.breakAll,x=eU(h,eD);if(!Q(i)||!Q(a)||0===f.length)return null;var b=Number(i)+(J(p)?p:0),_=Number(a)+(J(m)?m:0);if(!eR(b)||!eR(_))return null;switch(d){case"start":r=eP("calc(".concat(o,")"));break;case"middle":r=eP("calc(".concat((f.length-1)/2," * -").concat(s," + (").concat(o," / 2))"));break;default:r=eP("calc(".concat(f.length-1," * -").concat(s,")"))}var S=[],w=f[0];if(u&&null!=w){var M=w.width,T=h.width;S.push("scale(".concat(J(T)&&J(M)?T/M:1,")"))}return g&&S.push("rotate(".concat(g,", ").concat(b,", ").concat(_,")")),S.length&&(x.transform=S.join(" ")),R.createElement("text",ek({},B(x),{ref:t,x:b,y:_,className:(0,L.clsx)("recharts-text",v),textAnchor:c,fill:l.includes("url")?eq:l}),f.map((e,t)=>{var n=e.words.join(y?"":" ");return R.createElement("tspan",{x:b,dy:0===t?r:s,key:"".concat(n,"-").concat(t)},n)}))});function eK(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eK(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eK(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}e$.displayName="Text";var eJ=Math.PI/180,eQ=(e,t,r,n)=>({x:e+Math.cos(-eJ*n)*r,y:t+Math.sin(-eJ*n)*r}),e0=e.i(30224),e1=(0,R.createContext)(null),e2=e=>e,e3=()=>{var e=(0,R.useContext)(e1);return e?e.store.dispatch:e2},e4=()=>{},e5=()=>e4,e6=(e,t)=>e===t;function e8(e){var t=(0,R.useContext)(e1),r=(0,R.useMemo)(()=>t?t=>{if(null!=t)return e(t)}:e4,[t,e]);return(0,e0.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:e5,t?t.store.getState:e4,t?t.store.getState:e4,r,e6)}e.s(["useAppDispatch",0,e3,"useAppSelector",0,e8],27241);var e9=Symbol.for("immer-nothing"),e7=Symbol.for("immer-draftable"),te=Symbol.for("immer-state");function tt(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tr=Object,tn=tr.getPrototypeOf,ti="constructor",ta="prototype",ts="configurable",to="enumerable",tl="writable",tu="value",tc=e=>!!e&&!!e[te];function td(e){return!!e&&(tp(e)||tb(e)||!!e[e7]||!!e[ti]?.[e7]||t_(e)||tS(e))}var th=tr[ta][ti].toString(),tf=new WeakMap;function tp(e){if(!e||!tw(e))return!1;let t=tn(e);if(null===t||t===tr[ta])return!0;let r=tr.hasOwnProperty.call(t,ti)&&t[ti];if(r===Object)return!0;if(!tM(r))return!1;let n=tf.get(r);return void 0===n&&(n=Function.toString.call(r),tf.set(r,n)),n===th}function tm(e,t,r=!0){0===tg(e)?(r?Reflect.ownKeys(e):tr.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function tg(e){let t=e[te];return t?t.type_:tb(e)?1:t_(e)?2:3*!!tS(e)}var tv=(e,t,r=tg(e))=>2===r?e.has(t):tr[ta].hasOwnProperty.call(e,t),ty=(e,t,r=tg(e))=>2===r?e.get(t):e[t],tx=(e,t,r,n=tg(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r},tb=Array.isArray,t_=e=>e instanceof Map,tS=e=>e instanceof Set,tw=e=>"object"==typeof e,tM=e=>"function"==typeof e,tT=e=>e.modified_?e.copy_:e.base_;function tE(e,t){if(t_(e))return new Map(e);if(tS(e))return new Set(e);if(tb(e))return Array[ta].slice.call(e);let r=tp(e);if(!0!==t&&("class_only"!==t||r)){let t=tn(e);if(null!==t&&r)return{...e};let n=tr.create(t);return tr.assign(n,e)}{let t=tr.getOwnPropertyDescriptors(e);delete t[te];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],a=t[i];!1===a[tl]&&(a[tl]=!0,a[ts]=!0),(a.get||a.set)&&(t[i]={[ts]:!0,[tl]:!0,[to]:a[to],[tu]:e[i]})}return tr.create(tn(e),t)}}function tA(e,t=!1){return tP(e)||tc(e)||!td(e)||(tg(e)>1&&tr.defineProperties(e,{set:tC,add:tC,clear:tC,delete:tC}),tr.freeze(e),t&&tm(e,(e,t)=>{tA(t,!0)},!1)),e}var tC={[tu]:function(){tt(2)}};function tP(e){return!(null!==e&&tw(e))||tr.isFrozen(e)}var tI="MapSet",tO="Patches",tR="ArrayMethods",tL={};function tN(e){let t=tL[e];return t||tt(0),t}var tD=e=>!!tL[e];function tk(e,t){t&&(e.patchPlugin_=tN(tO),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tU(e){tF(e),e.drafts_.forEach(tj),e.drafts_=null}function tF(e){e===a&&(a=e.parent_)}var tz=e=>a={drafts_:[],parent_:a,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:tD(tI)?tN(tI):void 0,arrayMethodsPlugin_:tD(tR)?tN(tR):void 0};function tj(e){let t=e[te];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function tB(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[te].modified_&&(tU(t),tt(4)),td(e)&&(e=tV(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[te].base_,e,t)}else e=tV(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tA(t,r)}(t,e,!0),tU(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==e9?e:void 0}function tV(e,t){if(tP(t))return t;let r=t[te];if(!r)return tY(t,e.handledSet_,e);if(!tH(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);tq(r,e)}return r.copy_}function tG(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var tH=(e,t)=>e.scope_===t,tW=[];function tX(e,t,r,n){let i=e.copy_||e.base_,a=e.type_;if(void 0!==n&&ty(i,n,a)===t)return void tx(i,n,r,a);if(!e.draftLocations_){let t=e.draftLocations_=new Map;tm(i,(e,r)=>{if(tc(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??tW)tx(i,n,r,a)}function tq(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}tG(e)}}function tY(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||tc(e)||t.has(e)||!td(e)||tP(e)||(t.add(e),tm(e,(n,i)=>{if(tc(i)){let t=i[te];tH(t,r)&&(tx(e,n,tT(t),e.type_),tG(t))}else td(i)&&tY(i,t,r)})),e}var t$={get(e,t){let r;if(t===te)return e;let n=e.scope_.arrayMethodsPlugin_,i=1===e.type_&&"string"==typeof t;if(i&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=e.copy_||e.base_;if(!tv(a,t,e.type_)){var s;let r;return s=e,(r=tJ(a,t))?tu in r?r[tu]:r.get?.call(s.draft_):void 0}let o=a[t];if(e.finalized_||!td(o)||i&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Number.isInteger(r=+t)&&String(r)===t)return o;if(o===tZ(e.base_,t)){t0(e);let r=1===e.type_?+t:t,n=t1(e.scope_,o,e,r);return e.copy_[r]=n}return o},has:(e,t)=>t in(e.copy_||e.base_),ownKeys:e=>Reflect.ownKeys(e.copy_||e.base_),set(e,t,r){let n=tJ(e.copy_||e.base_,t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=tZ(e.copy_||e.base_,t),i=n?.[te];
1if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||tv(e.base_,t,e.type_)))return!0;t0(e),tQ(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_.set(t,!0),!function(e,t,r){let{scope_:n}=e;if(tc(r)){let i=r[te];tH(i,n)&&i.callbacks_.push(function(){t0(e),tX(e,r,tT(i),t)})}else td(r)&&e.callbacks_.push(function(){let i=e.copy_||e.base_;3===e.type_?i.has(r)&&tY(r,n.handledSet_,n):ty(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&tY(ty(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r),!0)},deleteProperty:(e,t)=>(t0(e),void 0!==tZ(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),tQ(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=e.copy_||e.base_,n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[tl]:!0,[ts]:1!==e.type_||"length"!==t,[to]:n[to],[tu]:r[t]}:n},defineProperty(){tt(11)},getPrototypeOf:e=>tn(e.base_),setPrototypeOf(){tt(12)}},tK={};for(let e in t$){let t=t$[e];tK[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function tZ(e,t){let r=e[te];return(r?r.copy_||r.base_:e)[t]}function tJ(e,t){if(!(t in e))return;let r=tn(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=tn(r)}}function tQ(e){!e.modified_&&(e.modified_=!0,e.parent_&&tQ(e.parent_))}function t0(e){e.copy_||(e.assigned_=new Map,e.copy_=tE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function t1(e,t,r,n){let[i,s]=t_(t)?tN(tI).proxyMap_(t,r):tS(t)?tN(tI).proxySet_(t,r):function(e,t){let r=tb(e),n={type_:+!!r,scope_:t?t.scope_:a,modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=t$;r&&(i=[n],s=tK);let{revoke:o,proxy:l}=Proxy.revocable(i,s);return n.draft_=l,n.revoke_=o,[l,n]}(t,r);if((r?.scope_??a).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&void 0!==n)r.callbacks_.push(function(e){if(!s||!tH(s,e))return;e.mapSetPlugin_?.fixSetContents(s);let t=tT(s);tX(r,s.draft_??s,t,n),tq(s,e)});else s.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:t}=e;s.modified_&&t&&t.generatePatches_(s,[],e)});return i}function t2(e){return tc(e)||tt(10),function e(t){let r;if(!td(t)||tP(t))return t;let n=t[te],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=tE(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=tE(t,!0);return tm(r,(t,n)=>{tx(r,t,e(n))},i),n&&(n.finalized_=!1),r}(e)}tK.deleteProperty=function(e,t){return tK.set.call(this,e,t,void 0)},tK.set=function(e,t,r){return t$.set.call(this,e[0],t,r,e[0])};var t3=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(tM(e)&&!tM(t)){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if(tM(t)||tt(6),void 0===r||tM(r)||tt(7),td(e)){let i=tz(this),a=t1(i,e,void 0),s=!0;try{n=t(a),s=!1}finally{s?tU(i):tF(i)}return tk(i,r),tB(n,i)}if(e&&tw(e))tt(1);else{if(void 0===(n=t(e))&&(n=e),n===e9&&(n=void 0),this.autoFreeze_&&tA(n,!0),r){let t=[],i=[];tN(tO).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return tM(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},(e=>"boolean"==typeof e)(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),(e=>"boolean"==typeof e)(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),(e=>"boolean"==typeof e)(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){td(e)||tt(8),tc(e)&&(e=t2(e));let t=tz(this),r=t1(t,e,void 0);return r[te].isManual_=!0,tF(t),r}finishDraft(e,t){let r=e&&e[te];r&&r.isManual_||tt(9);let{scope_:n}=r;return tk(n,t),tB(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];
1if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=tN(tO).applyPatches_;return tc(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce,t4=e=>Array.isArray(e)?e:[e],t5=0,t6=class{revision=t5;_value;_lastValue;_isEqual=t8;constructor(e,t=t8){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++t5)}};function t8(e,t){return e===t}function t9(e){return e instanceof t6||console.warn("Not a valid cell! ",e),e.value}var t7=(e,t)=>!1;function re(){return function(e=t8){return new t6(null,e)}(t7)}var rt=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=re()),t9(t)};Symbol();var rr=0,rn=Object.getPrototypeOf({}),ri=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,ra);tag=re();tags={};children={};collectionTag=null;id=rr++},ra={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in rn)return n;if("object"==typeof n&&null!==n){var i;let r=e.children[t];return void 0===r&&(r=e.children[t]=Array.isArray(i=n)?new rs(i):new ri(i)),r.tag&&t9(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=re()).value=n),t9(r),n}})(),ownKeys:e=>(rt(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},rs=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],ro);tag=re();tags={};children={};collectionTag=null;id=rr++},ro={get:([e],t)=>("length"===t&&rt(e),ra.get(e,t)),ownKeys:([e])=>ra.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>ra.getOwnPropertyDescriptor(e,t),has:([e],t)=>ra.has(e,t)},rl="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function ru(){return{s:0,v:void 0,o:null,p:null}}function rc(e,t={}){let r,n=ru(),{resultEqualityCheck:i}=t,a=0;function s(){let t,s=n,{length:o}=arguments;for(let e=0;e<o;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=s.o;null===e&&(s.o=e=new WeakMap);let r=e.get(t);void 0===r?(s=ru(),e.set(t,s)):s=r}else{let e=s.p;null===e&&(s.p=e=new Map);let r=e.get(t);void 0===r?(s=ru(),e.set(t,s)):s=r}}let l=s;if(1===s.s)t=s.v;else if(t=e.apply(null,arguments),a++,i){let e=r?.deref?.()??r;null!=e&&i(e,t)&&(t=e,0!==a&&a--),r="object"==typeof t&&null!==t||"function"==typeof t?new rl(t):t}return l.s=1,l.v=t,t}return s.clearCache=()=>{n=ru(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}var rd=function(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n,i=0,a=0,s={},o=e.pop();"object"==typeof o&&(s=o,o=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:l,memoizeOptions:u=[],argsMemoize:c=rc,argsMemoizeOptions:d=[],devModeChecks:h={}}={...r,...s},f=t4(u),p=t4(d),m=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),g=l(function(){return i++,o.apply(null,arguments)},...f);return Object.assign(c(function(){a++;let e=function(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}(m,arguments);return n=g.apply(null,e)},...p),{resultFunc:o,memoizedResultFunc:g,dependencies:m,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>n,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:l,argsMemoize:c})};return Object.assign(n,{withTypes:()=>n}),n}(rc),rh=Object.assign((e,t=rd)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>
1e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>rh});function rf(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var rp="function"==typeof Symbol&&Symbol.observable||"@@observable",rm=()=>Math.random().toString(36).substring(7).split("").join("."),rg={INIT:`@@redux/INIT${rm()}`,REPLACE:`@@redux/REPLACE${rm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rm()}`};function rv(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function ry(e){let t,r=Object.keys(e),n={};for(let t=0;t<r.length;t++){let i=r[t];"function"==typeof e[i]&&(n[i]=e[i])}let i=Object.keys(n);try{Object.keys(n).forEach(e=>{let t=n[e];if(void 0===t(void 0,{type:rg.INIT}))throw Error(rf(12));if(void 0===t(void 0,{type:rg.PROBE_UNKNOWN_ACTION()}))throw Error(rf(13))})}catch(e){t=e}return function(e={},r){if(t)throw t;let a=!1,s={};for(let t=0;t<i.length;t++){let o=i[t],l=n[o],u=e[o],c=l(u,r);if(void 0===c)throw r&&r.type,Error(rf(14));s[o]=c,a=a||c!==u}return(a=a||i.length!==Object.keys(e).length)?s:e}}function rx(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function rb(e){return rv(e)&&"type"in e&&"string"==typeof e.type}function r_(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var rS=r_(),rw="u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?rx:rx.apply(null,arguments)};function rM(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(nn(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>rb(t)&&t.type===e,r}"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var rT=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function rE(e){return td(e)?t3(e,()=>{}):e}function rA(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var rC="RTK_autoBatch",rP=()=>e=>({payload:e,meta:{[rC]:!0}}),rI=e=>t=>{setTimeout(t,e)},rO=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,a=!1,s=!1,o=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"u">typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:rI(10):"callback"===e.type?e.queueNotification:rI(e.timeout),u=()=>{s=!1,a&&(a=!1,o.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=n.subscribe(()=>i&&e());return o.add(e),()=>{t(),o.delete(e)}},dispatch(e){try{return(a=!(i=!e?.meta?.[rC]))&&!s&&(s=!0,l(u)),n.dispatch(e)}finally{i=!0}}})};function rR(e){let t,r={},n=[],i={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(nn(28));if(n in r)throw Error(nn(29));return r[n]=t,i},addAsyncThunk:(e,t)=>(t.pending&&(r[e.pending.type]=t.pending),t.rejected&&(r[e.rejected.type]=t.rejected),t.fulfilled&&(r[e.fulfilled.type]=t.fulfilled),t.settled&&n.push({matcher:e.settled,reducer:t.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(t=e,i)};return e(i),[r,n,t]}var rL=Symbol.for("rtk-slice-createasyncthunk"),rN=((i=rN||{}).reducer="reducer",i.reducerWithPrepare="reducerWithPrepare",i.asyncThunk="asyncThunk",i),rD=function({creators:e}={}){let t=e?.asyncThunk?.[rL];return function(e){let r,{name:n,reducerPath:i=n}=e;if(!n)throw Error(nn(11));let a=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},s=Object.keys(a),o={},l={},u={},c=[],d={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(nn(12));if(r in l)throw Error(nn(13));return l[r]=t,d},addMatcher:(e,t)=>(c.push({matcher:e,reducer:t}),d),exposeAction:(e,t)=>(u[e]=t,d),exposeCaseReducer:(e,t)=>(o[e]=t,d)};function h(){let[t={},r=[],n]="function"==typeof e.extraReducers?rR(e.extraReducers):[e.extraReducers],i={...t,...l};return function(e,t){let r,[n,i,a]=rR(t);
1if("function"==typeof e)r=()=>rE(e());else{let t=rE(e);r=()=>t}function s(e=r(),t){let o=[n[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===o.filter(e=>!!e).length&&(o=[a]),o.reduce((e,r)=>{if(r)if(tc(e)){let n=r(e,t);return void 0===n?e:n}else{if(td(e))return t3(e,e=>r(e,t));let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return e},e)}return s.getInitialState=r,s}(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of c)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}s.forEach(r=>{let i=a[r],s={reducerName:r,type:`${n}/${r}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===i._reducerDefinitionType?function({type:e,reducerName:t},r,n,i){if(!i)throw Error(nn(18));let{payloadCreator:a,fulfilled:s,pending:o,rejected:l,settled:u,options:c}=r,d=i(e,a,c);n.exposeAction(t,d),s&&n.addCase(d.fulfilled,s),o&&n.addCase(d.pending,o),l&&n.addCase(d.rejected,l),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:s||rk,pending:o||rk,rejected:l||rk,settled:u||rk})}(s,i,d,t):function({type:e,reducerName:t,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(nn(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?rM(e,s):rM(e))}(s,i,d)});let f=e=>e,p=new Map,m=new WeakMap;function g(e,t){return r||(r=h()),r(e,t)}function v(){return r||(r=h()),r.getInitialState()}function y(t,r=!1){function n(e){let i=e[t];return void 0===i&&r&&(i=rA(m,n,v)),i}function i(t=f){let n=rA(p,r,()=>new WeakMap);return rA(n,t,()=>{let n={};for(let[i,a]of Object.entries(e.selectors??{}))n[i]=function(e,t,r,n){function i(a,...s){let o=t(a);return void 0===o&&n&&(o=r()),e(o,...s)}return i.unwrapped=e,i}(a,t,()=>rA(m,t,v),r);return n})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let x={name:n,reducer:g,actions:u,caseReducers:o,getInitialState:v,...y(i),injectInto(e,{reducerPath:t,...r}={}){let n=t??i;return e.inject({reducerPath:n,reducer:g},r),{...x,...y(n,!0)}}};return x}}();function rk(){}var rU="listener",rF="completed",rz="cancelled",rj=`task-${rz}`,rB=`task-${rF}`,rV=`${rU}-${rz}`,rG=`${rU}-${rF}`,rH=class{constructor(e){this.code=e,this.message=`task ${rz} (reason: ${e})`}name="TaskAbortError";message},rW=(e,t)=>{if("function"!=typeof e)throw TypeError(nn(32))},rX=()=>{},rq=(e,t=rX)=>(e.catch(t),e),rY=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),r$=e=>{if(e.aborted)throw new rH(e.reason)};function rK(e,t){let r=rX;return new Promise((n,i)=>{let a=()=>i(new rH(e.reason));e.aborted?a():(r=rY(e,a),t.finally(()=>r()).then(n,i))}).finally(()=>{r=rX})}var rZ=async(e,t)=>{try{await Promise.resolve();let t=await e();return{status:"ok",value:t}}catch(e){return{status:e instanceof rH?"cancelled":"rejected",error:e}}finally{t?.()}},rJ=e=>t=>rq(rK(e,t).then(t=>(r$(e),t))),rQ=e=>{let t=rJ(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:r0}=Object,r1={},r2="listenerMiddleware",r3=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=rM(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(nn(21));return rW(a,"options.listener"),{predicate:i,type:t,effect:a}},r4=r0(e=>{let{type:t,predicate:r,effect:n}=r3(e);return{id:((e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}
1)(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(nn(22))}}},{withTypes:()=>r4}),r5=(e,t)=>{let{type:r,effect:n,predicate:i}=r3(t);return Array.from(e.values()).find(e=>("string"==typeof r?e.type===r:e.predicate===i)&&e.effect===n)},r6=e=>{e.pending.forEach(e=>{e.abort(rV)})},r8=(e,t,r)=>{try{e(t,r)}catch(e){setTimeout(()=>{throw e},0)}},r9=r0(rM(`${r2}/add`),{withTypes:()=>r9}),r7=rM(`${r2}/removeAll`),ne=r0(rM(`${r2}/remove`),{withTypes:()=>ne}),nt=(...e)=>{console.error(`${r2}/error`,...e)},nr=(e={})=>{let t=new Map,r=new Map,{extra:n,onError:i=nt}=e;rW(i,"onError");let a=e=>{var r;return(r=r5(t,e)??r4(e)).unsubscribe=()=>t.delete(r.id),t.set(r.id,r),e=>{r.unsubscribe(),e?.cancelActive&&r6(r)}};r0(a,{withTypes:()=>a});let s=e=>{let r=r5(t,e);return r&&(r.unsubscribe(),e.cancelActive&&r6(r)),!!r};r0(s,{withTypes:()=>s});let o=async(e,s,o,l)=>{var u,c;let d,h=new AbortController,f=(u=h.signal,d=async(e,t)=>{r$(u);let r=()=>{},n=[new Promise((t,n)=>{let i=a({predicate:e,effect:(e,r)=>{r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});r=()=>{i(),n()}})];null!=t&&n.push(new Promise(e=>setTimeout(e,t,null)));try{let e=await rK(u,Promise.race(n));return r$(u),e}finally{r()}},(e,t)=>rq(d(e,t))),p=[];try{let i;e.pending.add(h),i=r.get(e)??0,r.set(e,i+1),await Promise.resolve(e.effect(s,r0({},o,{getOriginalState:l,condition:(e,t)=>f(e,t).then(Boolean),take:f,delay:rQ(h.signal),pause:rJ(h.signal),extra:n,signal:h.signal,fork:(c=h.signal,(e,t)=>{rW(e,"taskExecutor");let r=new AbortController;rY(c,()=>r.abort(c.reason));let n=rZ(async()=>{r$(c),r$(r.signal);let t=await e({pause:rJ(r.signal),delay:rQ(r.signal),signal:r.signal});return r$(r.signal),t},()=>r.abort(rB));return t?.autoJoin&&p.push(n.catch(rX)),{result:rJ(c)(n),cancel(){r.abort(rj)}}}),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,r)=>{e!==h&&(e.abort(rV),r.delete(e))})},cancel:()=>{h.abort(rV),e.pending.delete(h)},throwIfCancelled:()=>{r$(h.signal)}})))}catch(e){e instanceof rH||r8(i,e,{raisedBy:"effect"})}finally{let t;await Promise.all(p),h.abort(rG),1===(t=r.get(e)??1)?r.delete(e):r.set(e,t-1),e.pending.delete(h)}},l=()=>{for(let e of r.keys())r6(e);t.clear()};return{middleware:e=>r=>n=>{let u;if(!rb(n))return r(n);if(r9.match(n))return a(n.payload);if(r7.match(n))return void l();if(ne.match(n))return s(n.payload);let c=e.getState(),d=()=>{if(c===r1)throw Error(nn(23));return c};try{if(u=r(n),t.size>0){let r=e.getState();for(let a of Array.from(t.values())){let t=!1;try{t=a.predicate(n,r,c)}catch(e){t=!1,r8(i,e,{raisedBy:"predicate"})}t&&o(a,n,e,d)}}}finally{c=r1}return u},startListening:a,stopListening:s,clearListeners:l}};function nn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original");var ni=rD({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=null!=(r=t.payload.top)?r:0,e.margin.right=null!=(n=t.payload.right)?n:0,e.margin.bottom=null!=(i=t.payload.bottom)?i:0,e.margin.left=null!=(a=t.payload.left)?a:0},setScale(e,t){e.scale=t.payload}}}),na=ni.actions,ns=na.setMargin,no=na.setLayout,nl=na.setChartSize,nu=na.setScale,nc=ni.reducer,nd=e=>Array.isArray(e)?e:[e],nh=0,nf=class{revision=nh;_value;_lastValue;_isEqual=np;constructor(e,t=np){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++nh)}};function np(e,t){return e===t}function nm(e){return e instanceof nf||console.warn("Not a valid cell! ",e),e.value}var ng=(e,t)=>!1;function nv(){return function(e=np){return new nf(null,e)}(ng)}var ny=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=nv()),nm(t)},nx=0,nb=Object.getPrototypeOf({}),n_=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,nS);tag=nv();tags={};children={};collectionTag=null;id=nx++},nS={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in nb)return n;if("object"==typeof n&&null!==n){var i;let r=e.children[t];return void 0===r&&(r=e.children[t]=Array.isArray(i=n)?new nw(i):new n_(i)),r.tag&&nm(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=nv()).value=n),nm(r),n}})(),ownKeys:e=>(ny(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>
1Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},nw=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],nM);tag=nv();tags={};children={};collectionTag=null;id=nx++},nM={get:([e],t)=>("length"===t&&ny(e),nS.get(e,t)),ownKeys:([e])=>nS.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>nS.getOwnPropertyDescriptor(e,t),has:([e],t)=>nS.has(e,t)},nT="u"<typeof WeakRef?class{constructor(e){this.value=e}deref(){return this.value}}:WeakRef;function nE(){return{s:0,v:void 0,o:null,p:null}}function nA(e,t={}){let r,n=nE(),{resultEqualityCheck:i}=t,a=0;function s(){let t,s=n,{length:o}=arguments;for(let e=0;e<o;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=s.o;null===e&&(s.o=e=new WeakMap);let r=e.get(t);void 0===r?(s=nE(),e.set(t,s)):s=r}else{let e=s.p;null===e&&(s.p=e=new Map);let r=e.get(t);void 0===r?(s=nE(),e.set(t,s)):s=r}}let l=s;if(1===s.s)t=s.v;else if(t=e.apply(null,arguments),a++,i){var u;let e=(u=r)instanceof nT?u.deref():u;null!=e&&i(e,t)&&(t=e,0!==a&&a--),r="object"==typeof t&&null!==t||"function"==typeof t?new nT(t):t}return l.s=1,l.v=t,t}return s.clearCache=()=>{n=nE(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}var nC=function(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n,i=0,a=0,s={},o=e.pop();"object"==typeof o&&(s=o,o=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:l,memoizeOptions:u=[],argsMemoize:c=nA,argsMemoizeOptions:d=[]}={...r,...s},h=nd(u),f=nd(d),p=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),m=l(function(){return i++,o.apply(null,arguments)},...h);return Object.assign(c(function(){a++;let e=function(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}(p,arguments);return n=m.apply(null,e)},...f),{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>n,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:l,argsMemoize:c})};return Object.assign(n,{withTypes:()=>n}),n}(nA),nP=Object.assign((e,t=nC)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>nP});e.s(["createSelector",0,nC],61849);var nI=e.i(42342),nO=e=>e.legend.settings;function nR(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function nL(e){return function(){return e}}function nN(e,t){if((i=e.length)>1)for(var r,n,i,a=1,s=e[t[0]],o=s.length;a<i;++a)for(n=s,s=e[t[a]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(n[r][1])?n[r][0]:n[r][1]}function nD(e){for(var t=e.length,r=Array(t);--t>=0;)r[t]=t;return r}function nk(e,t){return e[t]}function nU(e){let t=[];return t.key=e,t}function nF(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function nz(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function nj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nj(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nj(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}nC([e=>e.legend.payload,nO],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?(0,nI.default)(n,r):n}),Array.prototype.slice;var nV=["top","left","right","bottom"];function nG(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nH(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nG(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nG(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function nW(e,t,r){return es(e)||es(t)?r:Q(t)?(0,X.default)(e,t,r):"function"==typeof t?t(e):r}var nX=(e,t,r)=>{if(t&&r){var n=r.width,i=r.height,a=t.align,s=t.verticalAlign,o=t.layout,l=t.position,u=t.offset,c=void 0===u?0:u;if(null!=l){if(null!=l&&("object"==typeof l||nV.includes(l))){if("top"===l&&J(e.top))return nH(nH({},e),{},{top:e.top+(i||0)+c});if("bottom"===l&&J(e.bottom))return nH(nH({},e),{},{bottom:e.bottom+(i||0)+c});if("left"===l&&J(e.left))return nH(nH({},e),{},{left:e.left+(n||0)+c});if("right"===l&&J(e.right))return nH(nH({},e),{},{right:e.right+(n||0)+c})}return e}if(("vertical"===o||"horizontal"===o&&"middle"===s)&&"center"!==a&&J(e[a]))return nH(nH({},e),{},{[a]:e[a]+(n||0)});if(("horizontal"===o||"vertical"===o&&"center"===a)&&"middle"!==s&&J(e[s]))return nH(nH({},e),{},{[s]:e[s]+(i||0)})}return e},nq=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,nY={sign:e=>{var t,r=e.length;if(!(r<=0)){var n=null==(t=e[0])?void 0:t.length;if(null!=n&&!(n<=0))for(var i=0;i<n;++i)for(var a=0,s=0,o=0;o<r;++o){var l=e[o],u=null==l?void 0:l[i];if(null!=u){var c=u[1],d=u[0],h=K(c)?d:c;h>=0?(u[0]=a,a+=h,u[1]=a):(u[0]=s,s+=h,u[1]=s)}}}},expand:function(e,t){if((n=e.length)>0){for(var r,n,i,a=0,s=e[0].length;a<s;++a){for(i=r=0;r<n;++r)i+=e[r][a][1]||0;if(i)for(r=0;r<n;++r)e[r][a][1]/=i}nN(e,t)}},none:nN,silhouette:function(e,t){if((r=e.length)>0){for(var r,n=0,i=e[t[0]],a=i.length;n<a;++n){for(var s=0,o=0;s<r;++s)o+=e[s][n][1]||0;i[n][1]+=i[n][0]=-o/2}nN(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,a=0,s=1;s<n;++s){for(var o=0,l=0,u=0;o<i;++o){for(var c=e[t[o]],d=c[s][1]||0,h=(d-(c[s-1][1]||0))/2,f=0;f<o;++f){var p=e[t[f]];h+=(p[s][1]||0)-(p[s-1][1]||0)}l+=d,u+=h*d}r[s-1][1]+=r[s-1][0]=a,l&&(a-=u/l)}r[s-1][1]+=r[s-1][0]=a,nN(e,t)}},positive:e=>{var t,r=e.length;if(!(r<=0)){var n=null==(t=e[0])?void 0:t.length;if(null!=n&&!(n<=0))for(var i=0;i<n;++i)for(var a=0,s=0;s<r;++s){var o=e[s],l=null==o?void 0:o[i];if(null!=l){var u=K(l[1])?l[0]:l[1];u>=0?(l[0]=a,a+=u,l[1]=a):(l[0]=0,l[1]=0)}}}}},n$=(e,t,r)=>{var n,i=null!=(n=nY[r])?n:nN,a=(function(){var e=nL([]),t=nD,r=nN,n=nk;function i(i){var a,s,o=Array.from(e.apply(this,arguments),nU),l=o.length,u=-1;for(let e of i)for(a=0,++u;a<l;++a)(o[a][u]=[0,+n(e,o[a].key,u,i)]).data=e;for(a=0,s=nR(t(o));a<l;++a)o[s[a]].index=a;return r(o,s),o}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:nL(Array.from(t)),i):e},i.value=function(e){return arguments.length?(n="function"==typeof e?e:nL(+e),i):n},i.order=function(e){return arguments.length?(t=null==e?nD:"function"==typeof e?e:nL(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(r=null==e?nN:e,i):r},i})().keys(t).value((e,t)=>Number(nW(e,t,0))).order(nD).offset(i)(e);return a.forEach((r,n)=>{r.forEach((r,i)=>{var a=nW(e[i],t[n],0);Array.isArray(a)&&2===a.length&&J(a[0])&&J(a[1])&&(r[0]=a[0],r[1]=a[1])})}),a},nK=(e,t,r)=>{if(null!=e&&0!==Object.keys(e).length){let n;return[(n=Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var s=a.stackedData.reduce((e,n)=>{var i,a=[Math.min(...i=nF(n,t,r).flat(2).filter(J)),Math.max(...i)];return eR(a[0])&&eR(a[1])?[Math.min(e[0],a[0]),Math.max(e[1],a[1])]:e},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))[0]===1/0?0:n[0],n[1]===-1/0?0:n[1]]}},nZ=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nJ=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nQ=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=(0,nI.default)(t,e=>e.coordinate),a=[],s=0,o=1,l=i.length;o<l;o++){var u,c,d=((null==(u=i[o])?void 0:u.coordinate)||0)-((null==(c=i[o-1])?void 0:c.coordinate)||0);a.push(d),s=Math.max(d,s)}var h=1e-4*s,f=1/0;for(var p of a)p>h&&(f=Math.min(p,f));return f===1/0?0:f}return r?void 0:0};function n0(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,i=e.value,a=e.name;return nH(nH({},t),{},{dataKey:r,payload:n,value:i,name:a})}var n1=(e,t)=>"horizontal"===t?e.relativeX:"vertical"===t?e.relativeY:void 0,n2=(e,t)=>
1"centric"===t?e.angle:e.radius;e.s(["MAX_VALUE_REG",0,nJ,"MIN_VALUE_REG",0,nZ,"appendOffsetOfLegend",0,nX,"calculateCartesianTooltipPos",0,n1,"calculatePolarTooltipPos",0,n2,"getBandSizeOfAxis",0,nQ,"getCateCoordinateOfLine",0,function(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,s=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!es(i[t.dataKey])){var o=ea(r,"value",i[t.dataKey]);if(o)return o.coordinate+n/2}return null!=r&&r[a]?r[a].coordinate+n/2:null}var l=nW(i,es(s)?t.dataKey:s),u=t.scale.map(l);return J(u)?u:null},"getCoordinatesOfGrid",0,(e,t,r,n)=>{if(n)return e.map(e=>e.coordinate);var i,a,s=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===r&&(a=!0),e.coordinate));return i||s.push(t),a||s.push(r),s},"getDomainOfStackGroups",0,nK,"getNormalizedStackId",0,function(e){return null==e?void 0:String(e)},"getStackedData",0,n$,"getTicksOfAxis",0,(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,a=e.range,s=e.scale,o=e.realScaleType,l=e.isCategorical,u=e.categoricalDomain,c=e.tickCount,d=e.ticks,h=e.niceTicks,f=e.axisType;if(!s)return null;var p="scaleBand"===o&&s.bandwidth?s.bandwidth()/2:2,m=(t||r)&&"category"===i&&s.bandwidth?s.bandwidth()/p:0;return(m="angleAxis"===f&&a&&a.length>=2?2*$(a[0]-a[1])*m:m,t&&(d||h))?(d||h||[]).map((e,t)=>{var r=n?n.indexOf(e):e,i=s.map(r);return eR(i)?{coordinate:i+m,value:e,offset:m,index:t}:null}).filter(el):l&&u?u.map((e,t)=>{var r=s.map(e);return eR(r)?{coordinate:r+m,value:e,index:t,offset:m}:null}).filter(el):s.ticks&&!r&&null!=c?s.ticks(c).map((e,t)=>{var r=s.map(e);return eR(r)?{coordinate:r+m,value:e,index:t,offset:m}:null}).filter(el):s.domain().map((e,t)=>{var r=s.map(e);return eR(r)?{coordinate:r+m,value:n?n[e]:e,index:t,offset:m}:null}).filter(el)},"getTooltipEntry",0,n0,"getTooltipNameProp",0,function(e,t){return null!=e?String(e):"string"==typeof t?t:void 0},"getValueByDataKey",0,nW,"isCategoricalAxis",0,nq],79812);var n3=e=>e.layout.width,n4=e=>e.layout.height,n5=e=>e.layout.scale,n6=e=>e.layout.margin,n8=nC(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),n9=nC(e=>e.cartesianAxis.yAxis,e=>Object.values(e));function n7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n7(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n7(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var it=nC([n3,n4,n6,e=>e.brush.height,function(e){return n9(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return n9(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return n8(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.height?t.height:30),0)},function(e){return n8(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.height?t.height:30),0)},nO,e=>e.legend.size],(e,t,r,n,i,a,s,o,l,u)=>{var c={left:(r.left||0)+i,right:(r.right||0)+a},d=ie(ie({},{top:(r.top||0)+s,bottom:(r.bottom||0)+o}),c),h=d.bottom;d.bottom+=n;var f=e-(d=nX(d,l,u)).left-d.right,p=t-d.top-d.bottom;return ie(ie({brushBottom:h},d),{},{width:Math.max(f,0),height:Math.max(p,0)})}),ir=nC(it,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),ii=nC(n3,n4,(e,t)=>({x:0,y:0,width:e,height:t})),ia=(0,R.createContext)(null),is=()=>null!=(0,R.useContext)(ia);e.s(["useIsPanorama",0,is],75337);var io=e=>e.brush,il=nC([io,it,n6],(e,t,r)=>({height:e.height,x:J(e.x)?e.x:t.left,y:J(e.y)?e.y:t.top+t.height+t.brushBottom-((null==r?void 0:r.bottom)||0),width:J(e.width)?e.width:t.width})),iu=e.i(58723),ic=function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if("u">typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(t.replace(/%s/g,()=>n[a++]))}};e.s(["warn",0,ic],29071);var id="100%",ih="100%",ip={width:-1,height:-1},im=(e,t,r)=>{var n=r.width,i=void 0===n?id:n,a=r.height,s=void 0===a?ih:a,o=r.aspect,l=r.maxHeight,u=Z(i)?e:Number(i),c=Z(s)?t
1:Number(s);return o&&o>0&&(u?c=u/o:c&&(u=c*o),l&&null!=c&&c>l&&(c=l)),{calculatedWidth:u,calculatedHeight:c}},ig={width:0,height:0,overflow:"visible"},iv={width:0,overflowX:"visible"},iy={height:0,overflowY:"visible"},ix={},ib=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function i_(){return(i_=Object.assign.bind()).apply(null,arguments)}function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iS(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iS(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function iM(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var iT=(0,R.createContext)(ip);function iE(e){var t=e.children,r=e.width,n=e.height,i=(0,R.useMemo)(()=>({width:r,height:n}),[r,n]);return eL(i.width)&&eL(i.height)?R.createElement(iT.Provider,{value:i},t):null}var iA=()=>(0,R.useContext)(iT),iC=(0,R.forwardRef)((e,t)=>{var r,n,i,a,s,o,l=e.aspect,u=e.initialDimension,c=void 0===u?ip:u,d=e.width,h=e.height,f=e.minWidth,p=void 0===f?0:f,m=e.minHeight,g=e.maxHeight,v=e.children,y=e.debounce,x=void 0===y?0:y,b=e.id,_=e.className,S=e.onResize,w=e.style,M=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ib),T=(0,R.useRef)(null),E=(0,R.useRef)();E.current=S,(0,R.useImperativeHandle)(t,()=>T.current);var A=function(e){if(Array.isArray(e))return e}(r=(0,R.useState)({containerWidth:c.width,containerHeight:c.height}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(r)||function(e){if(e){if("string"==typeof e)return iM(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?iM(e,2):void 0}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),C=A[0],P=A[1],I=(0,R.useCallback)((e,t)=>{P(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]);(0,R.useEffect)(()=>{if(null==T.current||"u"<typeof ResizeObserver)return eu;var e=e=>{var t,r=e[0];if(null!=r){var n=r.contentRect,i=n.width,a=n.height;I(i,a),null==(t=E.current)||t.call(E,i,a)}};x>0&&(e=(0,iu.default)(e,x,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),r=T.current.getBoundingClientRect();return I(r.width,r.height),t.observe(T.current),()=>{t.disconnect()}},[I,x]);var O=C.containerWidth,N=C.containerHeight;ic(!l||l>0,"The aspect(%s) must be greater than zero.",l);var D=im(O,N,{width:d,height:h,aspect:l,maxHeight:g}),k=D.calculatedWidth,U=D.calculatedHeight;return ic(O<0||N<0||null!=k&&k>0||null!=U&&U>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",k,U,d,h,p,m,l),R.createElement("div",i_({id:b?"".concat(b):void 0,className:(0,L.clsx)("recharts-responsive-container",_),style:iw(iw({},void 0===w?{}:w),{},{width:d,height:h,minWidth:p,minHeight:m,maxHeight:g}),ref:T},M),R.createElement("div",{style:(i=(n={width:d,height:h}).width,a=n.height,s=Z(i),o=Z(a),s&&o?ig:s?iv:o?iy:ix)},R.createElement(iE,{width:k,height:U},v)))}),iP=(0,R.forwardRef)((e,t)=>{var r,n,i,a,s,o,l=iA();if(eL(l.width)&&eL(l.height))return e.children;var u=(n=(r={width:e.width,height:e.height,aspect:e.aspect}).width,i=r.height,a=r.aspect,s=n,o=i,void 0===s&&void 0===o?(s=id,o=ih):void 0===s?s=a&&a>0?void 0:id:void 0===o&&(o=a&&a>0?void 0:ih),{width:s,height:o}),c=u.width,d=u.height,h=im(void 0,void 0,{width:c,height:d,aspect:e.aspect,maxHeight:e.maxHeight}),f=h.calculatedWidth,p=h.calculatedHeight;return J(f)&&J(p)?R.createElement(iE,{width:f,height:p},e.children):R.createElement(iC,i_({},e,{width:c,height:d,ref:t}))});e.s(["ResponsiveContainer",0,iP,"useResponsiveContainerContext",0,iA],31195);var iI=()=>{var e,t=is(),r=e8(ir),n=e8(il),i=null==(e=e8(io))?void 0:e.padding;return t&&n&&i?{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}:r},iO={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},iR=()=>{var e;
1return null!=(e=e8(it))?e:iO},iL=()=>e8(n3),iN=()=>e8(n4),iD=e=>e.layout.layoutType,ik=()=>e8(iD),iU=()=>{var e=ik();if("horizontal"===e||"vertical"===e)return e},iF=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},iz=()=>void 0!==ik(),ij=e=>{var t=e3(),r=is(),n=e.width,i=e.height,a=iA(),s=n,o=i;return a&&(s=a.width>0?a.width:n,o=a.height>0?a.height:i),(0,R.useEffect)(()=>{!r&&eL(s)&&eL(o)&&t(nl({width:s,height:o}))},[t,r,s,o]),null};e.s(["ReportChartSize",0,ij,"selectChartLayout",0,iD,"selectPolarChartLayout",0,iF,"useCartesianChartLayout",0,iU,"useChartHeight",0,iN,"useChartLayout",0,ik,"useChartWidth",0,iL,"useIsInChartContext",0,iz,"useOffsetInternal",0,iR,"useViewBox",0,iI],46710);var iB={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3};e.s(["DefaultZIndexes",0,iB],18457);var iV={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:"polygon",cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:"auto",orientation:"outer",reversed:!1,scale:"auto",tick:!0,tickLine:!0,tickSize:8,type:"auto",zIndex:iB.axis},iG={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:"auto",label:!1,orientation:"right",radiusAxisId:0,reversed:!1,scale:"auto",stroke:"#ccc",tick:!0,tickCount:5,tickLine:!0,type:"auto",zIndex:iB.axis},iH=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function iW(e,t,r){return"auto"!==r?r:null!=e?nq(e,t)?"category":"number":void 0}function iX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function iq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iX(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iX(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var iY={allowDataOverflow:iV.allowDataOverflow,allowDecimals:iV.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:iV.angleAxisId,includeHidden:!1,name:void 0,reversed:iV.reversed,scale:iV.scale,tick:iV.tick,tickCount:void 0,ticks:void 0,type:iV.type,unit:void 0,niceTicks:"auto"},i$={allowDataOverflow:iG.allowDataOverflow,allowDecimals:iG.allowDecimals,allowDuplicatedCategory:iG.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:iG.radiusAxisId,includeHidden:iG.includeHidden,name:void 0,reversed:iG.reversed,scale:iG.scale,tick:iG.tick,tickCount:iG.tickCount,ticks:void 0,type:iG.type,unit:void 0,niceTicks:"auto"},iK=nC([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},iF],(e,t)=>{if(null!=e)return e;var r,n=null!=(r=iW(t,"angleAxis",iY.type))?r:"category";return iq(iq({},iY),{},{type:n})}),iZ=nC([(e,t)=>e.polarAxis.radiusAxis[t],iF],(e,t)=>{if(null!=e)return e;var r,n=null!=(r=iW(t,"radiusAxis",i$.type))?r:"category";return iq(iq({},i$),{},{type:n})}),iJ=e=>e.polarOptions,iQ=nC([n3,n4,it],function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(t-(r.top||0)-(r.bottom||0)))/2}),i0=nC([iJ,iQ],(e,t)=>{if(null!=e)return er(e.innerRadius,t,0)}),i1=nC([iJ,iQ],(e,t)=>{if(null!=e)return er(e.outerRadius,t,.8*t)}),i2=nC([iJ],e=>null==e?[0,0]:[e.startAngle,e.endAngle]);nC([iK,i2],iH);var i3=nC([iQ,i0,i1],(e,t,r)=>{if(null!=e&&null!=t&&null!=r)return[t,r]});nC([iZ,i3],iH);var i4=nC([iD,iJ,i0,i1,n3,n4],(e,t,r,n,i,a)=>
1{if(("centric"===e||"radial"===e)&&null!=t&&null!=r&&null!=n){var s=t.cx,o=t.cy,l=t.startAngle,u=t.endAngle;return{cx:er(s,i,i/2),cy:er(o,a,a/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:u,clockWise:!1}}}),i5=e.i(74080);function i6(e,t){return!!(Array.isArray(e)&&Array.isArray(t))&&0===e.length&&0===t.length||e===t}var i8=nC(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(null!=t){var n=e[t];if(null!=n)return r?n.panoramaElement:n.element}}),i9=nC(e=>e.zIndex.zIndexMap,e=>Array.from(new Set(Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(iB)))).sort((e,t)=>e-t),{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}}}),i7=Symbol.for("immer-nothing"),ae=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function ar(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var an=Object,ai=an.getPrototypeOf,aa="constructor",as="prototype",ao="configurable",al="enumerable",au="writable",ac="value",ad=e=>!!e&&!!e[at];function ah(e){return!!e&&(am(e)||a_(e)||!!e[ae]||!!e[aa]?.[ae]||aS(e)||aw(e))}var af=an[as][aa].toString(),ap=new WeakMap;function am(e){if(!e||!aM(e))return!1;let t=ai(e);if(null===t||t===an[as])return!0;let r=an.hasOwnProperty.call(t,aa)&&t[aa];if(r===Object)return!0;if(!aT(r))return!1;let n=ap.get(r);return void 0===n&&(n=Function.toString.call(r),ap.set(r,n)),n===af}function ag(e,t,r=!0){0===av(e)?(r?Reflect.ownKeys(e):an.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function av(e){let t=e[at];return t?t.type_:a_(e)?1:aS(e)?2:3*!!aw(e)}var ay=(e,t,r=av(e))=>2===r?e.has(t):an[as].hasOwnProperty.call(e,t),ax=(e,t,r=av(e))=>2===r?e.get(t):e[t],ab=(e,t,r,n=av(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r},a_=Array.isArray,aS=e=>e instanceof Map,aw=e=>e instanceof Set,aM=e=>"object"==typeof e,aT=e=>"function"==typeof e,aE=e=>e.modified_?e.copy_:e.base_;function aA(e,t){if(aS(e))return new Map(e);if(aw(e))return new Set(e);if(a_(e))return Array[as].slice.call(e);let r=am(e);if(!0!==t&&("class_only"!==t||r)){let t=ai(e);if(null!==t&&r)return{...e};let n=an.create(t);return an.assign(n,e)}{let t=an.getOwnPropertyDescriptors(e);delete t[at];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],a=t[i];!1===a[au]&&(a[au]=!0,a[ao]=!0),(a.get||a.set)&&(t[i]={[ao]:!0,[au]:!0,[al]:a[al],[ac]:e[i]})}return an.create(ai(e),t)}}function aC(e,t=!1){return aI(e)||ad(e)||!ah(e)||(av(e)>1&&an.defineProperties(e,{set:aP,add:aP,clear:aP,delete:aP}),an.freeze(e),t&&ag(e,(e,t)=>{aC(t,!0)},!1)),e}var aP={[ac]:function(){ar(2)}};function aI(e){return!(null!==e&&aM(e))||an.isFrozen(e)}var aO="MapSet",aR="Patches",aL="ArrayMethods",aN={};function aD(e){let t=aN[e];return t||ar(0),t}var ak=e=>!!aN[e];function aU(e,t){t&&(e.patchPlugin_=aD(aR),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function aF(e){az(e),e.drafts_.forEach(aB),e.drafts_=null}function az(e){e===s&&(s=e.parent_)}var aj=e=>s={drafts_:[],parent_:s,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ak(aO)?aD(aO):void 0,arrayMethodsPlugin_:ak(aL)?aD(aL):void 0};function aB(e){let t=e[at];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function aV(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[at].modified_&&(aF(t),ar(4)),ah(e)&&(e=aG(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[at].base_,e,t)}else e=aG(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&aC(t,r)}(t,e,!0),aF(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i7?e:void 0}function aG(e,t){if(aI(t))return t;let r=t[at];if(!r)return a$(t,e.handledSet_,e);if(!aW(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);aY(r,e)}return r.copy_}function aH(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var aW=(e,t)=>e.scope_===t,aX=[];function aq(e,t,r,n){let i=e.copy_||e.base_,a=e.type_;if(void 0!==n&&ax(i,n,a)===t)return void ab(i,n,r,a);if(!e.draftLocations_){let t=e.draftLocations_=new Map;ag(i,(e,r)=>{if(ad(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??aX)ab(i,n,r,a)}function aY(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}aH(e)}}function a$(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ad(e)||t.has(e)||!ah(e)||aI(e)||(t.add(e),ag(e,(n,i)=>{if(ad(i)){let t=i[at];aW(t,r)&&(ab(e,n,aE(t),e.type_),aH(t))}else ah(i)&&a$(i,t,r)})),e}var aK={get(e,t){let r;if(t===at)return e;if("constructor"===t||"__proto__"===t)return new Proxy((e.copy_||e.base_)[t]||{},{get:(e,t)=>"__proto__"===t||"prototype"===t?Object.freeze(Object.create(null)):Reflect.get(e,t),set:()=>!0,apply:(e,t,r)=>Reflect.apply(e,t,r)});let n=e.scope_.arrayMethodsPlugin_,i=1===e.type_&&"string"==typeof t;if(i&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=e.copy_||e.base_;if(!ay(a,t,e.type_)){var s;let r;return s=e,(r=aQ(a,t))?ac in r?r[ac]:r.get?.call(s.draft_):void 0}let o=a[t];if(e.finalized_||!ah(o)||i&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Number.isInteger(r=+t)&&String(r)===t)return o;if(o===aJ(e.base_,t)){a1(e);let r=1===e.type_?+t:t,n=a2(e.scope_,o,e,r);return e.copy_[r]=n}return o},has:(e,t)=>"constructor"!==t&&"__proto__"!==t&&"prototype"!==t&&t in(e.copy_||e.base_),ownKeys:e=>Reflect.ownKeys(e.copy_||e.base_),set(e,t,r){if("constructor"===t||"__proto__"===t||"prototype"===t)return!0;let n=aQ(e.copy_||e.base_,t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=aJ(e.copy_||e.base_,t),i=n?.[at];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||ay(e.base_,t,e.type_)))return!0;a1(e),a0(e)}return!!(e.copy_[t]===r&&(void 0!==r||ay(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||
1(e.copy_[t]=r,e.assigned_.set(t,!0),!function(e,t,r){let{scope_:n}=e;if(ad(r)){let i=r[at];aW(i,n)&&i.callbacks_.push(function(){a1(e),aq(e,r,aE(i),t)})}else ah(r)&&e.callbacks_.push(function(){let i=e.copy_||e.base_;3===e.type_?i.has(r)&&a$(r,n.handledSet_,n):ax(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&a$(ax(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r),!0)},deleteProperty:(e,t)=>(a1(e),void 0!==aJ(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),a0(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=e.copy_||e.base_,n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[au]:!0,[ao]:1!==e.type_||"length"!==t,[al]:n[al],[ac]:r[t]}:n},defineProperty(){ar(11)},getPrototypeOf:e=>ai(e.base_),setPrototypeOf(){ar(12)}},aZ={};for(let e in aK){let t=aK[e];aZ[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function aJ(e,t){let r=e[at];return(r?r.copy_||r.base_:e)[t]}function aQ(e,t){if(!(t in e))return;let r=ai(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=ai(r)}}function a0(e){!e.modified_&&(e.modified_=!0,e.parent_&&a0(e.parent_))}function a1(e){e.copy_||(e.assigned_=new Map,e.copy_=aA(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function a2(e,t,r,n){let[i,a]=aS(t)?aD(aO).proxyMap_(t,r):aw(t)?aD(aO).proxySet_(t,r):function(e,t){let r=a_(e),n={type_:+!!r,scope_:t?t.scope_:s,modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,a=aK;r&&(i=[n],a=aZ);let{revoke:o,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=o,[l,n]}(t,r);if((r?.scope_??s).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&void 0!==n)r.callbacks_.push(function(e){if(!a||!aW(a,e))return;e.mapSetPlugin_?.fixSetContents(a);let t=aE(a);aq(r,a.draft_??a,t,n),aY(a,e)});else a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)});return i}function a3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a3(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a3(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}aZ.deleteProperty=function(e,t){return aZ.set.call(this,e,t,void 0)},aZ.set=function(e,t,r){return aK.set.call(this,e[0],t,r,e[0])},new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(aT(e)&&!aT(t)){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if(aT(t)||ar(6),void 0===r||aT(r)||ar(7),ah(e)){let i=aj(this),a=a2(i,e,void 0),s=!0;try{n=t(a),s=!1}finally{s?aF(i):az(i)}return aU(i,r),aV(n,i)}if(e&&aM(e))ar(1);else{if(void 0===(n=t(e))&&(n=e),n===i7&&(n=void 0),this.autoFreeze_&&aC(n,!0),r){let t=[],i=[];aD(aR).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return aT(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},(e=>"boolean"==typeof e)(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),(e=>"boolean"==typeof e)(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),(e=>"boolean"==typeof e)(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;ah(e)||ar(8),ad(e)&&(ad(t=e)||ar(10),e=function e(t){let r;if(!ah(t)||aI(t))return t;let n=t[at],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=aA(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=aA(t,!0);return ag(r,(t,n)=>{ab(r,t,e(n))},i),n&&(n.finalized_=!1),r}(t));let r=aj(this),n=a2(r,e,void 0);return n[at].isManual_=!0,az(r),n}finishDraft(e,t){let r=e&&e[at];r&&r.isManual_||ar(9);let{scope_:n}=r;return aU(n,t),aV(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];
1if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=aD(aR).applyPatches_;return ad(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce;var a5={zIndexMap:Object.values(iB).reduce((e,t)=>a4(a4({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},a6=new Set(Object.values(iB)),a8=rD({name:"zIndex",initialState:a5,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:rP()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!a6.has(r)&&delete e.zIndexMap[r])},prepare:rP()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,a=r.isPanorama;e.zIndexMap[n]?a?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:a?void 0:i,panoramaElement:a?i:void 0}},prepare:rP()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:rP()}}}),a9=a8.actions,a7=a9.registerZIndexPortal,se=a9.unregisterZIndexPortal,st=a9.registerZIndexPortalElement,sr=a9.unregisterZIndexPortalElement,sn=a8.reducer;function si(e){var t=e.zIndex,r=e.children,n=iz()&&void 0!==t&&0!==t,i=is(),a=(0,R.useRef)(void 0),s=(0,R.useRef)(new Set),o=e3(),l=e8(e=>i8(e,t,i));if((0,R.useLayoutEffect)(()=>{if(!n){var e=s.current;e.forEach(e=>{o(se({zIndex:e}))}),e.clear(),a.current=void 0;return}if(s.current.has(t)||(o(a7({zIndex:t})),s.current.add(t)),l){a.current=l;var r=s.current;r.forEach(e=>{e!==t&&(o(se({zIndex:e})),r.delete(e))})}},[o,t,n,l]),(0,R.useLayoutEffect)(()=>{var e=s.current;return()=>{e.forEach(e=>{o(se({zIndex:e}))}),e.clear()}},[o]),!n)return r;var u=null!=l?l:a.current;return u?(0,i5.createPortal)(r,u):null}e.s(["ZIndexLayer",0,si],29601);var sa=["labelRef"],ss=["content"];function so(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function su(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sl(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function sc(){return(sc=Object.assign.bind()).apply(null,arguments)}var sd=(0,R.createContext)(null),sh=e=>{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,a=e.width,s=e.height,o=e.children,l=(0,R.useMemo)(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:s}),[t,r,n,i,a,s]);return R.createElement(sd.Provider,{value:l},o)},sf=()=>{var e=(0,R.useContext)(sd),t=iI();return e||(t?nz(t):void 0)},sp=(0,R.createContext)(null),sm=e=>null!=e&&"function"==typeof e,sg=e=>null!=e&&"cx"in e&&J(e.cx),sv={angle:0,offset:5,zIndex:iB.label,position:"middle",textBreakAll:!1};function sy(e){var t,r,n,i,a,s,o,l,u,c,d=eO(e,sv),h=d.viewBox,f=d.parentViewBox,p=d.position,m=d.value,g=d.children,v=d.content,y=d.className,x=d.textBreakAll,b=d.labelRef,_=(t=(0,R.useContext)(sp),r=e8(i4),t||r),S=sf(),w=function(e){if(!sg(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=2*n;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}(l=null==h?"center"===p?S:null!=_?_:S:sg(h)?h:nz(h));if(!l||es(m)&&es(g)&&!(0,R.isValidElement)(v)&&"function"!=typeof v)return null;var M=sg(l)&&("insideStart"===p||"insideEnd"===p||"end"===p);if(sg(l))M||(c=((e,t,r)=>{var n=e.cx,i=e.cy,a=e.innerRadius,s=e.outerRadius,o=(e.startAngle+e.endAngle)/2;if("outside"===r){var l=eQ(n,i,s+t,o),u=l.x;return{x:u,y:l.y,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var c=eQ(n,i,(a+s)/2,o);return{x:c.x,y:c.y,textAnchor:"middle",verticalAnchor:"middle"}})(l,d.offset,d.position));else if(w){var T=(e=>{var t=e.viewBox,r=e.position,n=e.offset,i=void 0===n?0:n,a=e.parentViewBox,s=e.clamp,o=nz(t),l=o.x,u=o.y,c=o.height,d=o.upperWidth,h=o.lowerWidth,f=l+(d-h)/2,p=(l+f)/2,m=(d+h)/2,g=c>=0?1:-1,v=g*i,y=g>0?"end":"start",x=g>0?"start":"end",b=d>=0?1:-1,_=b*i,S=b>0?"end":"start",w=b>0?"start":"end";if("top"===r){var M={x:l+d/2,y:u-v,horizontalAnchor:"middle",verticalAnchor:y};return s&&a&&(M.height=Math.max(u-a.y,0),M.width=d),M}if("bottom"===r){var T={x:f+h/2,y:u+c+v,horizontalAnchor:"middle",verticalAnchor:x};return s&&a&&(T.height=Math.max(a.y+a.height-(u+c),0),T.width=h),T}if("left"===r){var E={x:p-_,y:u+c/2,horizontalAnchor:S,verticalAnchor:"middle"};return s&&a&&(E.width=Math.max(E.x-a.x,0),E.height=c),E}if("right"===r){var A={x:p+m+_,y:u+c/2,horizontalAnchor:w,verticalAnchor:"middle"};return s&&a&&(A.width=Math.max(a.x+a.width-A.x,0),A.height=c),A}var C=s&&a?{width:m,height:c}:{};return"insideLeft"===r?nB({x:p+_,y:u+c/2,horizontalAnchor:w,verticalAnchor:"middle"},C):"insideRight"===r?nB({x:p+m-_,y:u+c/2,horizontalAnchor:S,verticalAnchor:"middle"},C):"insideTop"===r?nB({x:l+d/2,y:u+v,horizontalAnchor:"middle",verticalAnchor:x}
1,C):"insideBottom"===r?nB({x:f+h/2,y:u+c-v,horizontalAnchor:"middle",verticalAnchor:y},C):"insideTopLeft"===r?nB({x:l+_,y:u+v,horizontalAnchor:w,verticalAnchor:x},C):"insideTopRight"===r?nB({x:l+d-_,y:u+v,horizontalAnchor:S,verticalAnchor:x},C):"insideBottomLeft"===r?nB({x:f+_,y:u+c-v,horizontalAnchor:w,verticalAnchor:y},C):"insideBottomRight"===r?nB({x:f+h-_,y:u+c-v,horizontalAnchor:S,verticalAnchor:y},C):r&&"object"==typeof r&&(J(r.x)||Z(r.x))&&(J(r.y)||Z(r.y))?nB({x:l+er(r.x,m),y:u+er(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},C):nB({x:l+d/2,y:u+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},C)})({viewBox:w,position:p,offset:d.offset,parentViewBox:sg(f)?void 0:f,clamp:!0});c=su(su({x:T.x,y:T.y,textAnchor:T.horizontalAnchor,verticalAnchor:T.verticalAnchor},void 0!==T.width?{width:T.width}:{}),void 0!==T.height?{height:T.height}:{})}var E=su(su(su(su({},(null==(s=c)?void 0:s.x)!==void 0?{x:c.x}:{}),(null==(o=c)?void 0:o.y)!==void 0?{y:c.y}:{}),d),{},{viewBox:l});if((0,R.isValidElement)(v)){E.labelRef;var A=so(E,sa);return(0,R.cloneElement)(v,A)}if("function"==typeof v){E.content;var C=so(E,ss);if(u=(0,R.createElement)(v,C),(0,R.isValidElement)(u))return u}else n=d.value,i=d.formatter,a=es(d.children)?n:d.children,u="function"==typeof i?i(a):a;var P=B(d);return M&&sg(l)?((e,t,r,n,i)=>{var a,s,o=e.offset,l=e.className,u=i.cx,c=i.cy,d=i.innerRadius,h=i.outerRadius,f=i.startAngle,p=i.endAngle,m=i.clockWise,g=(d+h)/2,v=$(p-f)*Math.min(Math.abs(p-f),360),y=v>=0?1:-1;switch(t){case"insideStart":a=f+y*o,s=m;break;case"insideEnd":a=p-y*o,s=!m;break;case"end":a=p+y*o,s=m;break;default:throw Error("Unsupported position ".concat(t))}s=v<=0?s:!s;var x=eQ(u,c,g,a),b=eQ(u,c,g,a+(s?1:-1)*359),_="M".concat(x.x,",").concat(x.y,"\n A").concat(g,",").concat(g,",0,1,").concat(+!s,",\n ").concat(b.x,",").concat(b.y),S=es(e.id)?et("recharts-radial-line-"):e.id;return R.createElement("text",sc({},n,{dominantBaseline:"central",className:(0,L.clsx)("recharts-radial-bar-label",l)}),R.createElement("defs",null,R.createElement("path",{id:S,d:_})),R.createElement("textPath",{xlinkHref:"#".concat(S)},r))})(d,p,u,P,l):null==c?null:R.createElement(si,{zIndex:d.zIndex},R.createElement(e$,sc({ref:b,className:(0,L.clsx)("recharts-label",void 0===y?"":y)},P,c,{textAnchor:eV(P.textAnchor)?P.textAnchor:c.textAnchor,breakAll:x}),u))}function sx(e){var t=e.label,r=e.labelRef;return((e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return!0===e?R.createElement(sy,sc({key:"label-implicit"},n)):Q(e)?R.createElement(sy,sc({key:"label-implicit",value:e},n)):(0,R.isValidElement)(e)?e.type===sy?(0,R.cloneElement)(e,su({key:"label-implicit"},n)):R.createElement(sy,sc({key:"label-implicit",content:e},n)):sm(e)?R.createElement(sy,sc({key:"label-implicit",content:e},n)):e&&"object"==typeof e?R.createElement(sy,sc({},e,{key:"label-implicit"},n)):null})(t,sf(),r)||null}sy.displayName="Label",e.s(["CartesianLabelContextProvider",0,sh,"CartesianLabelFromLabelProp",0,sx,"Label",0,sy,"isLabelContentAFunction",0,sm],494);var sb=["valueAccessor"],s_=["dataKey","clockWise","id","textBreakAll","zIndex"];function sS(){return(sS=Object.assign.bind()).apply(null,arguments)}function sw(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}
1var sM=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(es(t)||"string"==typeof t||"number"==typeof t||"boolean"==typeof t)return t},sT=(0,R.createContext)(void 0),sE=sT.Provider,sA=(0,R.createContext)(void 0);function sC(e){var t=e.valueAccessor,r=void 0===t?sM:t,n=sw(e,sb),i=n.dataKey,a=(n.clockWise,n.id),s=n.textBreakAll,o=n.zIndex,l=sw(n,s_),u=(0,R.useContext)(sT),c=(0,R.useContext)(sA),d=u||c;return d&&d.length?R.createElement(si,{zIndex:null!=o?o:iB.label},R.createElement(W,{className:"recharts-label-list"},d.map((e,t)=>{var o,u=es(i)?r(e,t):nW(e.payload,i),c=es(a)?{}:{id:"".concat(a,"-").concat(t)};return R.createElement(sy,sS({key:"label-".concat(t)},B(e),l,c,{fill:null!=(o=n.fill)?o:e.fill,parentViewBox:e.parentViewBox,value:u,textBreakAll:s,viewBox:e.viewBox,index:t,zIndex:0}))}))):null}sA.Provider,sC.displayName="LabelList",e.s(["CartesianLabelListContextProvider",0,sE,"LabelListFromLabelProp",0,function(e){var t=e.label;return t?!0===t?R.createElement(sC,{key:"labelList-implicit"}):R.isValidElement(t)||sm(t)?R.createElement(sC,{key:"labelList-implicit",content:t}):"object"==typeof t?R.createElement(sC,sS({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}],69212);var sP=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,sI=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,R.isValidElement)(e)&&(r=e.props),"object"!=typeof r&&"function"!=typeof r)return null;var n={};return Object.keys(r).forEach(e=>{D(e)&&"function"==typeof r[e]&&(n[e]=t||(t=>r[e](r,t)))}),n};function sO(){return(sO=Object.assign.bind()).apply(null,arguments)}var sR=e=>{var t=e.cx,r=e.cy,n=e.r,i=e.className,a=(0,L.clsx)("recharts-dot",i);return J(t)&&J(r)&&J(n)?R.createElement("circle",sO({},z(e),sI(e),{className:a,cx:t,cy:r,r:n})):null},sL=(e.i(79684),e=>!e||"object"!=typeof e||!("clipDot"in e)||!!e.clipDot);e.s(["isClipDot",0,sL],81977);var sN=["points"];function sD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function sk(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sD(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function sU(){return(sU=Object.assign.bind()).apply(null,arguments)}function sF(e){var t=e.option,r=e.dotProps,n=e.className;if((0,R.isValidElement)(t))return(0,R.cloneElement)(t,r);if("function"==typeof t)return t(r);var i=(0,L.clsx)(n,"boolean"!=typeof t?t.className:""),a=null!=r?r:{},s=(a.points,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(a,sN));return R.createElement(sR,sU({},s,{className:i}))}e.s(["Dots",0,function(e){var t=e.points,r=e.dot,n=e.className,i=e.dotClassName,a=e.dataKey,s=e.baseProps,o=e.needClip,l=e.clipPathId,u=e.zIndex,c=void 0===u?iB.scatter:u;if(null==t||!r&&1!==t.length)return null;var d=sL(r),h=V(r),f=t.map((e,n)=>{var o,l,u=sk(sk(sk({r:3},s),h),{},{index:n,cx:null!=(o=e.x)?o:void 0,cy:null!=(l=e.y)?l:void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return R.createElement(sF,{key:"dot-".concat(n),option:r,dotProps:u,className:i})}),p={};return o&&null!=l&&(p.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(l,")")),R.createElement(si,{zIndex:c},R.createElement(W,sU({className:n},p),f))}],86031);var sz=e.i(66814),sj=e=>e.chartData,sB=nC([sj],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),sV=(e,t,r,n)=>n?sB(e):sj(e),sG=nC([sV],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return null!=t?t.slice(r,n+1):[]});nC([sB],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return null!=t?t.slice(r,n+1):[]});var sH=nC([sj],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return null!=t?t.slice(r,n+1):[]});function sW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}
1finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return sX(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sX(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sX(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function sq(e){if(Array.isArray(e)&&2===e.length){var t=sW(e,2),r=t[0],n=t[1];if(eR(r)&&eR(n))return!0}return!1}function sY(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function s$(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var r,n,i=sW(e,2),a=i[0],s=i[1];if(eR(a))r=a;else if("function"==typeof a)return;if(eR(s))n=s;else if("function"==typeof s)return;var o=[r,n];if(sq(o))return o}}e.s(["selectChartDataSliceIfNotInPanorama",0,sG,"selectChartDataSliceWithIndexes",0,sH,"selectChartDataWithIndexes",0,sj,"selectChartDataWithIndexesIfNotInPanoramaPosition3",0,(e,t,r)=>r?sB(e):sj(e),"selectChartDataWithIndexesIfNotInPanoramaPosition4",0,sV],92860);var sK=e.i(51655);function sZ(e){return 0===e?1:Math.floor(new sK.default(e).abs().log(10).toNumber())+1}function sJ(e,t,r){for(var n=new sK.default(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}function sQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s0(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s0(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s0(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var s1=e=>{var t=sQ(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]},s2=(e,t,r)=>{if(e.lte(0))return new sK.default(0);var n=sZ(e.toNumber()),i=new sK.default(10).pow(n),a=e.div(i),s=1!==n?.05:.1,o=new sK.default(Math.ceil(a.div(s).toNumber())).add(r).mul(s).mul(i);return new sK.default(t?o.toNumber():Math.ceil(o.toNumber()))},s3=(e,t,r)=>{if(e.lte(0))return new sK.default(0);var n,i=[1,2,2.5,5],a=e.toNumber(),s=Math.floor(new sK.default(a).abs().log(10).toNumber()),o=new sK.default(10).pow(s),l=e.div(o).toNumber(),u=i.findIndex(e=>e>=l-1e-10);if(-1===u&&(o=o.mul(10),u=0),(u+=r)>=i.length){var c=Math.floor(u/i.length);u%=i.length,o=o.mul(new sK.default(10).pow(c))}var d=null!=(n=i[u])?n:1,h=new sK.default(d).mul(o);return t?h:new sK.default(Math.ceil(h.toNumber()))},s4=function(e,t,r,n){var i,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:s2;if(!Number.isFinite((t-e)/(r-1)))return{step:new sK.default(0),tickMin:new sK.default(0),tickMax:new sK.default(0)};var o=s(new sK.default(t).sub(e).div(r-1),n,a),l=Math.ceil((i=e<=0&&t>=0?new sK.default(0):(i=new sK.default(e).add(t).div(2)).sub(new sK.default(i).mod(o))).sub(e).div(o).toNumber()),u=Math.ceil(new sK.default(t).sub(i).div(o).toNumber()),c=l+u+1;return c>r?s4(e,t,r,n,a+1,s):(c<r&&(u=t>0?u+(r-c):u,l=t>0?l:l+(r-c)),{step:o,tickMin:i.sub(new sK.default(l).mul(o)),tickMax:i.add(new sK.default(u).mul(o))})},s5=function(e){var t=sQ(e,2),r=t[0],n=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",o=Math.max(i,2),l=sQ(s1([r,n]),2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var d=c===1/0?[u,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),c];return r>n?d.reverse():d}if(u===c)return((e,t,r)=>{var n=new sK.default(1),i=new sK.default(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new sK.default(10).pow(sZ(e)-1),i=new sK.default(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new sK.default(Math.floor(e)))}else 0===e?i=new sK.default(Math.floor((t-1)/2)):r||(i=new sK.default(Math.floor(e)));for(var s=Math.floor((t-1)/2),o=[],l=0;l<t;l++)o.push(i.add(new sK.default(l-s).mul(n)).toNumber());return o}
1)(u,i,a);var h=s4(u,c,o,a,0,"snap125"===s?s3:s2),f=h.step,p=sJ(h.tickMin,h.tickMax.add(new sK.default(.1).mul(f)),f);return r>n?p.reverse():p},s6=function(e,t){var r=sQ(e,2),n=r[0],i=r[1],a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",o=sQ(s1([n,i]),2),l=o[0],u=o[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),d=("snap125"===s?s3:s2)(new sK.default(u).sub(l).div(c-1),a,0),h=[...sJ(new sK.default(l),new sK.default(u),d),u];if(!1===a){var f=(h=h.map(e=>Math.round(e))).length-1;f>0&&h[f]===h[f-1]&&(h=h.slice(0,f))}return n>i?h.reverse():h},s8=e=>e.rootProps.barCategoryGap,s9=e=>e.rootProps.stackOffset,s7=e=>e.rootProps.reverseStackOrder,oe=e=>e.options.chartName,ot=e=>e.rootProps.syncId,or=e=>e.rootProps.syncMethod,on=e=>e.options.eventEmitter;e.s(["selectBarCategoryGap",0,s8,"selectChartBaseValue",0,e=>e.rootProps.baseValue,"selectChartName",0,oe,"selectEventEmitter",0,on,"selectReverseStackOrder",0,s7,"selectStackOffsetType",0,s9,"selectSyncId",0,ot,"selectSyncMethod",0,or],77320);var oi=(e,t)=>t,oa=(e,t,r)=>r;function os(e){return null==e?void 0:e.id}function oo(e,t,r){var n=t.chartData,i=void 0===n?[]:n,a=r.allowDuplicatedCategory,s=r.dataKey,o=new Map;return e.forEach(e=>{var t,r=null!=(t=e.data)?t:i;if(null!=r&&0!==r.length){var n=os(e);r.forEach((t,r)=>{var i,l=null==s||a?r:String(nW(t,s,null)),u=nW(t,e.dataKey,0);Object.assign(i=o.has(l)?o.get(l):{},{[n]:u}),o.set(l,i)})}}),Array.from(o.values())}function ol(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}e.s(["getStackSeriesIdentifier",0,os],91526);var ou=(e,t)=>e===t||null!=e&&null!=t&&e[0]===t[0]&&e[1]===t[1],oc=e=>{var t=iD(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},od=e=>e.tooltip.settings.axisId;function oh(e){if(null!=e){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],r=i[1];return t<=r?e>=t&&e<=r:e>=r&&e<=t},bandwidth:r?()=>r.call(e):void 0,ticks:t?r=>t.call(e,r):void 0,map:(t,r)=>{var n=e(t);if(null!=n){if(e.bandwidth&&null!=r&&r.position){var i=e.bandwidth();switch(r.position){case"middle":n+=i/2;break;case"end":n+=i}}return n}}}}}function of(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function op(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}e.s([],25212),e.i(25212),e.s([],67155),e.i(67155);class om extends Map{constructor(e,t=ov){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,r]of e)this.set(t,r)}get(e){return super.get(og(this,e))}has(e){return super.has(og(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}(this,e))}}function og({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function ov(e){return null!==e&&"object"==typeof e?e.valueOf():e}let oy=Symbol("implicit");function ox(){var e=new om,t=[],r=[],n=oy;function i(i){let a=e.get(i);if(void 0===a){if(n!==oy)return n;e.set(i,a=t.push(i)-1)}return r[a%r.length]}return i.domain=function(r){if(!arguments.length)return t.slice();for(let n of(t=[],e=new om,r))e.has(n)||e.set(n,t.push(n)-1);return i},i.range=function(e){return arguments.length?(r=Array.from(e),i):r.slice()},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return ox(t,r).unknown(n)},of.apply(i,arguments),i}function ob(){var e,t,r=ox().unknown(void 0),n=r.domain,i=r.range,a=0,s=1,o=!1,l=0,u=0,c=.5;function d(){var r=n().length,d=s<a,h=d?s:a,f=d?a:s;e=(f-h)/Math.max(1,r-l+2*u),o&&(e=Math.floor(e)),h+=(f-h-e*(r-l))*c,t=e*(1-l),o&&(h=Math.round(h),t=Math.round(t));var p=(function(e,t,r){e*=1,t*=1,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),a=Array(i);++n<i;)a[n]=e+n*r;return a})(r).map(function(t){return h+e*t});return i(d?p.reverse():p)}return delete r.unknown,r.domain=function(e){return arguments.length?(n(e),d()):n()},r.range=function(e){return arguments.length?([a,s]=e,a*=1,s*=1,d()):[a,s]},r.rangeRound=function(e){return[a,s]=e,a*=1,s*=1,o=!0,d()},r.bandwidth=function(){return t},r.step=function(){return e},r.round=function(e){return arguments.length?(o=!!e,d()):o},r.padding=function(e){return arguments.length?(l=Math.min(1,u=+e),d()):l},r.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},r.paddingOuter=function(e){return arguments.length?(u=+e,d()):u},r.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),d()):c},r.copy=function(){return ob(n(),[a,s]).round(o).paddingInner(l).paddingOuter(u).align(c)}
1,of.apply(d(),arguments)}function o_(){return function e(t){var r=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return e(r())},t}(ob.apply(null,arguments).paddingInner(1))}let oS=Math.sqrt(50),ow=Math.sqrt(10),oM=Math.sqrt(2);function oT(e,t,r){let n,i,a,s=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(s)),l=s/Math.pow(10,o),u=l>=oS?10:l>=ow?5:l>=oM?2:1;return(o<0?(n=Math.round(e*(a=Math.pow(10,-o)/u)),i=Math.round(t*a),n/a<e&&++n,i/a>t&&--i,a=-a):(n=Math.round(e/(a=Math.pow(10,o)*u)),i=Math.round(t/a),n*a<e&&++n,i*a>t&&--i),i<n&&.5<=r&&r<2)?oT(e,t,2*r):[n,i,a]}function oE(e,t,r){if(t*=1,e*=1,!((r*=1)>0))return[];if(e===t)return[e];let n=t<e,[i,a,s]=n?oT(t,e,r):oT(e,t,r);if(!(a>=i))return[];let o=a-i+1,l=Array(o);if(n)if(s<0)for(let e=0;e<o;++e)l[e]=-((a-e)/s);else for(let e=0;e<o;++e)l[e]=(a-e)*s;else if(s<0)for(let e=0;e<o;++e)l[e]=-((i+e)/s);else for(let e=0;e<o;++e)l[e]=(i+e)*s;return l}function oA(e,t,r){return oT(e*=1,t*=1,r*=1)[2]}function oC(e,t,r){t*=1,e*=1,r*=1;let n=t<e,i=n?oA(t,e,r):oA(e,t,r);return(n?-1:1)*(i<0?-(1/i):i)}function oP(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function oI(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function oO(e){let t,r,n;function i(e,n,a=0,s=e.length){if(a<s){if(0!==t(n,n))return s;do{let t=a+s>>>1;0>r(e[t],n)?a=t+1:s=t}while(a<s)}return a}return 2!==e.length?(t=oP,r=(t,r)=>oP(e(t),r),n=(t,r)=>e(t)-r):(t=e===oP||e===oI?e:oR,r=e,n=e),{left:i,center:function(e,t,r=0,a=e.length){let s=i(e,t,r,a-1);return s>r&&n(e[s-1],t)>-n(e[s],t)?s-1:s},right:function(e,n,i=0,a=e.length){if(i<a){if(0!==t(n,n))return a;do{let t=i+a>>>1;0>=r(e[t],n)?i=t+1:a=t}while(i<a)}return i}}}function oR(){return 0}function oL(e){return null===e?NaN:+e}let oN=oO(oP),oD=oN.right;function ok(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function oU(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function oF(){}oN.left,oO(oL).center;var oz="\\s*([+-]?\\d+)\\s*",oj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oV=/^#([0-9a-f]{3,8})$/,oG=RegExp(`^rgb\\(${oz},${oz},${oz}\\)$`),oH=RegExp(`^rgb\\(${oB},${oB},${oB}\\)$`),oW=RegExp(`^rgba\\(${oz},${oz},${oz},${oj}\\)$`),oX=RegExp(`^rgba\\(${oB},${oB},${oB},${oj}\\)$`),oq=RegExp(`^hsl\\(${oj},${oB},${oB}\\)$`),oY=RegExp(`^hsla\\(${oj},${oB},${oB},${oj}\\)$`),o$={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function oK(){return this.rgb().formatHex()}function oZ(){return this.rgb().formatRgb()}function oJ(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=oV.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?oQ(t):3===r?new o2(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?o0(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?o0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=oG.exec(e))?new o2(t[1],t[2],t[3],1):(t=oH.exec(e))?new o2(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=oW.exec(e))?o0(t[1],t[2],t[3],t[4]):(t=oX.exec(e))?o0(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=oq.exec(e))?o9(t[1],t[2]/100,t[3]/100,1):(t=oY.exec(e))?o9(t[1],t[2]/100,t[3]/100,t[4]):o$.hasOwnProperty(e)?oQ(o$[e]):"transparent"===e?new o2(NaN,NaN,NaN,0):null}function oQ(e){return new o2(e>>16&255,e>>8&255,255&e,1)}function o0(e,t,r,n){return n<=0&&(e=t=r=NaN),new o2(e,t,r,n)}function o1(e,t,r,n){var i;return 1==arguments.length?((i=e)instanceof oF||(i=oJ(i)),i)?new o2((i=i.rgb()).r,i.g,i.b,i.opacity):new o2:new o2(e,t,r,null==n?1:n)}function o2(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function o3(){return`#${o8(this.r)}${o8(this.g)}${o8(this.b)}`}function o4(){let e=o5(this.opacity);return`${1===e?"rgb(":"rgba("}${o6(this.r)}, ${o6(this.g)}, ${o6(this.b)}${1===e?")":`, ${e})`}`}function o5(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function o6(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function o8(e){return((e=o6(e))<16?"0":"")+e.toString(16)}function o9(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new le(e,t,r,n)}function o7(e){if(e instanceof le)return new le(e.h,e.s,e.l,e.opacity);if(e instanceof oF||(e=oJ(e)),!e)return new le;if(e instanceof le)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(s=t===a?(r-n)/o+(r<n)*6:r===a?(n-t)/o+2:(t-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new le(s,o,l,e.opacity)}function le(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function lt(e){return(e=(e||0)%360)<0?e+360:e}function lr(e){return Math.max(0,Math.min(1,e||0))}function ln(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function li(e,t,r,n,i){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*r+(1+3*e+3*a-3*s)*n+s*i)/6}ok(oF,oJ,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oK,formatHex:oK,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return o7(this).formatHsl()},formatRgb:oZ,toString:oZ}),ok(o2,o1,oU(oF,{brighter(e){return e=null==e?1.428571428571428
16:Math.pow(1.4285714285714286,e),new o2(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new o2(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new o2(o6(this.r),o6(this.g),o6(this.b),o5(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:o3,formatHex:o3,formatHex8:function(){return`#${o8(this.r)}${o8(this.g)}${o8(this.b)}${o8((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:o4,toString:o4})),ok(le,function(e,t,r,n){return 1==arguments.length?o7(e):new le(e,t,r,null==n?1:n)},oU(oF,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new le(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new o2(ln(e>=240?e-240:e+120,i,n),ln(e,i,n),ln(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new le(lt(this.h),lr(this.s),lr(this.l),o5(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=o5(this.opacity);return`${1===e?"hsl(":"hsla("}${lt(this.h)}, ${100*lr(this.s)}%, ${100*lr(this.l)}%${1===e?")":`, ${e})`}`}}));let la=e=>()=>e;function ls(e,t){var r=t-e;return r?function(t){return e+t*r}:la(isNaN(e)?t:e)}let lo=function e(t){var r,n=1==(r=+t)?ls:function(e,t){var n,i,a;return t-e?(n=e,i=t,n=Math.pow(n,a=r),i=Math.pow(i,a)-n,a=1/a,function(e){return Math.pow(n+e*i,a)}):la(isNaN(e)?t:e)};function i(e,t){var r=n((e=o1(e)).r,(t=o1(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),s=ls(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1);function ll(e){return function(t){var r,n,i=t.length,a=Array(i),s=Array(i),o=Array(i);for(r=0;r<i;++r)n=o1(t[r]),a[r]=n.r||0,s[r]=n.g||0,o[r]=n.b||0;return a=e(a),s=e(s),o=e(o),n.opacity=1,function(e){return n.r=a(e),n.g=s(e),n.b=o(e),n+""}}}function lu(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}ll(function(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],s=n>0?e[n-1]:2*i-a,o=n<t-1?e[n+2]:2*a-i;return li((r-n/t)*t,s,i,a,o)}}),ll(function(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],s=e[(n+1)%t],o=e[(n+2)%t];return li((r-n/t)*t,i,a,s,o)}});var lc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ld=RegExp(lc.source,"g");function lh(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?la(t):("number"===i?lu:"string"===i?(n=oJ(t))?(t=n,lo):function(e,t){var r,n,i,a,s,o=lc.lastIndex=ld.lastIndex=0,l=-1,u=[],c=[];for(e+="",t+="";(i=lc.exec(e))&&(a=ld.exec(t));)(s=a.index)>o&&(s=t.slice(o,s),u[l]?u[l]+=s:u[++l]=s),(i=i[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,c.push({i:l,x:lu(i,a)})),o=ld.lastIndex;return o<t.length&&(s=t.slice(o),u[l]?u[l]+=s:u[++l]=s),u.length<2?c[0]?(r=c[0].x,function(e){return r(e)+""}):(n=t,function(){return n}):(t=c.length,function(e){for(var r,n=0;n<t;++n)u[(r=c[n]).i]=r.x(e);return u.join("")})}:t instanceof oJ?lo:t instanceof Date?function(e,t){var r=new Date;return e*=1,t*=1,function(n){return r.setTime(e*(1-n)+t*n),r}}:!ArrayBuffer.isView(r=t)||r instanceof DataView?Array.isArray(t)?function(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,a=Array(i),s=Array(n);for(r=0;r<i;++r)a[r]=lh(e[r],t[r]);for(;r<n;++r)s[r]=t[r];return function(e){for(r=0;r<i;++r)s[r]=a[r](e);return s}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var r,n={},i={};for(r in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)r in e?n[r]=lh(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}:lu:function(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(r=0;r<n;++r)i[r]=e[r]*(1-a)+t[r]*a;return i}})(e,t)}function lf(e,t){return e*=1,t*=1,function(r){return Math.round(e*(1-r)+t*r)}}function lp(e){return+e}var lm=[0,1];function lg(e){return e}function lv(e,t){var r;return(t-=e*=1)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r})}function ly(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i<n?(n=lv(i,n),a=r(s,a)):(n=lv(n,i),a=r(a,s)),function(e){return a(n(e))}}function lx(e,t,r){var n=Math.min(e.length,t.length)-1,i=Array(n),a=Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)i[s]=lv(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(t){var r=oD(e,t,1,n)-1;return a[r](i[r](t))}}function lb(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function l_(){var e,t,r,n,i,a,s=lm,o=lm,l=lh,u=lg;function c(){var e,t,r,l=Math.min(s.length,o.length);return u!==lg&&(e=s[0],t=s[l-1],e>t&&(r=e,e=t,t=r),u=function(r){return Math.max(e,Math.min(t,r))}),n=l>2?lx:ly,i=a=null,d}function d(t){return null==t||isNaN(t*=1)?r:(i||(i=n(s.map(e),o,l)))(e(u(t)))}return d.invert=function(r){return u(t((a||(a=n(o,s.map(e),lu)))(r)))},d.domain=function(e){return arguments.length?(s=Array.from(e,lp),c()):s.slice()},d.range=function(e){return arguments.length?(o=Array.from(e),c()):o.slice()},d.rangeRound=function(e){return o=Array.from(e),l=lf,c()},d.clamp=function(e){return arguments.length?(u=!!e||lg,c()):u!==lg},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(r=e,d):r},function(r,n){return e=r,t=n,c()}}function lS(){return l_()(lg,lg)}function lw(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function lM(e){return(e=lw(Math.abs(e)))?e[1]:NaN}var lT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lE(e){var t;if(!(t=lT.exec(e)))throw Error("invalid format: "+e);return new lA({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]})}function lA(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function lC(e,t){var r=lw(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+Array(i-n.length+2).join("0")}lE.prototype=lA.prototype,lA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?""
1:Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};let lP={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},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)=>lC(100*e,t),r:lC,s:function(e,t){var r=lw(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(o=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=n.length;return a===s?n:a>s?n+Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+Array(1-a).join("0")+lw(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function lI(e){return e}var lO=Array.prototype.map,lR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lL(e,t,r,n){var i,a,s=oC(e,t,r);switch((n=lE(null==n?",f":n)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(a=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(lM(o)/3)))-lM(Math.abs(s))))||(n.precision=a),c(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(a=Math.max(0,lM(Math.abs(Math.max(Math.abs(e),Math.abs(t)))-(i=Math.abs(i=s)))-lM(i))+1)||(n.precision=a-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(a=Math.max(0,-lM(Math.abs(s))))||(n.precision=a-("%"===n.type)*2)}return u(n)}function lN(e){var t=e.domain;return e.ticks=function(e){var r=t();return oE(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return lL(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,a=t(),s=0,o=a.length-1,l=a[s],u=a[o],c=10;for(u<l&&(i=l,l=u,u=i,i=s,s=o,o=i);c-- >0;){if((i=oA(l,u,r))===n)return a[s]=l,a[o]=u,t(a);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else if(i<0)l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i;else break;n=i}return e},e}function lD(){var e=lS();return e.copy=function(){return lb(e,lD())},of.apply(e,arguments),lN(e)}function lk(e){var t;function r(e){return null==e||isNaN(e*=1)?t:e}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(e=Array.from(t,lp),r):e.slice()},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return lk(e).unknown(t)},e=arguments.length?Array.from(e,lp):[0,1],lN(r)}function lU(e,t){e=e.slice();var r,n=0,i=e.length-1,a=e[n],s=e[i];return s<a&&(r=n,n=i,i=r,r=a,a=s,s=r),e[n]=t.floor(a),e[i]=t.ceil(s),e}function lF(e){return Math.log(e)}function lz(e){return Math.exp(e)}function lj(e){return-Math.log(-e)}function lB(e){return-Math.exp(-e)}function lV(e){return isFinite(e)?+("1e"+e):e<0?0:e}function lG(e){return(t,r)=>-e(-t,r)}function lH(e){let t,r,n=e(lF,lz),i=n.domain,a=10;function s(){var s,o;return t=(s=a)===Math.E?Math.log:10===s&&Math.log10||2===s&&Math.log2||(s=Math.log(s),e=>Math.log(e)/s),r=10===(o=a)?lV:o===Math.E?Math.exp:e=>Math.pow(o,e),i()[0]<0?(t=lG(t),r=lG(r),e(lj,lB)):e(lF,lz),n}return n.base=function(e){return arguments.length?(a=+e,s()):a},n.domain=function(e){return arguments.length?(i(e),s()):i()},n.ticks=e=>{let n,s,o=i(),l=o[0],u=o[o.length-1],c=u<l;c&&([l,u]=[u,l]);let d=t(l),h=t(u),f=null==e?10:+e,p=[];if(!(a%1)&&h-d<f){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(n=1;n<a;++n)if(!((s=d<0?n/r(-d):n*r(d))<l)){if(s>u)break;p.push(s)}}else for(;d<=h;++d)for(n=a-1;n>=1;--n)if(!((s=d>0?n/r(-d):n*r(d))<l)){if(s>u)break;p.push(s)}2*p.length<f&&(p=oE(l,u,f))}else p=oE(d,h,Math.min(h-d,f)).map(r);return c?p.reverse():p},n.tickFormat=(e,i)=>{if(null==e&&(e=10),null==i&&(i=10===a?"s":","),"function"!=typeof i&&(a%1||null!=(i=lE(i)).precision||(i.trim=!0),i=u(i)),e===1/0)return i;let s=Math.max(1,a*e/n.ticks().length);return e=>{let n=e/r(Math.round(t(e)));return n*a<a-.5&&(n*=a),n<=s?i(e):""}},n.nice=()=>i(lU(i(),{floor:e=>r(Math.floor(t(e))),ceil:e=>r(Math.ceil(t(e)))})),n}function lW(){let e=lH(l_()).domain([1,10]);return e.copy=()=>lb(e,lW()).base(e.base()),of.apply(e,arguments),e}
1function lX(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function lq(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function lY(e){var t=1,r=e(lX(1),lq(t));return r.constant=function(r){return arguments.length?e(lX(t=+r),lq(t)):t},lN(r)}function l$(){var e=lY(l_());return e.copy=function(){return lb(e,l$()).constant(e.constant())},of.apply(e,arguments)}function lK(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function lZ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lJ(e){return e<0?-e*e:e*e}function lQ(e){var t=e(lg,lg),r=1;return t.exponent=function(t){return arguments.length?1==(r=+t)?e(lg,lg):.5===r?e(lZ,lJ):e(lK(r),lK(1/r)):r},lN(t)}function l0(){var e=lQ(l_());return e.copy=function(){return lb(e,l0()).exponent(e.exponent())},of.apply(e,arguments),e}function l1(){return l0.apply(null,arguments).exponent(.5)}function l2(e){return Math.sign(e)*e*e}function l3(){var e,t=lS(),r=[0,1],n=!1;function i(r){var i,a=Math.sign(i=t(r))*Math.sqrt(Math.abs(i));return isNaN(a)?e:n?Math.round(a):a}return i.invert=function(e){return t.invert(l2(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain()},i.range=function(e){return arguments.length?(t.range((r=Array.from(e,lp)).map(l2)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(e){return arguments.length?(t.clamp(e),i):t.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return l3(t.domain(),r).round(n).clamp(t.clamp()).unknown(e)},of.apply(i,arguments),lN(i)}function l4(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function l5(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function l6(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:+(e>t))}function l8(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function l9(){var e,t=[],r=[],n=[];function i(){var e=0,i=Math.max(1,r.length);for(n=Array(i-1);++e<i;)n[e-1]=function(e,t,r=oL){if(!(!(n=e.length)||isNaN(t*=1))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e);return s+(r(e[a+1],a+1,e)-s)*(i-a)}}(t,e/i);return a}function a(t){return null==t||isNaN(t*=1)?e:r[oD(n,t)]}return a.invertExtent=function(e){var i=r.indexOf(e);return i<0?[NaN,NaN]:[i>0?n[i-1]:t[0],i<n.length?n[i]:t[t.length-1]]},a.domain=function(e){if(!arguments.length)return t.slice();for(let r of(t=[],e))null==r||isNaN(r*=1)||t.push(r);return t.sort(oP),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(t){return arguments.length?(e=t,a):e},a.quantiles=function(){return n.slice()},a.copy=function(){return l9().domain(t).range(r).unknown(e)},of.apply(a,arguments)}function l7(){var e,t=0,r=1,n=1,i=[.5],a=[0,1];function s(t){return null!=t&&t<=t?a[oD(i,t,0,n)]:e}function o(){var e=-1;for(i=Array(n);++e<n;)i[e]=((e+1)*r-(e-n)*t)/(n+1);return s}return s.domain=function(e){return arguments.length?([t,r]=e,t*=1,r*=1,o()):[t,r]},s.range=function(e){return arguments.length?(n=(a=Array.from(e)).length-1,o()):a.slice()},s.invertExtent=function(e){var s=a.indexOf(e);return s<0?[NaN,NaN]:s<1?[t,i[0]]:s>=n?[i[n-1],r]:[i[s-1],i[s]]},s.unknown=function(t){return arguments.length&&(e=t),s},s.thresholds=function(){return i.slice()},s.copy=function(){return l7().domain([t,r]).range(a).unknown(e)},of.apply(lN(s),arguments)}function ue(){var e,t=[.5],r=[0,1],n=1;function i(i){return null!=i&&i<=i?r[oD(t,i,0,n)]:e}return i.domain=function(e){return arguments.length?(n=Math.min((t=Array.from(e)).length,r.length-1),i):t.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),n=Math.min(t.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var n=r.indexOf(e);return[t[n-1],t[n]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return ue().domain(t).range(r).unknown(e)},of.apply(i,arguments)}u=(l=function(e){var t,r,n,i=void 0===e.grouping||void 0===e.thousands?lI:(t=lO.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(e.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(r)}),a=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",l=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?lI:(n=lO.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return n[+e]})}),c=void 0===e.percent?"%":e.percent+"",d=void 0===e.minus?"â":e.minus+"",h=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=lE(e)).fill,r=e.align,n=e.sign,f=e.symbol,p=e.zero,m=e.width,g=e.comma,v=e.precision,y=e.trim,x=e.type;"n"===x?(g=!0,x="g"):lP[x]||(void 0===v&&(v=12),y=!0,x="g"),(p||"0"===t&&"="===r)&&(p=!0,t="0",r="=");var b="$"===f?a:"#"===f&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",_="$"===f?s:/[%p]/.test(x)?c:"",S=lP[x],w=/[defgprs%]/.test(x);function M(e){var a,s,c,f=b,M=_;if("c"===x)M=S(e)+M,e="";else{var T=(e*=1)<0||1/e<0;
vendor: 12,372 bytes, line 1
1if(e=isNaN(e)?h:S(Math.abs(e),v),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),T&&0==+e&&"+"!==n&&(T=!1),f=(T?"("===n?n:d:"-"===n||"("===n?"":n)+f,M=("s"===x?lR[8+o/3]:"")+M+(T&&"("===n?")":""),w){for(a=-1,s=e.length;++a<s;)if(48>(c=e.charCodeAt(a))||c>57){M=(46===c?l+e.slice(a+1):e.slice(a))+M,e=e.slice(0,a);break}}}g&&!p&&(e=i(e,1/0));var E=f.length+e.length+M.length,A=E<m?Array(m-E+1).join(t):"";switch(g&&p&&(e=i(A+e,A.length?m-M.length:1/0),A=""),r){case"<":e=f+e+M+A;break;case"=":e=f+A+e+M;break;case"^":e=A.slice(0,E=A.length>>1)+f+e+M+A.slice(E);break;default:e=A+f+e+M}return u(e)}return v=void 0===v?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),M.toString=function(){return e+""},M}return{format:f,formatPrefix:function(e,t){var r=f(((e=lE(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(lM(t)/3))),i=Math.pow(10,-n),a=lR[8+n/3];return function(e){return r(i*e)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,c=l.formatPrefix;let ut=new Date,ur=new Date;function un(e,t,r,n){function i(t){return e(t=0==arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=r=>(e(r=new Date(r-1)),t(r,1),e(r),r),i.round=e=>{let t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=(e,r)=>(t(e=new Date(+e),null==r?1:Math.floor(r)),e),i.range=(r,n,a)=>{let s,o=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r<n)||!(a>0))return o;do o.push(s=new Date(+r)),t(r,a),e(r);while(s<r&&r<n)return o},i.filter=r=>un(t=>{if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)},(e,n)=>{if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}),r&&(i.count=(t,n)=>(ut.setTime(+t),ur.setTime(+n),e(ut),e(ur),Math.floor(r(ut,ur))),i.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?i.filter(n?t=>n(t)%e==0:t=>i.count(0,t)%e==0):i:null),i}let ui=un(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());ui.every=e=>isFinite(e=Math.floor(e))&&e>0?un(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}):null,ui.range;let ua=un(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());ua.every=e=>isFinite(e=Math.floor(e))&&e>0?un(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null,ua.range;let us=un(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());us.range;let uo=un(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());uo.range;function ul(e){return un(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}let uu=ul(0),uc=ul(1),ud=ul(2),uh=ul(3),uf=ul(4),up=ul(5),um=ul(6);function ug(e){return un(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}uu.range,uc.range,ud.range,uh.range,uf.range,up.range,um.range;let uv=ug(0),uy=ug(1),ux=ug(2),ub=ug(3),u_=ug(4),uS=ug(5),uw=ug(6);uv.range,uy.range,ux.range,ub.range,u_.range,uS.range,uw.range;let uM=un(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1);uM.range;let uT=un(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1);uT.range;let uE=un(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5));uE.range;let uA=un(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours());uA.range;let uC=un(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours());uC.range;let uP=un(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes());uP.range;let uI=un(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes());uI.range;let uO=un(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds());uO.range;let uR=un(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);function uL(e,t,r,n,i,a){let s=[[uO,1,1e3],[uO,5,5e3],[uO,15,15e3],[uO,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,864e5],[n,2,1728e5],[r,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function o(t,r,n){let i=Math.abs(r-t)/n,a=oO(([,,e])=>e).right(s,i);if(a===s.length)return e.every(oC(t/31536e6,r/31536e6,n));if(0===a)return uR.every(Math.max(oC(t,r,n),1));let[o,l]=s[i/s[a-1][2]<s[a][2]/i?a-1:a];return o.every(l)}return[function(e,t,r){let n=t<e;n&&([e,t]=[t,e]);let i=r&&"function"==typeof r.range?r:o(e,t,r),a=i?i.range(e,+t+1):[];return n?a.reverse():a},o]}uR.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?un(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):uR:null,uR.range;let[uN,uD]=uL(ua,uo,uv,uE,uC,uI),[uk,uU]=uL(ui,us,uu,uM,uA,uP);function uF(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 uz(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 uj(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}var uB={"-":"",_:" ",0:"0"},uV=/^\s*\d+/,uG=/^%/,uH=/[\\^$*+?|[\]().{}]/g;function uW(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?Array(r-a+1).join(t)+i:i)}function uX(e){return e.replace(uH,"\\$&")}function uq(e){return RegExp("^(?:"+e.map(uX).join("|")+")","i")}function uY(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function u$(e,t,r){var n=uV.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function uK(e,t,r){var n=uV.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function uZ(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function uJ(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function uQ(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function u0(e,t,r){var n=uV.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function u1(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function u2(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function u3(e,t,r){var n=uV.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function u4(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function u5(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function u6(e,t,r){var n=uV.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function u8(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function u9(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function u7(e,t,r){var n=uV.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function ce(e,t,r){var n=uV.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ct(e,t,r){var n=uV.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function cr(e,t,r){var n=uG.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function cn(e,t,r){var n=uV.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function ci(e,t,r){var n=uV.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function ca(e,t){return uW(e.getDate(),t,2)}function cs(e,t){return uW(e.getHours(),t,2)}function co(e,t){return uW(e.getHours()%12||12,t,2)}function cl(e,t){return uW(1+uM.count(ui(e),e),t,3)}function cu(e,t){return uW(e.getMilliseconds(),t,3)}function cc(e,t){return cu(e,t)+"000"}function cd(e,t){return uW(e.getMonth()+1,t,2)}function ch(e,t){return uW(e.getMinutes(),t,2)}function cf(e,t){return uW(e.getSeconds(),t,2)}function cp(e){var t=e.getDay();return 0===t?7:t}function cm(e,t){return uW(uu.count(ui(e)-1,e),t,2)}function cg(e){var t=e.getDay();return t>=4||0===t?uf(e):uf.ceil(e)}function cv(e,t){return e=cg(e),uW(uf.count(ui(e),e)+(4===ui(e).getDay()),t,2)}function cy(e){return e.getDay()}function cx(e,t){return uW(uc.count(ui(e)-1,e),t,2)}function cb(e,t){return uW(e.getFullYear()%100,t,2)}function c_(e,t){return uW((e=cg(e)).getFullYear()%100,t,2)}function cS(e,t){return uW(e.getFullYear()%1e4,t,4)}function cw(e,t){var r=e.getDay();return uW((e=r>=4||0===r?uf(e):uf.ceil(e)).getFullYear()%1e4,t,4)}function cM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+uW(t/60|0,"0",2)+uW(t%60,"0",2)}function cT(e,t){return uW(e.getUTCDate(),t,2)}function cE(e,t){return uW(e.getUTCHours(),t,2)}function cA(e,t){return uW(e.getUTCHours()%12||12,t,2)}function cC(e,t){return uW(1+uT.count(ua(e),e),t,3)}function cP(e,t){return uW(e.getUTCMilliseconds(),t,3)}function cI(e,t){return cP(e,t)+"000"}function cO(e,t){return uW(e.getUTCMonth()+1,t,2)}function cR(e,t){return uW(e.getUTCMinutes(),t,2)}function cL(e,t){return uW(e.getUTCSeconds(),t,2)}function cN(e){var t=e.getUTCDay();return 0===t?7:t}function cD(e,t){return uW(uv.count(ua(e)-1,e),t,2)}function ck(e){var t=e.getUTCDay();return t>=4||0===t?u_(e):u_.ceil(e)}function cU(e,t){return e=ck(e),uW(u_.count(ua(e),e)+(4===ua(e).getUTCDay()),t,2)}function cF(e){return e.getUTCDay()}function cz(e,t){return uW(uy.count(ua(e)-1,e),t,2)}function cj(e,t){return uW(e.getUTCFullYear()%100,t,2)}function cB(e,t){return uW((e=ck(e)).getUTCFullYear()%100,t,2)}function cV(e,t){return uW(e.getUTCFullYear()%1e4,t,4)}function cG(e,t){var r=e.getUTCDay();return uW((e=r>=4||0===r?u_(e):u_.ceil(e)).getUTCFullYear()%1e4,t,4)}function cH(){return"+0000"}function cW(){return"%"}function cX(e){return+e}function cq(e){return Math.floor(e/1e3)}function cY(e){return new Date(e)}function c$(e){return e instanceof Date?+e:+new Date(+e)}function cK(e,t,r,n,i,a,s,o,l,u){var c=lS(),d=c.invert,h=c.domain,f=u(".%L"),p=u(":%S"),m=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),y=u("%b %d"),x=u("%B"),b=u("%Y");function _(e){return(l(e)<e?f:o(e)<e?p:s(e)<e?m:a(e)<e?g:n(e)<e?i(e)<e?v:y:r(e)<e?x:b)(e)}return c.invert=function(e){return new Date(d(e))},c.domain=function(e){return arguments.length?h(Array.from(e,c$)):h().map(cY)},c.ticks=function(t){var r=h();return e(r[0],r[r.length-1],null==t?10:t)},c.tickFormat=function(e,t){return null==t?_:u(t)},c.nice=function(e){var r=h();return e&&"function"==typeof e.range||(e=t(r[0],r[r.length-1],null==e?10:e)),e?h(lU(r,e)):c},c.copy=function(){return lb(c,cK(e,t,r,n,i,a,s,o,l,u))},c}function cZ(){return of.apply(cK(uk,uU,ui,us,uu,uM,uA,uP,uO,h).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function cJ(){return of.apply(cK(uN,uD,ua,uo,uv,uT,uC,uI,uO,f).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cQ(){var e,t,r,n,i,a=0,s=1,o=lg,l=!1;function u(t){return null==t||isNaN(t*=1)?i:o(0===r?.5:(t=(n(t)-e)*r,l?Math.max(0,Math.min(1,t)):t))}function c(e){return function(t){var r,n;return arguments.length?([r,n]=t,o=e(r,n),u):[o(0),o(1)]}}return u.domain=function(i){return arguments.length?([a,s]=i,e=n(a*=1),t=n(s*=1),r=e===t?0:1/(t-e),u):[a,s]},u.clamp=function(e){return arguments.length?(l=!!e,u):l},u.interpolator=function(e){return arguments.length?(o=e,u):o},u.range=c(lh),u.rangeRound=c(lf),u.unknown=function(e){return arguments.length?(i=e,u):i},function(i){return n=i,e=i(a),t=i(s),r=e===t?0:1/(t-e),u}}function c0(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function c1(){var e=lN(cQ()(lg));return e.copy=function(){return c0(e,c1())},op.apply(e,arguments)}
1function c2(){var e=lH(cQ()).domain([1,10]);return e.copy=function(){return c0(e,c2()).base(e.base())},op.apply(e,arguments)}function c3(){var e=lY(cQ());return e.copy=function(){return c0(e,c3()).constant(e.constant())},op.apply(e,arguments)}function c4(){var e=lQ(cQ());return e.copy=function(){return c0(e,c4()).exponent(e.exponent())},op.apply(e,arguments)}function c5(){return c4.apply(null,arguments).exponent(.5)}function c6(){var e=[],t=lg;function r(r){if(null!=r&&!isNaN(r*=1))return t((oD(e,r,1)-1)/(e.length-1))}return r.domain=function(t){if(!arguments.length)return e.slice();for(let r of(e=[],t))null==r||isNaN(r*=1)||e.push(r);return e.sort(oP),r},r.interpolator=function(e){return arguments.length?(t=e,r):t},r.range=function(){return e.map((r,n)=>t(n/(e.length-1)))},r.quantiles=function(t){return Array.from({length:t+1},(r,n)=>(function(e,t){if(!(!(r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(yield t);else{let r=-1;for(let n of e)null!=(n=t(n,++r,e))&&(n*=1)>=n&&(yield n)}}(e,void 0))).length)||isNaN(t*=1))){if(t<=0||r<2)return l5(e);if(t>=1)return l4(e);var r,n=(r-1)*t,i=Math.floor(n),a=l4((function e(t,r,n=0,i=1/0,a){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(t.length-1,i)),!(n<=r&&r<=i))return t;for(a=void 0===a?l6:function(e=oP){if(e===oP)return l6;if("function"!=typeof e)throw TypeError("compare is not a function");return(t,r)=>{let n=e(t,r);return n||0===n?n:(0===e(r,r))-(0===e(t,t))}}(a);i>n;){if(i-n>600){let s=i-n+1,o=r-n+1,l=Math.log(s),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(s-u)/s)*(o-s/2<0?-1:1),d=Math.max(n,Math.floor(r-o*u/s+c)),h=Math.min(i,Math.floor(r+(s-o)*u/s+c));e(t,r,d,h,a)}let s=t[r],o=n,l=i;for(l8(t,n,r),a(t[i],s)>0&&l8(t,n,i);o<l;){for(l8(t,o,l),++o,--l;0>a(t[o],s);)++o;for(;a(t[l],s)>0;)--l}0===a(t[n],s)?l8(t,n,l):l8(t,++l,i),l<=r&&(n=l+1),r<=l&&(i=l-1)}return t})(e,i).subarray(0,i+1));return a+(l5(e.subarray(i+1))-a)*(n-i)}})(e,n/t))},r.copy=function(){return c6(t).domain(e)},op.apply(r,arguments)}function c8(){var e,t,r,n,i,a,s,o=0,l=.5,u=1,c=1,d=lg,h=!1;function f(e){return isNaN(e*=1)?s:(e=.5+((e=+a(e))-t)*(c*e<c*t?n:i),d(h?Math.max(0,Math.min(1,e)):e))}function p(e){return function(t){var r,n,i;return arguments.length?([r,n,i]=t,d=function(e,t){void 0===t&&(t=e,e=lh);for(var r=0,n=t.length-1,i=t[0],a=Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(e){var t=Math.max(0,Math.min(n-1,Math.floor(e*=n)));return a[t](e-t)}}(e,[r,n,i]),f):[d(0),d(.5),d(1)]}}return f.domain=function(s){return arguments.length?([o,l,u]=s,e=a(o*=1),t=a(l*=1),r=a(u*=1),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),c=t<e?-1:1,f):[o,l,u]},f.clamp=function(e){return arguments.length?(h=!!e,f):h},f.interpolator=function(e){return arguments.length?(d=e,f):d},f.range=p(lh),f.rangeRound=p(lf),f.unknown=function(e){return arguments.length?(s=e,f):s},function(s){return a=s,e=s(o),t=s(l),r=s(u),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),c=t<e?-1:1,f}}function c9(){var e=lN(c8()(lg));return e.copy=function(){return c0(e,c9())},op.apply(e,arguments)}function c7(){var e=lH(c8()).domain([.1,1,10]);return e.copy=function(){return c0(e,c7()).base(e.base())},op.apply(e,arguments)}function de(){var e=lY(c8());return e.copy=function(){return c0(e,de()).constant(e.constant())},op.apply(e,arguments)}function dt(){var e=lQ(c8());return e.copy=function(){return c0(e,dt()).exponent(e.exponent())},op.apply(e,arguments)}function dr(){return dt.apply(null,arguments).exponent(.5)}h=(d=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=uq(i),c=uY(i),d=uq(a),h=uY(a),f=uq(s),p=uY(s),m=uq(o),g=uY(o),v=uq(l),y=uY(l),x={a:function(e){return s[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return o[e.getMonth()]},c:null,d:ca,e:ca,f:cc,g:c_,G:cw,H:cs,I:co,j:cl,L:cu,m:cd,M:ch,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:cX,s:cq,S:cf,u:cp,U:cm,V:cv,w:cy,W:cx,x:null,X:null,y:cb,Y:cS,Z:cM,"%":cW},b={a:function(e){return s[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return o[e.getUTCMonth()]},c:null,d:cT,e:cT,f:cI,g:cB,G:cG,H:cE,I:cA,j:cC,L:cP,m:cO,M:cR,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:cX,s:cq,S:cL,u:cN,U:cD,V:cU,w:cF,W:cz,x:null,X:null,y:cj,Y:cV,Z:cH,"%":cW},_={a:function(e,t,r){var n=f.exec(t.slice(r));return n?(e.w=p.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(e,t,r){var n=d.exec(t.slice(r));return n?(e.w=h.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(e,t,r){var n=v.exec(t.slice(r));return n?(e.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(e,t,r){var n=m.exec(t.slice(r));return n?(e.m=g.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(e,r,n){return M(e,t,r,n)},d:u5,e:u5,f:ct,g:u1,G:u0,H:u8,I:u8,j:u6,L:ce,m:u4,M:u9,p:function(e,t,r){var n=u.exec(t.slice(r));return n?(e.p=c.get(n[0].toLowerCase()),r+n[0].length):-1},q:u3,Q:cn,s:ci,S:u7,u:uK,U:uZ,V:uJ,w:u$,W:uQ,x:function(e,t,n){return M(e,r,t,n)},X:function(e,t,r){return M(e,n,t,r)},y:u1,Y:u0,Z:u2,"%":cr};function S(e,t){return function(r){var n,i,a,s=[],o=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++o<u;)37===e.charCodeAt(o)&&(s.push(e.slice(l,o)),null!=(i=uB[n=e.charAt(++o)])?n=e.charAt(++o):i="e"===n?" ":"0",(a=t[n])&&(n=a(r,i)),s.push(n),l=o+1);return s.push(e.slice(l,o)),s.join("")}}function w(e,t){return function(r){var n,i,a=uj(1900,void 0,1);if(M(a,e,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!t||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(n=(i=(n=uz(uj(a.y,0,1))).getUTCDay())>4||0===i?uy.ceil(n):uy(n),n=uT.offset(n,(a.V-1)*7),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(n=(i=(n=uF(uj(a.y,0,1))).getDay())>4||0===i?uc.ceil(n):uc(n),n=uM.offset(n,(a.V-1)*7),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:+("W"in a)),i="Z"in a?uz(uj(a.y,0,1)).getUTCDay():uF(uj(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,uz(a)):uF(a)}}function M(e,t,r,n){for(var i,a,s=0,o=t.length,l=r.length;s<o;){if(n>=l)return -1;if(37===(i=t.charCodeAt(s++))){if(!(a=_[(i=t.charAt(s++))in uB?t.charAt(s++):i])||(n=a(e,r,n))<0)return -1}else if(i!=r.charCodeAt(n++))return -1}return n}return x.x=S(r,x),x.X=S(n,x),x.c=S(t,x),b.x=S(r,b),b.X=S(n,b),b.c=S(t,b),{format:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},parse:function(e){var t=w(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=w(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","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"]})).format,d.parse,f=d.utcFormat,d.utcParse,e.s(["scaleBand",0,ob,"scaleDiverging",0,c9,"scaleDivergingLog",0,c7,"scaleDivergingPow",0,dt,"scaleDivergingSqrt",0,dr,"scaleDivergingSymlog",0,de,"scaleIdentity",0,lk,"scaleImplicit",0,oy,"scaleLinear",0,lD,"scaleLog",0,lW,"scaleOrdinal",0,ox,"scalePoint",0,o_,"scalePow",0,l0,"scaleQuantile",0,l9,"scaleQuantize",0,l7,"scaleRadial",0,l3,"scaleSequential",0,c1,"scaleSequentialLog",0,c2,"scaleSequentialPow",0,c4,"scaleSequentialQuantile",0,c6,"scaleSequentialSqrt",0,c5,"scaleSequentialSymlog",0,c3,"scaleSqrt",0,l1,"scaleSymlog",0,l$,"scaleThreshold",0,ue,"scaleTime",0,cZ,"scaleUtc",0,cJ,"tickFormat",0,lL],29061),e.i(29061),e.s(["scaleBand",0,ob,"scaleDiverging",0,c9,"scaleDivergingLog",0,c7,"scaleDivergingPow",0,dt,"scaleDivergingSqrt",0,dr,"scaleDivergingSymlog",0,de,"scaleIdentity",0,lk,"scaleImplicit",0,oy,"scaleLinear",0,lD,"scaleLog",0,lW,"scaleOrdinal",0,ox,"scalePoint",0,o_,"scalePow",0,l0,"scaleQuantile",0,l9,"scaleQuantize",0,l7,"scaleRadial",0,l3,"scaleSequential",0,c1,"scaleSequentialLog",0,c2,"scaleSequentialPow",0,c4,"scaleSequentialQuantile",0,c6,"scaleSequentialSqrt",0,c5,"scaleSequentialSymlog",0,c3,"scaleSqrt",0,l1,"scaleSymlog",0,l$,"scaleThreshold",0,ue,"scaleTime",0,cZ,"scaleUtc",0,cJ,"tickFormat",0,lL],79357);var dn=e.i(79357);function di(e,t,r){if("function"==typeof e)return e.copy().domain(t).range(r);if(null!=e){var n=function(e){if(e in dn&&"function"==typeof dn[e])return dn[e]();var t="scale".concat(eo(e));if(t in dn&&"function"==typeof dn[t])return dn[t]()}(e);if(null!=n)return n.domain(t).range(r),n}}function da(e,t,r,n){if(null!=r&&null!=n)return"function"==typeof e.scale?di(e.scale,r,n):di(t,r,n)}var ds=(e,t,r)=>{if(null!=e){var n=e.scale,i=e.type;if("auto"===n)return"category"===i&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>
1=0||r.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear";if("string"==typeof n)return"scale".concat(eo(n))in dn?n:"point"}};function dl(e,t){if(e){var r=null!=t?t:e.domain(),n=r.map(t=>{var r;return null!=(r=e(t))?r:0}),i=e.range();if(0!==r.length&&!(i.length<2))return e=>{var t,i,a=function(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var a=Math.floor((r+n)/2);(i?e[a]<t:e[a]>t)?r=a+1:n=a}return r}(n,e);return a<=0?r[0]:a>=r.length?r[r.length-1]:Math.abs(e-(null!=(t=n[a-1])?t:0))<=Math.abs(e-(null!=(i=n[a])?i:0))?r[a-1]:r[a]}}}function du(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?du(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):du(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function dd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return dh(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dh(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var df=[0,"auto"],dp={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},dm=(e,t)=>e.cartesianAxis.xAxis[t],dg=(e,t)=>{var r=dm(e,t);return null==r?dp:r},dv={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:df,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:60},dy=(e,t)=>e.cartesianAxis.yAxis[t],dx=(e,t)=>{var r=dy(e,t);return null==r?dv:r},db={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},d_=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return null==r?db:r},dS=(e,t,r)=>{switch(t){case"xAxis":return dg(e,r);case"yAxis":return dx(e,r);case"zAxis":return d_(e,r);case"angleAxis":return iK(e,r);case"radiusAxis":return iZ(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},dw=(e,t,r)=>{switch(t){case"xAxis":return dg(e,r);case"yAxis":return dx(e,r);case"angleAxis":return iK(e,r);case"radiusAxis":return iZ(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},dM=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function dT(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var dE=e=>e.graphicalItems.cartesianItems,dA=nC([oi,oa],dT),dC=(e,t,r)=>e.filter(r).filter(e=>(null==t?void 0:t.includeHidden)===!0||!e.hide),dP=nC([dE,dS,dA],dC,{memoizeOptions:{resultEqualityCheck:i6}}),dI=nC([dP],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(ol)),dO=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),dR=nC([dP],dO),dL=e=>e.map(e=>
1e.data).filter(Boolean).flat(1),dN=nC([dP],e=>e.some(e=>!e.data)),dD=nC([dP],dL,{memoizeOptions:{resultEqualityCheck:i6}}),dk=(e,t)=>{var r=t.chartData,n=t.dataStartIndex,i=t.dataEndIndex;return e.length>0?e:(void 0===r?[]:r).slice(n,i+1)},dU=nC([dD,sV],dk),dF=(e,t,r,n,i,a)=>{var s=n.chartData,o=n.dataStartIndex,l=n.dataEndIndex,u=(null==t?void 0:t.dataKey)!=null?e.map(e=>({value:nW(e,t.dataKey)})):r.length>0?r.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:nW(e,t)}))):e.map(e=>({value:e}));return i&&(null==t?void 0:t.dataKey)!=null&&a.length>0?[...(void 0===s?[]:s).slice(o,l+1).map(e=>({value:nW(e,t.dataKey)})).filter(e=>null!=e.value),...u]:u},dz=nC([dU,dS,dP,sV,dN,dD],dF);function dj(e){if(Q(e)||e instanceof Date){var t=Number(e);if(eR(t))return t}}function dB(e){if(Array.isArray(e)){var t=[dj(e[0]),dj(e[1])];return sq(t)?t:void 0}var r=dj(e);if(null!=r)return[r,r]}function dV(e){return e.map(dj).filter(el)}function dG(e,t){var r=dj(e),n=dj(t);return null==r&&null==n?0:null==r?-1:null==n?1:r-n}var dH=nC([dz],e=>null==e?void 0:e.map(e=>e.value).sort(dG));function dW(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var dX=e=>{var t=oc(e),r=od(e);return dw(e,t,r)},dq=nC([dX],e=>null==e?void 0:e.dataKey),dY=nC([dI,sV,dX],oo),d$=(e,t,r,n)=>Object.fromEntries(Object.entries(t.reduce((e,t)=>{if(null==t.stackId)return e;var r=e[t.stackId];return null==r&&(r=[]),r.push(t),e[t.stackId]=r,e},{})).map(t=>{var i=dd(t,2),a=i[0],s=i[1],o=n?[...s].reverse():s;return[a,{stackedData:n$(e,o.map(os),r),graphicalItems:o}]})),dK=nC([dY,dI,s9,s7],d$),dZ=(e,t,r,n)=>{var i=t.dataStartIndex,a=t.dataEndIndex;if(null==n&&"zAxis"!==r)return nK(e,i,a)},dJ=nC([dS],e=>e.allowDataOverflow),dQ=e=>{var t;if(null==e||!("domain"in e))return df;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var r=dV(e.ticks);return[Math.min(...r),Math.max(...r)]}if("category"===e.type)return e.ticks.map(String)}return null!=(t=null==e?void 0:e.domain)?t:df},d0=nC([dS],dQ),d1=nC([d0,dJ],s$),d2=nC([dK,sj,oi,d1],dZ,{memoizeOptions:{resultEqualityCheck:ou}}),d3=e=>e.errorBars,d4=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);if(0!==n.length){var i=n.flat();return[Math.min(...i),Math.max(...i)]}},d5=function(e,t,r,n,i){var a,s,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];if(r.length>0&&r.forEach(e=>{var r,l=null!=e.data?[...e.data]:o,u=null==(r=n[e.id])?void 0:r.filter(e=>dW(i,e));l.forEach(r=>{var n,i=nW(r,null!=(n=t.dataKey)?n:e.dataKey),o=function(e,t,r){if(!r||!r.length)return[];if("number"!=typeof t||K(t)){if(Array.isArray(t)){var n,i=dV(t);i.length>0&&(n=Math.max(...i))}}else n=t;return null==n?[]:dV(r.flatMap(t=>{var r,i,a=nW(e,t.dataKey);if(Array.isArray(a)){var s=dd(a,2);r=s[0],i=s[1]}else r=i=a;if(eR(r)&&eR(i))return[n-r,n+i]}))}(r,i,u);if(o.length>=2){var l=Math.min(...o),c=Math.max(...o);(null==a||l<a)&&(a=l),(null==s||c>s)&&(s=c)}var d=dB(i);null!=d&&(a=null==a?d[0]:Math.min(a,d[0]),s=null==s?d[1]:Math.max(s,d[1]))})}),(null==t?void 0:t.dataKey)!=null&&0===r.length&&e.forEach(e=>{var r=dB(nW(e,t.dataKey));null!=r&&(a=null==a?r[0]:Math.min(a,r[0]),s=null==s?r[1]:Math.max(s,r[1]))}),eR(a)&&eR(s))return[a,s]},d6=nC([dU,dS,dR,d3,oi,sG],d5,{memoizeOptions:{resultEqualityCheck:ou}});function d8(e){var t=e.value;if(Q(t)||t instanceof Date)return t}var d9=e=>e.referenceElements.dots,d7=(e,t,r)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===r:e.yAxisId===r),he=nC([d9,oi,oa],d7),ht=e=>e.referenceElements.areas,hr=nC([ht,oi,oa],d7),hn=e=>e.referenceElements.lines,hi=nC([hn,oi,oa],d7),ha=(e,t)=>{if(null!=e){var r=dV(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},hs=nC(he,oi,ha),ho=(e,t)=>{if(null!=e){var r=dV(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},hl=nC([hr,oi],ho),hu=(e,t)=>{if(null!=e){var r=e.flatMap(e=>"xAxis"===t?function(e){if(null!=e.x)return dV([e.x]);var t,r=null==(t=e.segment)?void 0:t.map(e=>e.x);return null==r||0===r.length?[]:dV(r)}(e):function(e){if(null!=e.y)return dV([e.y]);var t,r=null==(t=e.segment)?void 0:t.map(e=>e.y);return null==r||0===r.length?[]:dV(r)}(e));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},hc=nC([hi,oi],hu),hd=nC(hs,hc,hl,(e,t,r)=>d4(e,r,t)),hh=(e,t,r,n,i,a,s,o,l)=>{if(null!=r)return r;var u="vertical"===s&&"xAxis"===o||"horizontal"===s&&"yAxis"===o?d4(n,a,i):d4(a,i),c=function(e,t,r){if(r||null!=t){if("function"==typeof e&&null!=t)try{var n=e(t,r);
1if(sq(n))return sY(n,t,r)}catch(e){}if(Array.isArray(e)&&2===e.length){var i,a,s=sW(e,2),o=s[0],l=s[1];if("auto"===o)null!=t&&(i=Math.min(...t));else if(J(o))i=o;else if("function"==typeof o)try{null!=t&&(i=o(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof o&&nZ.test(o)){var u=nZ.exec(o);if(null==u||null==u[1]||null==t)i=void 0;else{var c=+u[1];i=t[0]-c}}else i=null==t?void 0:t[0];if("auto"===l)null!=t&&(a=Math.max(...t));else if(J(l))a=l;else if("function"==typeof l)try{null!=t&&(a=l(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof l&&nJ.test(l)){var d=nJ.exec(l);if(null==d||null==d[1]||null==t)a=void 0;else{var h=+d[1];a=t[1]+h}}else a=null==t?void 0:t[1];var f=[i,a];if(sq(f))return null==t?f:sY(f,t,r)}}}(t,u,e.allowDataOverflow);return null!=c?c:e.allowDataOverflow&&null==u&&null!=l?l:c},hf=nC([dS],e=>{if(null!=e&&"number"===e.type&&"ticks"in e&&null!=e.ticks){var t=dV(e.ticks);if(0!==t.length)return[Math.min(...t),Math.max(...t)]}},{memoizeOptions:{resultEqualityCheck:ou}}),hp=nC([dS,d0,d1,d2,d6,hd,iD,oi,hf],hh,{memoizeOptions:{resultEqualityCheck:ou}}),hm=[0,1],hg=(e,t,r,n,i,a,s)=>{if(null!=e&&null!=r&&0!==r.length||void 0!==s){var o,l,u=e.dataKey,c=e.type,d=nq(t,a);return d&&null==u?(0,sz.default)(0,null!=(l=null==r?void 0:r.length)?l:0):"category"===c?(o=n.map(d8).filter(e=>null!=e),d&&(null==e.dataKey||e.allowDuplicatedCategory&&en(o))?(0,sz.default)(0,n.length):e.allowDuplicatedCategory?o:Array.from(new Set(o))):"expand"!==i||d?s:hm}},hv=nC([dS,iD,dU,dz,s9,oi,hp],hg),hy=nC([dS,dM,oe],ds),hx=(e,t,r)=>{var n=t.niceTicks;if("none"!==n){var i=dQ(t),a=Array.isArray(i)&&("auto"===i[0]||"auto"===i[1]);if(("snap125"===n||"adaptive"===n)&&null!=t&&t.tickCount&&sq(e)){if(a)return s5(e,t.tickCount,t.allowDecimals,n);if("number"===t.type)return s6(e,t.tickCount,t.allowDecimals,n)}if("auto"===n&&"linear"===r&&null!=t&&t.tickCount){if(a&&sq(e))return s5(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&sq(e))return s6(e,t.tickCount,t.allowDecimals,"adaptive")}}},hb=nC([hv,dw,hy],hx),h_=(e,t,r,n)=>{if("angleAxis"!==n&&(null==e?void 0:e.type)==="number"&&sq(t)&&Array.isArray(r)&&r.length>0){var i,a;return[Math.min(t[0],null!=(i=r[0])?i:0),Math.max(t[1],null!=(a=r[r.length-1])?a:0)]}return t},hS=nC([dS,hv,hb,oi],h_),hw=nC(dz,dS,(e,t)=>{if(t&&"number"===t.type){var r=1/0,n=Array.from(dV(e.map(e=>e.value))).sort((e,t)=>e-t),i=n[0],a=n[n.length-1];if(null==i||null==a)return 1/0;var s=a-i;if(0===s)return 1/0;for(var o=0;o<n.length-1;o++){var l=n[o],u=n[o+1];null!=l&&null!=u&&(r=Math.min(r,u-l))}return r/s}}),hM=nC(hw,iD,s8,it,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!eR(e))return 0;var a="vertical"===t?n.height:n.width;if("gap"===i)return e*a/2;if("no-gap"===i){var s=er(r,e*a),o=e*a/2;return o-s-(o-s)/a*s}return 0}),hT=nC(dg,(e,t,r)=>{var n=dg(e,t);return null==n||"string"!=typeof n.padding?0:hM(e,"xAxis",t,r,n.padding)},(e,t)=>{if(null==e)return{left:0,right:0};var r,n,i=e.padding;return"string"==typeof i?{left:t,right:t}:{left:(null!=(r=i.left)?r:0)+t,right:(null!=(n=i.right)?n:0)+t}}),hE=nC(dx,(e,t,r)=>{var n=dx(e,t);return null==n||"string"!=typeof n.padding?0:hM(e,"yAxis",t,r,n.padding)},(e,t)=>{if(null==e)return{top:0,bottom:0};var r,n,i=e.padding;return"string"==typeof i?{top:t,bottom:t}:{top:(null!=(r=i.top)?r:0)+t,bottom:(null!=(n=i.bottom)?n:0)+t}}),hA=nC([it,hT,il,io,(e,t,r)=>r],(e,t,r,n,i)=>{var a=n.padding;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),hC=nC([it,iD,hE,il,io,(e,t,r)=>r],(e,t,r,n,i,a)=>{var s=i.padding;return a?[n.height-s.bottom,s.top]:"horizontal"===t?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),hP=(e,t,r,n)=>{var i;switch(t){case"xAxis":return hA(e,r,n);case"yAxis":return hC(e,r,n);case"zAxis":return null==(i=d_(e,r))?void 0:i.range;case"angleAxis":return i2(e);case"radiusAxis":return i3(e,r);default:return}},hI=nC([dS,hP],iH),hO=nC([hy,hS],(e,t)=>{if(null!=t)if("linear"!==e)return t;else{if(!sq(t)){for(var r,n,i=0;i<t.length;i++){var a=t[i];eR(a)&&((void 0===r||a<r)&&(r=a),(void 0===n||a>n)&&(n=a))}return void 0!==r&&void 0!==n?[r,n]:void 0}return t}}),hR=nC([dS,hy,hO,hI],da),hL=(e,t,r,n)=>{if(null!=r&&null!=r.dataKey){var i=r.type,a=r.scale;if(nq(e,n)&&("number"===i||"auto"!==a))return t.map(e=>e.value)}},hN=nC([iD,dz,dw,oi],hL),hD=nC([hR],oh),hk=nC([hR],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):dl(e,void 0)}),hU=nC([hR,dH],dl);function hF(e,t){return e.id<t.id?-1:+(e.id>t.id)}nC([dP,d3,oi],(e,t,r)=>e.flatMap(e=>
vendor: 1,623 bytes, line 1
1t[e.id]).filter(Boolean).filter(e=>dW(r,e)));var hz=(e,t)=>t,hj=(e,t,r)=>r,hB=nC(n8,hz,hj,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort(hF)),hV=nC(n9,hz,hj,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort(hF)),hG=(e,t)=>{var r="number"==typeof t.height?t.height:30;return{width:e.width,height:r}},hH=nC(it,dg,hG),hW=nC(n4,it,hB,hz,hj,(e,t,r,n,i)=>{var a,s={};return r.forEach(r=>{var o=hG(t,r);null==a&&(a=((e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}})(t,n,e));var l="top"===n&&!i||"bottom"===n&&i;s[r.id]=a-Number(l)*o.height,a+=(l?-1:1)*o.height}),s}),hX=nC(n3,it,hV,hz,hj,(e,t,r,n,i)=>{var a,s={};return r.forEach(r=>{var o={width:"number"==typeof r.width?r.width:60,height:t.height};null==a&&(a=((e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}})(t,n,e));var l="left"===n&&!i||"right"===n&&i;s[r.id]=a-Number(l)*o.width,a+=(l?-1:1)*o.width}),s}),hq=nC([it,dg,(e,t)=>{var r=dg(e,t);if(null!=r)return hW(e,r.orientation,r.mirror)},(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),hY=nC([it,dx,(e,t)=>{var r=dx(e,t);if(null!=r)return hX(e,r.orientation,r.mirror)},(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),h$=nC(it,dx,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),hK=(e,t,r,n)=>{if(null!=r){var i=r.allowDuplicatedCategory,a=r.type,s=r.dataKey,o=nq(e,n),l=t.map(e=>e.value),u=l.filter(e=>null!=e);if(s&&o&&"category"===a&&i&&en(u))return l}}
1,hZ=nC([iD,dz,dS,oi],hK),hJ=nC([iD,(e,t,r)=>{switch(t){case"xAxis":return dg(e,r);case"yAxis":return dx(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},hy,hD,hZ,hN,hP,hb,oi],(e,t,r,n,i,a,s,o,l)=>{if(null!=t){var u=nq(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:a,duplicateDomain:i,isCategorical:u,niceTicks:o,range:s,realScaleType:r,scale:n}}}),hQ=nC([iD,dw,hy,hD,hb,hP,hZ,hN,oi],(e,t,r,n,i,a,s,o,l)=>{if(null!=t&&null!=n){var u=nq(e,l),c=t.type,d=t.ticks,h=t.tickCount,f="scaleBand"===r&&"function"==typeof n.bandwidth?n.bandwidth()/2:2,p="category"===c&&n.bandwidth?n.bandwidth()/f:0;p="angleAxis"===l&&null!=a&&a.length>=2?2*$(a[0]-a[1])*p:p;var m=d||i;return m?m.map((e,t)=>{var r=s?s.indexOf(e):e,i=n.map(r);return eR(i)?{index:t,coordinate:i+p,value:e,offset:p}:null}).filter(el):u&&o?o.map((e,t)=>{var r=n.map(e);return eR(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(el):n.ticks?n.ticks(h).map((e,t)=>{var r=n.map(e);return eR(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(el):n.domain().map((e,t)=>{var r=n.map(e);return eR(r)?{coordinate:r+p,value:s?s[e]:e,index:t,offset:p}:null}).filter(el)}}),h0=nC([iD,dw,hD,hP,hZ,hN,oi],(e,t,r,n,i,a,s)=>{if(null!=t&&null!=r&&null!=n&&n[0]!==n[1]){var o=nq(e,s),l=t.tickCount,u=0;return(u="angleAxis"===s&&(null==n?void 0:n.length)>=2?2*$(n[0]-n[1])*u:u,o&&a)?a.map((e,t)=>{var n=r.map(e);return eR(n)?{coordinate:n+u,value:e,index:t,offset:u}:null}).filter(el):r.ticks?r.ticks(l).map((e,t)=>{var n=r.map(e);return eR(n)?{coordinate:n+u,value:e,index:t,offset:u}:null}).filter(el):r.domain().map((e,t)=>{var n=r.map(e);return eR(n)?{coordinate:n+u,value:i?i[e]:e,index:t,offset:u}:null}).filter(el)}}),h1=nC(dS,hD,(e,t)=>{if(null!=e&&null!=t)return dc(dc({},e),{},{scale:t})}),h2=nC([dS,hy,hv,hI],da),h3=nC([h2],oh);nC((e,t,r)=>d_(e,r),h3,(e,t)=>{if(null!=e&&null!=t)return dc(dc({},e),{},{scale:t})});var h4=nC([iD,n8,n9],(e,t,r)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),h5=(e,t,r)=>{var n;return null==(n=e.renderedTicks[t])?void 0:n[r]},h6=nC([h5],e=>{if(e&&0!==e.length)return t=>{var r,n=1/0,i=e[0];for(var a of e){var s=Math.abs(a.coordinate-t);s<n&&(n=s,i=a)}return null==(r=i)?void 0:r.value}});
vendor: 5,410 bytes, line 1
1e.s(["combineAllAppliedValues",0,dF,"combineAreasDomain",0,ho,"combineAxisDomain",0,hg,"combineAxisDomainWithNiceTicks",0,h_,"combineCategoricalDomain",0,hL,"combineDisplayedData",0,dk,"combineDomainOfAllAppliedNumericalValuesIncludingErrorValues",0,d5,"combineDomainOfStackGroups",0,dZ,"combineDotsDomain",0,ha,"combineDuplicateDomain",0,hK,"combineGraphicalItemsData",0,dL,"combineGraphicalItemsSettings",0,dC,"combineLinesDomain",0,hu,"combineNiceTicks",0,hx,"combineNumericalDomain",0,hh,"combineStackGroups",0,d$,"filterGraphicalNotStackedItems",0,dO,"filterReferenceElements",0,d7,"getDomainDefinition",0,dQ,"implicitXAxis",0,dp,"implicitYAxis",0,dv,"itemAxisPredicate",0,dT,"mergeDomains",0,d4,"selectAllErrorBarSettings",0,d3,"selectAxisDomain",0,hv,"selectAxisInverseDataSnapScale",0,hU,"selectAxisInverseScale",0,hk,"selectAxisInverseTickSnapScale",0,h6,"selectAxisPropsNeededForCartesianGridTicksGenerator",0,hJ,"selectAxisRange",0,hP,"selectAxisScale",0,hD,"selectAxisWithScale",0,h1,"selectChartDirection",0,h4,"selectHasBar",0,dM,"selectReferenceAreas",0,ht,"selectReferenceDots",0,d9,"selectReferenceLines",0,hn,"selectRenderedTicksOfAxis",0,h5,"selectStackGroups",0,dK,"selectTicksOfAxis",0,hQ,"selectTicksOfGraphicalItem",0,h0,"selectTooltipAxis",0,dX,"selectTooltipAxisDataKey",0,dq,"selectUnfilteredCartesianItems",0,dE,"selectXAxisPosition",0,hq,"selectXAxisRange",0,hA,"selectXAxisSettings",0,dg,"selectXAxisSettingsNoDefaults",0,dm,"selectXAxisSize",0,hH,"selectYAxisPosition",0,hY,"selectYAxisRange",0,hC,"selectYAxisSettings",0,dx,"selectYAxisSettingsNoDefaults",0,dy,"selectYAxisSize",0,h$],61764);var h8=e=>e.options.defaultTooltipEventType,h9=e=>e.options.validateTooltipEventTypes;function h7(e,t,r){if(null==e)return t;var n=e?"axis":"item";return null==r?t:r.includes(n)?n:t}function fe(e,t){return h7(t,h8(e),h9(e))}var ft=(e,t)=>{var r,n=Number(t);if(!K(n)&&null!=t)return n>=0?null==e||null==(r=e[n])?void 0:r.value:void 0},fr={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},fn=rD({name:"tooltip",initialState:{itemInteraction:{click:fr,hover:fr},axisInteraction:{click:fr,hover:fr},keyboardInteraction:fr,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:rP()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,a=t2(e).tooltipItemPayloads.indexOf(n);a>-1&&(e.tooltipItemPayloads[a]=i)},prepare:rP()},removeTooltipEntrySettings:{reducer(e,t){var r=t2(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:rP()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),fi=fn.actions,fa=fi.addTooltipEntrySettings,fs=fi.replaceTooltipEntrySettings,fo=fi.removeTooltipEntrySettings,fl=fi.setTooltipSettingsState,fu=fi.setActiveMouseOverItemIndex,fc=(fi.mouseLeaveItem,fi.mouseLeaveChart),fd=(fi.setActiveClickItemIndex,fi.setMouseOverAxisIndex),fh=fi.setMouseClickAxisIndex,ff=fi.setSyncInteraction,fp=fi.setKeyboardInteraction,fm=fn.reducer;function fg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?fg(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var fy=(e,t,r,n)=>{if(null==t)return fr;var i,a,s,o=(i=e,a=t,s=r,"axis"===a?"click"===s?i.axisInteraction.click:i.axisInteraction.hover:"click"===s?i.itemInteraction.click:i.itemInteraction.hover);if(null==o)return fr;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var l=!0===e.settings.active;if(null!=o.index){if(l)return fv(fv({},o),{},{active:!0})}else if(null!=n)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return fv(fv({},fr),{},{coordinate:o.coordinate})},fx=(e,t,r,n)=>{var i=null==e?void 0:e.index;if(null==i)return null;var a=Number(i);if(!eR(a))return i;var s=Infinity;t.length>0&&(s=t.length-1);var o=Math.max(0,Math.min(a,s)),l=t[o];return null==l?String(o):!function(e,t,r){if(null==r||null==t)return!0;var n=nW(e,t);return!(null!=n&&sq(r))||function(e,t){var r=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}(e),n=t[0],i=t[1];if(void 0===r)return!1;var a=Math.min(n,i),s=Math.max(n,i);return r>=a&&r<=s}(n,r)}(l,r,n)?null:String(o)},fb=(e,t,r,n,i,a,s)=>{if(null!=a){var o=s[0],l=null==o?void 0:o.getPosition(a);if(null!=l)return l;var u=null==i?void 0:i[Number(a)];if(u)if("horizontal"===r)return{x:u.coordinate,y:(n.top+t)/2};else return{x:(n.left+e)/2,y:u.coordinate}}},f_=(e,t,r,n)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];if(i="hover"===r?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==i)return e.tooltipItemPayloads;if(null==i&&(null!=n||e.keyboardInteraction.active)){var i,a=e.tooltipItemPayloads[0];return null!=a?[a]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null==(t=e.settings)?void 0:t.graphicalItemId)===i})},fS=e=>e.options.tooltipPayloadSearcher,fw=e=>e.tooltip;function fM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fM(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function fE(e){if("string"==typeof e)return e}var fA=(e,t,r,n,i,a,s)=>{if(null!=t&&null!=a){var o=r.chartData,l=r.computedData,u=r.dataStartIndex,c=r.dataEndIndex;return e.reduce((e,r)=>{var d,h,f,p=r.dataDefinedOnItem,m=r.settings,g=null!=p?p:o,v=Array.isArray(g)?nF(g,u,c):g,y=null!=(d=null==m?void 0:m.dataKey)?d:n,x=null==m?void 0:m.nameKey;return n&&Array.isArray(v)&&!Array.isArray(v[0])&&"axis"===s?null==(h=ea(v,n,i))&&(h=a(v,t,l,x)):h=a(v,t,l,x),Array.isArray(h)?h.forEach(t=>{var r,n,i=function(e){if(null!=e&&"object"==typeof e){var t,r="name"in e?function(e){if("string"==typeof e||"number"==typeof e)return e}(e.name):void 0,n="unit"in e?function(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e}(e.unit):void 0,i="dataKey"in e?"string"==typeof(t=e.dataKey)||"number"==typeof t?t:"function"==typeof t?e=>t(e):void 0:void 0,a="payload"in e?e.payload:void 0;return{name:r,unit:n,dataKey:i,payload:a,color:"color"in e?fE(e.color):void 0,fill:"fill"in e?fE(e.fill):void 0}}}(t),a=null==i?void 0:i.name,s=null==i?void 0:i.dataKey,o=null==i?void 0:i.payload,l=fT(fT({},m),{},{name:a,unit:null==i?void 0:i.unit,color:null!=(r=null==i?void 0:i.color)?r:null==m?void 0:m.color,fill:null!=(n=null==i?void 0:i.fill)?n:null==m?void 0:m.fill});e.push(n0({tooltipEntrySettings:l,dataKey:s,payload:o,value:nW(o,s),name:null==a?void 0:String(a)}))}):e.push(n0({tooltipEntrySettings:m,dataKey:y,payload:h,value:nW(h,y),name:null!=(f=nW(h,x))?f:null==m?void 0:m.name})),e},[])}},fC=nC([dX,dM,oe],ds),fP=nC([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),fI=nC([oc,od],dT),fO=nC([fP,dX,fI],dC,{memoizeOptions:{resultEqualityCheck:i6}}),fR=nC([fO],e=>e.filter(ol)),fL=nC([fO],dL,{memoizeOptions:{resultEqualityCheck:i6}}),fN=nC([fO],e=>e.some(e=>!e.data)),fD=nC([fL,sj],dk),fk=nC([fR,sj,dX],oo),fU=nC([fD,dX,fO,sj,fN,fL],dF),fF=nC([dX],dQ),fz=nC([dX],e=>e.allowDataOverflow),fj=nC([fF,fz],s$),fB=nC([fO],e=>e.filter(ol)),fV=nC([fk,fB,s9,s7],d$),fG=nC([fV,sj,oc,fj],dZ),fH=nC([fO],dO),fW=nC([fD,dX,fH,d3,oc,sH],d5,{memoizeOptions:{resultEqualityCheck:ou}}),fX=nC([d9,oc,od],d7),fq=nC([fX,oc],ha),fY=nC([ht,oc,od],d7),f$=nC([fY,oc],ho),fK=nC([hn,oc,od],d7),fZ=nC([fK,oc],hu),fJ=nC([fq,fZ,f$],d4),fQ=nC([dX,fF,fj,fG,fW,fJ,iD,oc],hh),f0=nC([dX,iD,fD,fU,s9,oc,fQ],hg),f1=nC([f0,dX,fC],hx),f2=nC([dX,f0,f1,oc],h_),f3=e=>{var t=oc(e),r=od(e);return hP(e,t,r,!1)},f4=nC([dX,f3],iH),f5=nC([dX,fC,f2,f4],da),f6=nC([f5],oh),f8=nC([iD,fU,dX,oc],hK),f9=nC([iD,fU,dX,oc],hL),f7=nC([iD,dX,fC,f6,f3,f8,f9,oc],(e,t,r,n,i,a,s,o)=>
1{if(t){var l=t.type,u=nq(e,o);if(n){var c="scaleBand"===r&&n.bandwidth?n.bandwidth()/2:2,d="category"===l&&n.bandwidth?n.bandwidth()/c:0;return(d="angleAxis"===o&&null!=i&&(null==i?void 0:i.length)>=2?2*$(i[0]-i[1])*d:d,u&&s)?s.map((e,t)=>{var r=n.map(e);return eR(r)?{coordinate:r+d,value:e,index:t,offset:d}:null}).filter(el):n.domain().map((e,t)=>{var r=n.map(e);return eR(r)?{coordinate:r+d,value:a?a[e]:e,index:t,offset:d}:null}).filter(el)}}}),pe=nC([h8,h9,e=>e.tooltip.settings],(e,t,r)=>h7(r.shared,e,t)),pt=e=>e.tooltip.settings.trigger,pr=e=>e.tooltip.settings.defaultIndex,pn=nC([fw,pe,pt,pr],fy),pi=nC([pn,fD,dq,f0],fx),pa=nC([f7,pi],ft),ps=nC([pn],e=>{if(e)return e.dataKey}),po=nC([pn],e=>{if(e)return e.graphicalItemId}),pl=nC([fw,pe,pt,pr],f_),pu=nC([n3,n4,iD,it,f7,pr,pl],fb),pc=nC([pn,pu],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),pd=nC([pn],e=>{var t;return null!=(t=null==e?void 0:e.active)&&t}),ph=nC([pl,pi,sj,dq,pa,fS,pe],fA),pf=nC([ph],e=>{if(null!=e)return Array.from(new Set(e.map(e=>e.payload).filter(e=>null!=e)))});function pp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pp(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var pg=rD({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:rP()},replaceXAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;void 0!==e.xAxis[n.id]&&(n.id!==i.id&&delete e.xAxis[n.id],e.xAxis[i.id]=i)},prepare:rP()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:rP()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:rP()},replaceYAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;void 0!==e.yAxis[n.id]&&(n.id!==i.id&&delete e.yAxis[n.id],e.yAxis[i.id]=i)},prepare:rP()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:rP()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:rP()},replaceZAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;void 0!==e.zAxis[n.id]&&(n.id!==i.id&&delete e.zAxis[n.id],e.zAxis[i.id]=i)},prepare:rP()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:rP()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,i=r.width,a=e.yAxis[n];if(a){var s,o=a.widthHistory||[];if(3===o.length&&o[0]===o[2]&&i===o[1]&&i!==a.width&&1>=Math.abs(i-(null!=(s=o[0])?s:0)))return;var l=[...o,i].slice(-3);e.yAxis[n]=pm(pm({},a),{},{width:i,widthHistory:l})}},updateXAxisHeight(e,t){var r=t.payload,n=r.id,i=r.height,a=e.xAxis[n];if(a){var s,o=a.heightHistory||[];if(3===o.length&&o[0]===o[2]&&i===o[1]&&i!==a.height&&1>=Math.abs(i-(null!=(s=o[0])?s:0)))return;var l=[...o,i].slice(-3);e.xAxis[n]=pm(pm({},a),{},{height:i,heightHistory:l})}}}}),pv=pg.actions,py=pv.addXAxis,px=pv.replaceXAxis,pb=pv.removeXAxis,p_=pv.addYAxis,pS=pv.replaceYAxis,pw=pv.removeYAxis,pM=(pv.addZAxis,pv.replaceZAxis,pv.removeZAxis,pv.updateYAxisWidth),pT=pv.updateXAxisHeight,pE=pg.reducer;e.s(["addXAxis",0,py,"addYAxis",0,p_,"cartesianAxisReducer",0,pE,"defaultAxisId",0,0,"removeXAxis",0,pb,"removeYAxis",0,pw,"replaceXAxis",0,px,"replaceYAxis",0,pS,"updateXAxisHeight",0,pT,"updateYAxisWidth",0,pM],29194);var pA=nC([it],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),pC=nC([pA,n3,n4],(e,t,r)=>{if(e&&null!=t&&null!=r)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),pP=()=>e8(pC),pI=()=>e8(pf);function pO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pR(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?pO(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pO(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}e.s(["useActiveTooltipDataPoints",0,pI,"usePlotArea",0,pP],52734);var pL=e=>{var t,r=e.point,n=e.childIndex,i=e.mainColor,a=e.activeDot,s=e.dataKey,o=e.clipPath;if(!1===a||null==r.x||null==r.y)return null;var l=pR(pR(pR({},{index:n,dataKey:s,cx:r.x,cy:r.y,r:4,fill:null!=i?i:"none",strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value}),j(a)),sI(a));return t=(0,R.isValidElement)(a)?(0,R.cloneElement)(a,l):"function"==typeof a?a(l):R.createElement(sR,l),R.createElement(W,{className:"recharts-active-dot",clipPath:o},t)};function pN(e,t){var r,n,i=e8(t=>dg(t,e)),a=e8(e=>dx(e,t)),s=null!=(r=null==i?void 0:i.allowDataOverflow)?r:dp.allowDataOverflow,o=null!=(n=null==a?void 0:a.allowDataOverflow)?n:dv.allowDataOverflow;return{needClip:s||o,needClipX:s,needClipY:o}}function pD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pk(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pD(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}e.s(["ActivePoints",0,function(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,a=e.clipPath,s=e.zIndex,o=void 0===s?iB.activeDot:s,l=e8(pi),u=pI();if(null==t||null==u)return null;var c=t.find(e=>u.includes(e.payload));return es(c)?null:R.createElement(si,{zIndex:o},R.createElement(pL,{point:c,childIndex:Number(l),mainColor:r,dataKey:i,activeDot:n,clipPath:a}))}],41818),e.s(["SetTooltipEntrySettings",0,function(e){var t=e.tooltipEntrySettings,r=e3(),n=is(),i=(0,R.useRef)(null);return(0,R.useLayoutEffect)(()=>{n||(null===i.current?r(fa(t)):i.current!==t&&r(fs({prev:i.current,next:t})),i.current=t)},[t,r,n]),(0,R.useLayoutEffect)(()=>()=>{i.current&&(r(fo(i.current)),i.current=null)},[r]),null}],844),e.s(["GraphicalItemClipPath",0,function(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=pP(),a=pN(t,r),s=a.needClipX,o=a.needClipY,l=a.needClip,u=e8(e=>hA(e,t,!1)),c=e8(e=>hC(e,r,!1));if(!l||!i)return null;var d=i.x,h=i.y,f=i.width,p=i.height,m=s&&u?Math.min(u[0],u[1]):d-f/2,g=o&&c?Math.min(c[0],c[1]):h-p/2,v=s&&u?Math.abs(u[1]-u[0]):2*f,y=o&&c?Math.abs(c[1]-c[0]):2*p;return R.createElement("clipPath",{id:"clipPath-".concat(n)},R.createElement("rect",{x:m,y:g,width:v,height:y}))},"useNeedsClip",0,pN],59798);var pU=(e,t,r,n,i)=>{var a=null!=(p=null==t?void 0:t.length)?p:0;if(a<=1||null==e)return 0;if("angleAxis"===n&&null!=i&&1e-6>=Math.abs(Math.abs(i[1]-i[0])-360))for(var s=i[1]-i[0],o=(t,r,n)=>[e,e+s,e-s].some(e=>(n?e>=t:e>t)&&e<=r),l=0;l<a;l++){var u,c=l>0?null==(m=r[l-1])?void 0:m.coordinate:null==(g=r[a-1])?void 0:g.coordinate,d=null==(v=r[l])?void 0:v.coordinate,h=l>=a-1?null==(y=r[0])?void 0:y.coordinate:null==(x=r[l+1])?void 0:x.coordinate,f=void 0;if(null!=c&&null!=d&&null!=h){if($(d-c)!==$(h-d)){var p,m,g,v,y,x,b,_=[];if($(h-d)===$(i[1]-i[0])){f=h;var S=d+i[1]-i[0];_[0]=Math.min(S,(S+c)/2),_[1]=Math.max(S,(S+c)/2)}else{f=c;var w=h+i[1]-i[0];_[0]=Math.min(d,(w+d)/2),_[1]=Math.max(d,(w+d)/2)}
1var M=[Math.min(d,(f+d)/2),Math.max(d,(f+d)/2)];if(o(M[0],M[1],!1)||o(_[0],_[1],!0))return null==(b=r[l])?void 0:b.index}else if(o((Math.min(c,h)+d)/2,(Math.max(c,h)+d)/2,!1))return null==(u=r[l])?void 0:u.index}}else if(t)for(var T=0;T<a;T++){var E=t[T];if(null!=E){var A=t[T+1],C=t[T-1];if(0===T&&null!=A&&e<=(E.coordinate+A.coordinate)/2||T===a-1&&null!=C&&e>(E.coordinate+C.coordinate)/2||T>0&&T<a-1&&null!=C&&null!=A&&e>(E.coordinate+C.coordinate)/2&&e<=(E.coordinate+A.coordinate)/2)return E.index}}return -1},pF=()=>e8(oe),pz=(e,t)=>t,pj=(e,t,r)=>r,pB=(e,t,r,n)=>n,pV=nC(f7,e=>(0,nI.default)(e,e=>e.coordinate)),pG=nC([fw,pz,pj,pB],fy),pH=nC([pG,fD,dq,f0],fx),pW=(e,t,r)=>{if(null!=t){var n=fw(e);return"axis"===t?"hover"===r?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:"hover"===r?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},pX=nC([fw,pz,pj,pB],f_),pq=nC([n3,n4,iD,it,f7,pB,pX],fb),pY=nC([pG,pq],(e,t)=>{var r;return null!=(r=e.coordinate)?r:t}),p$=nC([f7,pH],ft),pK=nC([pX,pH,sj,dq,p$,fS,pz],fA),pZ=nC([pG,pH],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),pJ=(e,t,r,n,i,a,s,o)=>{if(e&&t&&n&&i&&a){if("horizontal"===t||"vertical"===t){var l=e,u=t,c=n,d=i,h=a,f=s,p=o;if(l&&c&&d&&h&&(m=l.relativeX,g=l.relativeY,m>=p.left&&m<=p.left+p.width&&g>=p.top&&g<=p.top+p.height)){var m,g,v=pU(n1(l,u),f,h,c,d),y=((e,t,r,n)=>{var i=t.find(e=>e&&e.index===r);if(i){if("horizontal"===e)return{x:i.coordinate,y:n.relativeY};if("vertical"===e)return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}})(u,h,v,l);return{activeIndex:String(v),activeCoordinate:y}}return}if(e&&n&&i&&a&&r){var x=((e,t)=>{var r,n,i,a,s=((e,t)=>{var r,n,i,a,s=e.x,o=e.y,l=t.cx,u=t.cy,c=(r={x:s,y:o},n={x:l,y:u},i=r.x,a=r.y,Math.sqrt((i-n.x)**2+(a-n.y)**2));if(c<=0)return{radius:c,angle:0};var d=Math.acos((s-l)/c);return o>u&&(d=2*Math.PI-d),{radius:c,angle:180*d/Math.PI,angleInRadian:d}})({x:e.relativeX,y:e.relativeY},t),o=s.radius,l=s.angle,u=t.innerRadius,c=t.outerRadius;if(o<u||o>c||0===o)return null;var d=(i=Math.min(Math.floor((r=t.startAngle)/360),Math.floor((n=t.endAngle)/360)),{startAngle:r-360*i,endAngle:n-360*i}),h=d.startAngle,f=d.endAngle,p=l;if(h<=f){for(;p>f;)p-=360;for(;p<h;)p+=360;a=p>=h&&p<=f}else{for(;p>h;)p-=360;for(;p<f;)p+=360;a=p>=f&&p<=h}return a?eZ(eZ({},t),{},{radius:o,angle:p+360*Math.min(Math.floor(t.startAngle/360),Math.floor(t.endAngle/360))}):null})(e,r);if(x){var b=pU(n2(x,t),s,a,n,i),_=((e,t,r,n)=>{var i=t.find(e=>e&&e.index===r);if(i){if("centric"===e){var a=i.coordinate,s=n.radius;return pk(pk(pk({},n),eQ(n.cx,n.cy,s,a)),{},{angle:a,radius:s})}var o=i.coordinate,l=n.angle;return pk(pk(pk({},n),eQ(n.cx,n.cy,o,l)),{},{angle:l,radius:o})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,a,b,x);return{activeIndex:String(b),activeCoordinate:_}}return}}};e.s(["combineActiveProps",0,pJ,"selectActiveCoordinate",0,pY,"selectActiveLabel",0,p$,"selectCoordinateForDefaultIndex",0,pq,"selectIsTooltipActive",0,pZ,"selectOrderedTooltipTicks",0,pV,"selectTooltipDataKey",0,pW,"selectTooltipPayload",0,pK,"useChartName",0,pF],75502);var pQ=rD({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value",position:void 0,offset:0},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter,e.settings.position=t.payload.position,e.settings.offset=t.payload.offset},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:rP()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,a=t2(e).payload.indexOf(n);a>-1&&(e.payload[a]=i)},prepare:rP()},removeLegendPayload:{reducer(e,t){var r=t2(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:rP()}}}),p0=pQ.actions,p1=(p0.setLegendSize,p0.setLegendSettings,p0.addLegendPayload),p2=p0.replaceLegendPayload,p3=p0.removeLegendPayload,p4=pQ.reducer;e.s(["SetLegendPayload",0,function(e){var t=e.legendPayload,r=e3(),n=is(),i=(0,R.useRef)(null);return(0,R.useLayoutEffect)(()=>{n||(null===i.current?r(p1(t)):i.current!==t&&r(p2({prev:i.current,next:t})),i.current=t)},[r,n,t]),(0,R.useLayoutEffect)(()=>()=>{i.current&&(r(p3(i.current)),i.current=null)},[r]),null}],95146);var p5=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],p6=(e,t)=>e.map((e,r)=>e*t**r).reduce((e,t)=>
1e+t),p8=(e,t)=>r=>p6(p5(e,t),r),p9=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var n=(e=>{var t,r=e.split("(");if(2!==r.length||"cubic-bezier"!==r[0])return null;var n=null==(t=r[1])||null==(t=t.split(")")[0])?void 0:t.split(",");if(null==n||4!==n.length)return null;var i=n.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]})(t[0]);if(n)return n}return 4===t.length?t:[0,0,1,1]},p7=function(){return((e,t,r,n)=>{var i=p8(e,r),a=p8(t,n),s=t=>p6([...p5(e,r).map((e,t)=>e*t).slice(1),0],t),o=e=>e>1?1:e<0?0:e,l=e=>{for(var t=e>1?1:e,r=t,n=0;n<8;++n){var l=i(r)-t,u=s(r);if(1e-4>Math.abs(l-t)||u<1e-4)break;r=o(r-l/u)}return a(r)};return l.isStepper=!1,l})(...p9(...arguments))},me=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,r=void 0===t?100:t,n=e.damping,i=void 0===n?8:n,a=e.dt,s=void 0===a?16.67:a,o=[0],l=0,u=0,c=0;c<1e4;){var d=u*i;if(u+=(-(l-1)*r-d)*s/1e3,l+=u*s/1e3,o.push(l),1e-4>Math.abs(l-1)&&1e-4>Math.abs(u))break;c++}o[o.length-1]=1;var h=o.length-1;return e=>{if(e<=0)return 0;if(e>=1)return 1;var t,r,n,i=e*h,a=Math.floor(i);return(null!=(t=o[a])?t:0)+((null!=(r=o[a+1])?r:0)-(null!=(n=o[a])?n:0))*(i-a)}},mt=(0,R.createContext)((e,t,r)=>{var n,i=a=>{var s=t.tick(a);if("active"===t.getState()){if(r(t.getInterpolated()),1===t.getProgress()){t.complete(),n=void 0;return}n=e.setTimeout(i,s);return}n=e.setTimeout(i,s)};return n=e.setTimeout(i,0),()=>{var e;return null==(e=n)?void 0:e()}});function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mn(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,R.useState)(()=>!ec.isSsr&&!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(e)||function(e){if(e){if("string"==typeof e)return mr(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mr(e,2):void 0}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1];return(0,R.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{n(e.matches)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[]),r}mt.Provider;var mi="init",ma="pending",ms="active";function mo(e){return Math.max(0,e)}class ml{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(e){var t;!function(e,t,r){var n;(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"state",mi),this.animationId=e.animationId,this.onAnimationEnd=e.onAnimationEnd,this.animationDuration=mo(e.animationDuration),this.animationBegin=mo(e.animationBegin),this.progress=0,this.from=e.from,this.to=e.to,this.easing=e.easing,null==(t=e.onAnimationStart)||t.call(e)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(e){if(this.getState()===mi)return this.state=ma,this.beginStartedTime=e,this.animationBegin;if(this.getState()===ma){if(null==this.beginStartedTime)throw Error();var t=e-this.beginStartedTime;return t>=this.animationBegin?(this.state=ms,this.animationStartedTime=e,this.nextAnimationUpdate(0)):mo(this.animationBegin-t)}if(this.getState()===ms){if(null==this.animationStartedTime)throw Error();var r=e-this.animationStartedTime;return this.setProgress(r/this.animationDuration),this.nextAnimationUpdate(r)}return 0}setProgress(e){this.progress=Math.min(1,Math.max(0,e))}getProgress(){return this.progress}complete(){if(this.progress=1,"active"===this.state){var e;null==(e=this.onAnimationEnd)||e.call(this)}this.state="completed"}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class mu extends ml{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(ei(this.getFrom(),this.getTo(),this.getProgress()))}}class mc{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=performance.now(),n=null,i=a=>{a-r>=t?e(a):n=requestAnimationFrame(i)};return n=requestAnimationFrame(i),()=>{null!=n&&cancelAnimationFrame(n)}}}function md(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var mh={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}};function mf(e){var t,r,n,i=eO(e,mh),a=i.animationId,s=i.isActive,o=i.canBegin,l=i.duration,u=i.easing,c=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,f=i.children,p=mn(),m="auto"===s?!ec.isSsr&&!p:s,g=(t=i.animationController,r=(0,R.useContext)(mt),(0,R.useMemo)(()=>null!=t?t:r,[t,r])),v=function(e){if(Array.isArray(e))return e}(n=(0,R.useState)(+!m))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}
1finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(n)||function(e){if(e){if("string"==typeof e)return md(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?md(e,2):void 0}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=v[0],x=v[1];return(0,R.useEffect)(()=>{m||x(1)},[m]),(0,R.useEffect)(()=>{var e=(e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return p7(e);case"spring":return me();default:if("cubic-bezier"===e.split("(")[0])return p7(e)}return"function"==typeof e?e:null})(u);return m&&o&&null!=e?g(new mc,new mu({animationId:a,easing:e,animationDuration:l,animationBegin:c,onAnimationStart:h,onAnimationEnd:d,from:0,to:1}),x):eu},[g,a,m,o,l,u,c,h,d]),f(Number(y))}function mp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=(0,R.useRef)(et(t)),n=(0,R.useRef)(e);return n.current!==e&&(r.current=et(t),n.current=e),r.current}function mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var mg="index";function mv(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var a=0;a<t.length;a++){var s=e[a],o=t[a];null!=s?n.push({status:"matched",prev:s,next:o}):n.push({status:"added",next:o})}return n}function my(e,t,r){var n;return null==t?null:null==e?t.map(e=>({status:"added",next:e})):r===mg?(n=e.length/t.length,mv(t.map((t,r)=>e[Math.floor(r*n)]),t)):"append"===r?mv(t.map((t,r)=>e[r]),t):function(e,t,r){var n=function(e,t){for(var r=new Map,n=0;n<e.length;n++){var i=e[n];if(null!=i){var a=t(i,n);null==a||r.has(a)||r.set(a,i)}}return r}(e,r),i=new Set,a=t.map((e,t)=>{var a=r(e,t);if(null!=a){var s=n.get(a);if(void 0!==s)return i.add(a),s}}),s=[];for(var o of n){var l=function(e){if(Array.isArray(e))return e}(o)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(o)||function(e){if(e){if("string"==typeof e)return mm(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mm(e,2):void 0}}(o)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=l[0],c=l[1];i.has(u)||s.push(c)}return mv(a,t,s)}(e,t,r)}function mx(e,t){var r=(0,R.useRef)(e),n=(0,R.useRef)(t.current),i=(0,R.useRef)(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var a=(0,R.useCallback)(function(e,r){var a=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(0===r){i.current=!0;return}1===r&&(n.current=e),r>0&&i.current&&a&&(t.current=e)},[t]);return{startValue:n.current,syncStepValue:a}}function mb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}e.s(["matchAnimationItems",0,my,"matchByIndex",0,mg],8436),e.s(["useAnimationStartSnapshot",0,mx],63567),e.s(["AnimatedItems",0,function(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,a=e.previousItemsRef,s=e.isAnimationActive,o=e.animationBegin,l=e.animationDuration,u=e.animationEasing,c=e.onAnimationStart,d=e.onAnimationEnd,h=e.animationInterpolateFn,f=e.animationMatchBy,p=e.shouldUpdatePreviousRef,m=e.children,g=e.layout,v=mp(r,n),y=mx(v,a),x=null!=(t=y.startValue)?t:null,b=my(x,i,null!=f?f:mg);return R.createElement(mf,{animationId:v,begin:o,duration:l,isActive:s,easing:u,onAnimationEnd:d,onAnimationStart:c,key:v},e=>{var t=null==i?i:h(b,e,g),r=p?p(e):e>0;return(y.syncStepValue(t,e,r),null==t)?null:m(t,e,null==x)})},"useAnimationCallbacks",0,function(e,t){var r,n=function(e){if(Array.isArray(e))return e}(r=(0,R.useState)(!1))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}
1finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(r)||function(e){if(e){if("string"==typeof e)return mb(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mb(e,2):void 0}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],a=n[1];return{isAnimating:i,handleAnimationStart:(0,R.useCallback)(()=>{"function"==typeof e&&e(),a(!0)},[e]),handleAnimationEnd:(0,R.useCallback)(()=>{"function"==typeof t&&t(),a(!1)},[t])}}],30174);var mS=null!=(p=R["useId".toString()])?p:()=>{var e;return(function(e){if(Array.isArray(e))return e}(e=R.useState(()=>et("uid-")))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),1!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(e)||function(e){if(e){if("string"==typeof e)return m_(e,1);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m_(e,1):void 0}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]};e.s(["useId",0,mS],8191);var mw=(0,R.createContext)(void 0);e.s(["RegisterGraphicalItemId",0,e=>{var t,r,n=e.id,i=e.type,a=e.children,s=(t="recharts-".concat(i),r=mS(),n||(t?"".concat(t,"-").concat(r):r));return R.createElement(mw.Provider,{value:s},a(s))}],15549);var mM=rD({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:rP()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,a=t2(e).cartesianItems.indexOf(n);a>-1&&(e.cartesianItems[a]=i)},prepare:rP()},removeCartesianGraphicalItem:{reducer(e,t){var r=t2(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:rP()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:rP()},removePolarGraphicalItem:{reducer(e,t){var r=t2(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:rP()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,a=t2(e).polarItems.indexOf(n);a>-1&&(e.polarItems[a]=i)},prepare:rP()}}}),mT=mM.actions,mE=mT.addCartesianGraphicalItem,mA=mT.replaceCartesianGraphicalItem,mC=mT.removeCartesianGraphicalItem,mP=(mT.addPolarGraphicalItem,mT.removePolarGraphicalItem,mT.replacePolarGraphicalItem,mM.reducer),mI=(0,R.memo)(e=>{var t=e3(),r=(0,R.useRef)(null);return(0,R.useLayoutEffect)(()=>{null===r.current?t(mE(e)):r.current!==e&&t(mA({prev:r.current,next:e})),r.current=e},[t,e]),(0,R.useLayoutEffect)(()=>()=>{r.current&&(t(mC(r.current)),r.current=null)},[t]),null});function mO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function mR(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mO(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mO(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}e.s(["SetCartesianGraphicalItem",0,mI],91187),e.s(["getRadiusAndStrokeWidthFromDot",0,function(e){var t=j(e);if(null!=t){var r=t.r,n=t.strokeWidth,i=Number(r),a=Number(n);return(Number.isNaN(i)||i<0)&&(i=3),(Number.isNaN(a)||a<0)&&(a=2),{r:i,strokeWidth:a}}return{r:3,strokeWidth:2}}],81583);e.s(["Shape",0,function(e){var t,r,n=e.option,i=e.DefaultShape,a=e.shapeProps,s=e.activeClassName,o=e.inActiveClassName,l=function(e){if("index"in e){var t=e.index;return"number"==typeof t||"string"==typeof t?t:void 0}}(a);return r=(0,R.isValidElement)(n)?(0,R.cloneElement)(n,(t=(0,R.isValidElement)(n)?n.props:n,mR(mR({},a),t))):n===i?R.createElement(i,a):"function"==typeof n?n(a,l):"object"==typeof n?R.createElement(i,mR(mR({},a),n)):R.createElement(i,a),"isActive"in a&&!0===a.isActive?R.createElement(W,{className:void 0===s?"recharts-active-shape":s},r):R.createElement(W,{className:void 0===o?"recharts-shape":o},r)}],18519),e.i(13027);var mL={notify(){},get:()=>[]},mN="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,mD="u">typeof navigator&&"ReactNative"===navigator.product,mk=mN||mD?R.useLayoutEffect:R.useEffect;function mU(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}var mF=Symbol.for("react-redux-context"),mz="u">typeof globalThis?globalThis:{},mj=function(){if(!R.createContext)return{};let e=mz[mF]??=new Map,t=e.get(R.createContext);return t||(t=R.createContext(null),e.set(R.createContext,t)),t}(),mB=function(e){let{children:t,context:r,serverState:n,store:i}=e,a=R.useMemo(()=>{let e=function(e){let t,r=mL,n=0,i=!1;function a(){l.onStateChange&&l.onStateChange()}function s(){if(n++,!t){let n,i;t=e.subscribe(a),n=null,i=null,r={clear(){n=null,i=null},notify(){let e=n;for(;e;)e.callback(),e=e.next},get(){let e=[],t=n;for(;t;)e.push(t),t=t.next;return e},subscribe(e){let t=!0,r=i={callback:e,next:null,prev:i};return r.prev?r.prev.next=r:n=r,function(){t&&null!==n&&(t=!1,r.next?r.next.prev=r.prev:i=r.prev,r.prev?r.prev.next=r.next:n=r.next)}}}}}function o(){n--,t&&0===n&&(t(),t=void 0,r.clear(),r=mL)}let l={addNestedSub:function(e){s();let t=r.subscribe(e),n=!1;return()=>{n||(n=!0,t(),o())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,o())},getListeners:()=>r};return l}(i);return{store:i,subscription:e,getServerState:n?()=>n:void 0}},[i,n]),s=R.useMemo(()=>i.getState(),[i]);return mk(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.get
1State()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]),R.createElement((r||mj).Provider,{value:a},t)};function mV(e=mj){return function(){return R.useContext(e)}}var mG=mV(),mH=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function mW(e,t){for(var r of new Set([...Object.keys(e),...Object.keys(t)]))if(mH.has(r)){if(null==e[r]&&null==t[r])continue;if(!function(e,t){if(mU(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!mU(e[r[n]],t[r[n]]))return!1;return!0}(e[r],t[r]))return!1}else{var n,i;if(n=e[r],i=t[r],(null!=n||null!=i)&&("number"==typeof n&&"number"==typeof i?n!==i&&(n==n||i==i):n!==i))return!1}return!0}function mX(e){this._context=e}function mq(e){return new mX(e)}e.s(["propsAreEqual",0,mW],20135),mX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,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)}}};let mY=Math.PI,m$=2*mY,mK=m$-1e-6;function mZ(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}class mJ{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?mZ:function(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return mZ;let r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=Math.round(arguments[t]*r)/r+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(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,r,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,a){this._append`C${+e},${+t},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,r,n,i){if(e*=1,t*=1,r*=1,n*=1,(i*=1)<0)throw Error(`negative radius: ${i}`);let a=this._x1,s=this._y1,o=r-e,l=n-t,u=a-e,c=s-t,d=u*u+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>1e-6)if(Math.abs(c*o-l*u)>1e-6&&i){let h=r-a,f=n-s,p=o*o+l*l,m=Math.sqrt(p),g=Math.sqrt(d),v=i*Math.tan((mY-Math.acos((p+d-(h*h+f*f))/(2*m*g)))/2),y=v/g,x=v/m;Math.abs(y-1)>1e-6&&this._append`L${e+y*u},${t+y*c}`,this._append`A${i},${i},0,0,${+(c*h>u*f)},${this._x1=e+x*o},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,r,n,i,a){if(e*=1,t*=1,r*=1,a=!!a,r<0)throw Error(`negative radius: ${r}`);let s=r*Math.cos(n),o=r*Math.sin(n),l=e+s,u=t+o,c=1^a,d=a?n-i:i-n;null===this._x1?this._append`M${l},${u}`:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%m$+m$),d>mK?this._append`A${r},${r},0,1,${c},${e-s},${t-o}A${r},${r},0,1,${c},${this._x1=l},${this._y1=u}`:d>1e-6&&this._append`A${r},${r},0,${+(d>=mY)},${c},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r*=1}v${+n}h${-r}Z`}toString(){return this._}}function mQ(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{let e=Math.floor(r);if(!(e>=0))throw RangeError(`invalid digits: ${r}`);t=e}return e},()=>new mJ(t)}function m0(e){return e[0]}function m1(e){return e[1]}function m2(e,t){var r=nL(!0),n=null,i=mq,a=null,s=mQ(o);function o(o){var l,u,c,d=(o=nR(o)).length,h=!1;for(null==n&&(a=i(c=s())),l=0;l<=d;++l)!(l<d&&r(u=o[l],l,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(u,l,o),+t(u,l,o));if(c)return a=null,c+""||null}return e="function"==typeof e?e:void 0===e?m0:nL(e),t="function"==typeof t?t:void 0===t?m1:nL(t),o.x=function(t){return arguments.length?(e="function"==typeof t?t:nL(+t),o):e},o.y=function(e){return arguments.length?(t="function"==typeof e?e:nL(+e),o):t},o.defined=function(e){return arguments.length?(r="function"==typeof e?e:nL(!!e),o):r},o.curve=function(e){return arguments.length?(i=e,null!=n&&(a=i(n)),o):i},o.context=function(e){return arguments.length?(null==e?n=a=null:a=i(n=e),o):n},o}function m3(e,t,r){var n=null,i=nL(!0),a=null,s=mq,o=null,l=mQ(u);function u(u){var c,d,h,f,p,m=(u=nR(u)).length,g=!1,v=Array(m),y=Array(m);for(null==a&&(o=s(p=l())),c=0;c<=m;++c){if(!(c<m&&i(f=u[c],c,u))===g)if(g=!g)d=c,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),h=c-1;h>=d;--h)o.point(v[h],y[h]);o.lineEnd(),o.areaEnd()}g&&(v[c]=+e(f,c,u),y[c]=+t(f,c,u),o.point(n?+n(f,c,u):v[c],r?+r(f,c,u):y[c]))}if(p)return o=null,p+""||null}
vendor: 5,818 bytes, line 1
1function c(){return m2().defined(i).curve(s).context(a)}return e="function"==typeof e?e:void 0===e?m0:nL(+e),t="function"==typeof t?t:void 0===t?nL(0):nL(+t),r="function"==typeof r?r:void 0===r?m1:nL(+r),u.x=function(t){return arguments.length?(e="function"==typeof t?t:nL(+t),n=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:nL(+t),u):e},u.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:nL(+e),u):n},u.y=function(e){return arguments.length?(t="function"==typeof e?e:nL(+e),r=null,u):t},u.y0=function(e){return arguments.length?(t="function"==typeof e?e:nL(+e),u):t},u.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:nL(+e),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(e){return arguments.length?(i="function"==typeof e?e:nL(!!e),u):i},u.curve=function(e){return arguments.length?(s=e,null!=a&&(o=s(a)),u):s},u.context=function(e){return arguments.length?(null==e?a=o=null:o=s(a=e),u):a},u}function m4(e,t,r){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+r)/6)}function m5(e){this._context=e}function m6(){}function m8(e){this._context=e}function m9(e){this._context=e}mJ.prototype,m5.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:m4(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,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:m4(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},m8.prototype={areaStart:m6,areaEnd:m6,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e*=1,t*=1,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:m4(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},m9.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:m4(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class m7{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e*=1,t*=1,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)}this._x0=e,this._y0=t}}function ge(e){this._context=e}ge.prototype={areaStart:m6,areaEnd:m6,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e*=1,t*=1,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function gt(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0);return((a<0?-1:1)+(s<0?-1:1))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs((a*i+s*n)/(n+i)))||0}function gr(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gn(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-n)/3;e._context.bezierCurveTo(n+o,i+o*t,a-o,s-o*r,a,s)}function gi(e){this._context=e}function ga(e){this._context=new gs(e)}function gs(e){this._context=e}function go(e){this._context=e}function gl(e){var t,r,n=e.length-1,i=Array(n),a=Array(n),s=Array(n);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(s[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 gu(e,t){this._context=e,this._t=t}function gc(){return(gc=Object.assign.bind()).apply(null,arguments)}function gd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?gd(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}gi.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:gn(this,this._t0,gr(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(t*=1,(e*=1)!==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,gn(this,gr(this,r=gt(this,e,t)),r);break;default:gn(this,this._t0,r=gt(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(ga.prototype=Object.create(gi.prototype)).point=function(e,t){gi.prototype.point.call(this,t,e)},gs.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}},go.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=gl(e),i=gl(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(this._line||0!==this._line&&1===r)&&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)}},gu.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e*=1,t*=1,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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}};var gf={curveBasisClosed:function(e){return new m8(e)},curveBasisOpen:function(e){return new m9(e)},curveBasis:function(e){return new m5(e)},curveBumpX:function(e){return new m7(e,!0)},curveBumpY:function(e){return new m7(e,!1)},curveLinearClosed:function(e){return new ge(e)},curveLinear:mq,curveMonotoneX:function(e){return new gi(e)},curveMonotoneY:function(e){return new ga(e)},curveNatural:function(e){return new go(e)},curveStep:function(e){return new gu(e,.5)},curveStepAfter:function(e){return new gu(e,1)},curveStepBefore:function(e){return new gu(e,0)}},gp=e=>eR(e.x)&&eR(e.y),gm=e=>null!=e.base&&gp(e.base)&&gp(e),gg=e=>e.x,gv=e=>e.y,gy=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,a=ik();if((!r||!r.length)&&!n)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},o=r&&r.length?(e=>{var t=e.type,r=e.points,n=void 0===r?[]:r,i=e.baseLine,a=e.layout,s=e.connectNulls,o=void 0!==s&&s,l=((e,t)=>{if("function"==typeof e)return e;var r="curve".concat(eo(e));if(("curveMonotone"===r||"curveBump"===r)&&t){var n=gf["".concat(r).concat("vertical"===t?"Y":"X")];if(n)return n}return gf[r]||mq})(void 0===t?"linear":t,a),u=o?n.filter(gp):n;
1if(Array.isArray(i)){var c=n.map((e,t)=>gh(gh({},e),{},{base:i[t]}));return("vertical"===a?m3().y(gv).x1(gg).x0(e=>e.base.x):m3().x(gg).y1(gv).y0(e=>e.base.y)).defined(gm).curve(l)(o?c.filter(gm):c)}return("vertical"===a&&J(i)?m3().y(gv).x1(gg).x0(i):J(i)?m3().x(gg).y1(gv).y0(i):m2().x(gg).y(gv)).defined(gp).curve(l)(u)})(s):n;return R.createElement("path",gc({},z(e),sI(e),{className:(0,L.clsx)("recharts-curve",t),d:null===o?void 0:o,ref:i}))};e.s(["Curve",0,gy],72733);var gx=rD({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),gb=gx.reducer,g_=gx.actions.createEventEmitter;e.s(["arrayTooltipSearcher",0,(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!K(r))return e[r]}},"createEventEmitter",0,g_,"optionsReducer",0,gb],25949);var gS=rD({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,i=r.endIndex;null!=n&&(e.dataStartIndex=n),null!=i&&(e.dataEndIndex=i)}}}),gw=gS.actions,gM=gw.setChartData,gT=gw.setDataStartEndIndexes;gw.setComputedData;var gE=gS.reducer,gA=nC([(e,t)=>t,iD,i4,oc,f4,f7,pV,it],pJ);function gC(e){var t,r,n=e.currentTarget.getBoundingClientRect();if("getBBox"in e.currentTarget&&"function"==typeof e.currentTarget.getBBox){var i=e.currentTarget.getBBox();t=i.width>0?n.width/i.width:1,r=i.height>0?n.height/i.height:1}else{var a=e.currentTarget;t=a.offsetWidth>0?n.width/a.offsetWidth:1,r=a.offsetHeight>0?n.height/a.offsetHeight:1}var s=(e,i)=>({relativeX:Math.round((e-n.left)/t),relativeY:Math.round((i-n.top)/r)});return"touches"in e?Array.from(e.touches).map(e=>s(e.clientX,e.clientY)):s(e.clientX,e.clientY)}var gP=rM("mouseClick"),gI=nr();gI.startListening({actionCreator:gP,effect:(e,t)=>{var r=e.payload,n=gA(t.getState(),gC(r));(null==n?void 0:n.activeIndex)!=null&&t.dispatch(fh({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var gO=rM("mouseMove"),gR=nr(),gL=null,gN=null,gD=null;function gk(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}gR.startListening({actionCreator:gO,effect:(e,t)=>{var r=e.payload,n=t.getState().eventSettings,i=n.throttleDelay,a=n.throttledEvents,s="all"===a||(null==a?void 0:a.includes("mousemove"));null!==gL&&(cancelAnimationFrame(gL),gL=null),null===gN||"number"==typeof i&&s||(clearTimeout(gN),gN=null),gD=gC(r);var o=()=>{var e=t.getState(),r=fe(e,e.tooltip.settings.shared);if(!gD){gL=null,gN=null;return}if("axis"===r){var n=gA(e,gD);(null==n?void 0:n.activeIndex)!=null?t.dispatch(fd({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate})):t.dispatch(fc())}gL=null,gN=null};s?"raf"===i?gL=requestAnimationFrame(o):"number"==typeof i&&null===gN&&(gN=setTimeout(o,i)):o()}});var gU=rD({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=t2(e).dots.findIndex(e=>e===t.payload);-1!==r&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=t2(e).areas.findIndex(e=>e===t.payload);-1!==r&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=t2(e).lines.findIndex(e=>e===t.payload);-1!==r&&e.lines.splice(r,1)}}}),gF=gU.actions,gz=(gF.addDot,gF.removeDot,gF.addArea),gj=gF.removeArea,gB=gF.addLine,gV=gF.removeLine,gG=gU.reducer;e.s(["addArea",0,gz,"addLine",0,gB,"referenceElementsReducer",0,gG,"removeArea",0,gj,"removeLine",0,gV],31725);var gH={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},gW=rD({name:"brush",initialState:gH,reducers:{setBrushSettings:(e,t)=>null==t.payload?gH:t.payload}});gW.actions.setBrushSettings;var gX=gW.reducer,gq={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},gY=rD({name:"rootProps",initialState:gq,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!=(r=t.payload.barGap)?r:gq.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),g$=gY.reducer,gK=gY.actions.updateOptions,gZ=rD({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),gJ=gZ.actions;
vendor: 4,301 bytes, line 1
1gJ.addRadiusAxis,gJ.removeRadiusAxis,gJ.addAngleAxis,gJ.removeAngleAxis;var gQ=gZ.reducer,g0=rD({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>null===e?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}});g0.actions.updatePolarOptions;var g1=g0.reducer,g2=rM("keyDown"),g3=rM("focus"),g4=rM("blur"),g5=nr(),g6=null,g8=null,g9=null;function g7(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(e,r)=>{if("currentTarget"===r)return t;var n=Reflect.get(e,r);return"function"==typeof n?n.bind(e):n}})}g5.startListening({actionCreator:g2,effect:(e,t)=>{g9=e.payload,null!==g6&&(cancelAnimationFrame(g6),g6=null);var r=t.getState().eventSettings,n=r.throttleDelay,i=r.throttledEvents,a="all"===i||i.includes("keydown");null===g8||"number"==typeof n&&a||(clearTimeout(g8),g8=null);var s=()=>{try{var e,r=t.getState();if(!1===r.rootProps.accessibilityLayer)return;var n=r.tooltip.keyboardInteraction,i=g9;if("ArrowRight"!==i&&"ArrowLeft"!==i&&"Enter"!==i)return;var a=fx(n,fD(r),dq(r),f0(r)),s=null==a?-1:Number(a),o=!Number.isFinite(s)||s<0,l=f7(r),u=fD(r),c=fe(r,r.tooltip.settings.shared);if("Enter"===i){if(o)return;var d=pq(r,c,"hover",String(n.index));t.dispatch(fp({active:!n.active,activeIndex:n.index,activeCoordinate:d}));return}var h=h4(r),f="left-to-right"===h?1:-1,p="ArrowRight"===i?1:-1;if(o){var m=dq(r),g=f0(r),v=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(e=-1,p*f>0){for(var y=0;y<u.length;y++)if(null!=fx(v(y),u,m,g)){e=y;break}}else for(var x=u.length-1;x>=0;x--)if(null!=fx(v(x),u,m,g)){e=x;break}if(e<0)return}else{e=s+p*f;var b=(null==l?void 0:l.length)||u.length;if(0===b||e>=b||e<0)return}var _=pq(r,c,"hover",String(e));t.dispatch(fp({active:!0,activeIndex:e.toString(),activeCoordinate:_}))}finally{g6=null,g8=null}};a?"raf"===n?g6=requestAnimationFrame(s):"number"==typeof n&&null===g8&&(s(),g9=null,g8=setTimeout(()=>{g9?s():(g8=null,g6=null)},n)):s()}}),g5.startListening({actionCreator:g3,effect:(e,t)=>{var r=t.getState();if(!1!==r.rootProps.accessibilityLayer){var n=r.tooltip.keyboardInteraction;if(!n.active&&null==n.index){var i=fe(r,r.tooltip.settings.shared),a=pq(r,i,"hover",String("0"));t.dispatch(fp({active:!0,activeIndex:"0",activeCoordinate:a}))}}}}),g5.startListening({actionCreator:g4,effect:(e,t)=>{var r=t.getState();if(!1!==r.rootProps.accessibilityLayer){var n=r.tooltip.keyboardInteraction;n.active&&t.dispatch(fp({active:!1,activeIndex:n.index,activeCoordinate:n.coordinate}))}}});var ve=rM("externalEvent"),vt=nr(),vr=new Map,vn=new Map,vi=new Map;vt.startListening({actionCreator:ve,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(null!=n){var a=i.type,s=g7(i);vi.set(a,{handler:n,reactEvent:s});var o=vr.get(a);void 0!==o&&(cancelAnimationFrame(o),vr.delete(a));var l=t.getState().eventSettings,u=l.throttleDelay,c=l.throttledEvents,d="all"===c||(null==c?void 0:c.includes(a)),h=vn.get(a);void 0===h||"number"==typeof u&&d||(clearTimeout(h),vn.delete(a));var f=()=>{var e=vi.get(a);try{if(!e)return;var r=e.handler,n=e.reactEvent,i=t.getState(),s={activeCoordinate:pc(i),activeDataKey:ps(i),activeIndex:pi(i),activeLabel:pa(i),activeTooltipIndex:pi(i),isTooltipActive:pd(i)};r&&r(s,n)}finally{vr.delete(a),vn.delete(a),vi.delete(a)}};if(!d)return void f();if("raf"===u){var p=requestAnimationFrame(f);vr.set(a,p)}else if("number"==typeof u){if(!vn.has(a)){f();var m=setTimeout(f,u);vn.set(a,m)}}else f()}}});var va=nC([fw],e=>e.tooltipItemPayloads),vs=nC([va,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(null!=t){var n=e.find(e=>e.settings.graphicalItemId===r);if(null!=n){var i=n.getPosition;if(null!=i)return i(t)}}}),vo=rM("touchMove"),vl=nr(),vu=null,vc=null,vd=null,vh=null;vl.startListening({actionCreator:vo,effect:(e,t)=>{var r=e.payload;if(null!=r.touches&&0!==r.touches.length){vh=g7(r);var n=t.getState().eventSettings,i=n.throttleDelay,a=n.throttledEvents,s="all"===a||a.includes("touchmove");null!==vu&&(cancelAnimationFrame(vu),vu=null),null===vc||"number"==typeof i&&s||(clearTimeout(vc),vc=null),vd=Array.from(r.touches).map(e=>gC({clientX:e.clientX,clientY:e.clientY,currentTarget:r.currentTarget}));var o=()=>
1{if(null!=vh){var e=t.getState(),r=fe(e,e.tooltip.settings.shared);if("axis"===r){var n,i=null==(n=vd)?void 0:n[0];if(null==i){vu=null,vc=null;return}var a=gA(e,i);(null==a?void 0:a.activeIndex)!=null&&t.dispatch(fd({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if("item"===r){var s,o=vh.touches[0];if(null==document.elementFromPoint||null==o)return;var l=document.elementFromPoint(o.clientX,o.clientY);if(!l||!l.getAttribute)return;var u=l.getAttribute("data-recharts-item-index"),c=null!=(s=l.getAttribute("data-recharts-item-id"))?s:void 0,d=fO(e).find(e=>e.id===c);if(null==u||null==d||null==c)return;var h=d.dataKey,f=vs(e,u,c);t.dispatch(fu({activeDataKey:h,activeIndex:u,activeCoordinate:f,activeGraphicalItemId:c}))}vu=null,vc=null}};if(!s)return void o();"raf"===i?vu=requestAnimationFrame(o):"number"==typeof i&&null===vc&&(o(),vh=null,vc=setTimeout(()=>{vh?o():(vc=null,vu=null)},i))}}});var vf=rD({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,a=r.next;e[n]&&(e[n]=e[n].map(e=>e.dataKey===i.dataKey&&e.direction===i.direction?a:e))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(e=>e.dataKey!==i.dataKey||e.direction!==i.direction))}}}),vp=vf.actions;vp.addErrorBar,vp.replaceErrorBar,vp.removeErrorBar;var vm=vf.reducer,vg={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},vv=rD({name:"eventSettings",initialState:vg,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),vy=vv.actions.setEventSettings,vx=vv.reducer,vb=rD({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,a=r.ticks;e[n][i]=a},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),v_=vb.actions,vS=v_.setRenderedTicks,vw=v_.removeRenderedTicks,vM=ry({brush:gX,cartesianAxis:pE,chartData:gE,errorBars:vm,eventSettings:vx,graphicalItems:mP,layout:nc,legend:p4,options:gb,polarAxis:gQ,polarOptions:g1,referenceElements:gG,renderedTicks:vb.reducer,rootProps:g$,tooltip:fm,zIndex:sn}),vT=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart";return function(e){let t,r,n,i=function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},a=new rT;return t&&("boolean"==typeof t?a.push(rS):a.push(r_(t.extraArgument))),a},{reducer:a,middleware:s,devTools:o=!0,duplicateMiddlewareCheck:l=!0,preloadedState:u,enhancers:c}=e||{};if("function"==typeof a)t=a;else if(rv(a))t=ry(a);else throw Error(nn(1));r="function"==typeof s?s(i):i();let d=rx;o&&(d=rw({trace:!1,..."object"==typeof o&&o}));let h=(n=function(...e){return t=>(r,n)=>{let i=t(r,n),a=()=>{throw Error(rf(15))},s={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=rx(...e.map(e=>e(s)))(i.dispatch),{...i,dispatch:a}}}(...r),function(e){let{autoBatch:t=!0}=e??{},r=new rT(n);return t&&r.push(rO("object"==typeof t?t:void 0)),r});return function e(t,r,n){if("function"!=typeof t)throw Error(rf(2));if("function"==typeof r&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw Error(rf(0));if("function"==typeof r&&void 0===n&&(n=r,r=void 0),void 0!==n){if("function"!=typeof n)throw Error(rf(1));return n(e)(t,r)}let i=t,a=r,s=new Map,o=s,l=0,u=!1;
1function c(){o===s&&(o=new Map,s.forEach((e,t)=>{o.set(t,e)}))}function d(){if(u)throw Error(rf(3));return a}function h(e){if("function"!=typeof e)throw Error(rf(4));if(u)throw Error(rf(5));let t=!0;c();let r=l++;return o.set(r,e),function(){if(t){if(u)throw Error(rf(6));t=!1,c(),o.delete(r),s=null}}}function f(e){if(!rv(e))throw Error(rf(7));if(void 0===e.type)throw Error(rf(8));if("string"!=typeof e.type)throw Error(rf(17));if(u)throw Error(rf(9));try{u=!0,a=i(a,e)}finally{u=!1}return(s=o).forEach(e=>{e()}),e}return f({type:rg.INIT}),{dispatch:f,subscribe:h,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw Error(rf(10));i=e,f({type:rg.REPLACE})},[rp]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(rf(11));function t(){e.next&&e.next(d())}return t(),{unsubscribe:h(t)}},[rp](){return this}}}}}(t,u,d(..."function"==typeof c?c(h):h()))}({reducer:vM,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([gI.middleware,gR.middleware,g5.middleware,vt.middleware,vl.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(rO({type:"raf"}))},devTools:ec.devToolsEnabled&&{serialize:{replacer:gk},name:"recharts-".concat(t)}})};function vE(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=is(),a=(0,R.useRef)(null);return i?r:(null==a.current&&(a.current=vT(t,n)),R.createElement(mB,{context:e1,store:a.current},r))}var vA=e=>{var t=e.chartData,r=e3(),n=is();return(0,R.useEffect)(()=>n?()=>{}:(r(gM(t)),()=>{r(gM(void 0))}),[t,r,n]),null},vC=(0,R.memo)(function(e){var t=e.layout,r=e.margin,n=e3(),i=is();return(0,R.useEffect)(()=>{i||(n(no(t)),n(ns(r)))},[n,i,t,r]),null},mW);function vP(e){var t=e3();return(0,R.useEffect)(()=>{t(gK(e))},[t,e]),null}var vI=(0,R.memo)(e=>{var t=e3();return(0,R.useEffect)(()=>{t(vy(e))},[t,e]),null},mW),vO=()=>{var e;return null==(e=e8(e=>e.rootProps.accessibilityLayer))||e},vR=["children","width","height","viewBox","className","style","title","desc"];function vL(){return(vL=Object.assign.bind()).apply(null,arguments)}var vN=(0,R.forwardRef)((e,t)=>{var r=e.children,n=e.width,i=e.height,a=e.viewBox,s=e.className,o=e.style,l=e.title,u=e.desc,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,vR),d=a||{width:n,height:i,x:0,y:0},h=(0,L.clsx)("recharts-surface",s);return R.createElement("svg",vL({},B(c),{className:h,width:n,height:i,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),R.createElement("title",null,l),R.createElement("desc",null,u),r)});function vD(e){var t=e.zIndex,r=e.isPanorama,n=(0,R.useRef)(null),i=e3();return(0,R.useLayoutEffect)(()=>(n.current&&i(st({zIndex:t,element:n.current,isPanorama:r})),()=>{i(sr({zIndex:t,isPanorama:r}))}),[i,t,r]),R.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function vk(e){var t=e.children,r=e.isPanorama,n=e8(i9);if(!n||0===n.length)return t;var i=n.filter(e=>e<0),a=n.filter(e=>e>0);return R.createElement(R.Fragment,null,i.map(e=>R.createElement(vD,{key:e,zIndex:e,isPanorama:r})),t,a.map(e=>R.createElement(vD,{key:e,zIndex:e,isPanorama:r})))}var vU=["children"];function vF(){return(vF=Object.assign.bind()).apply(null,arguments)}var vz={width:"100%",height:"100%",display:"block"},vj=(0,R.forwardRef)((e,t)=>{var r,n,i=iL(),a=iN(),s=vO();if(!eL(i)||!eL(a))return null;var o=e.children,l=e.otherAttributes,u=e.title,c=e.desc;return null!=l&&(r="number"==typeof l.tabIndex?l.tabIndex:s?0:void 0,n="string"==typeof l.role?l.role:s?"application":void 0),R.createElement(vN,vF({},l,{title:u,desc:c,role:n,tabIndex:r,width:i,height:a,style:vz,ref:t}),o)}),vB=e=>{var t=e.children,r=e8(il);if(!r)return null;var n=r.width,i=r.height,a=r.y,s=r.x;return R.createElement(vN,{width:n,height:i,x:s,y:a},t)},vV=(0,R.forwardRef)((e,t)=>{var r=e.children,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,vU);return is()?R.createElement(vB,null,R.createElement(vk,{isPanorama:!0},r)):R.createElement(vj,vF({ref:t},n),R.createElement(vk,{isPanorama:!1},r))}),vG=new(e.i(78492)).default,vH="recharts.syncEvent.tooltip",vW="recharts.syncEvent.brush";function vX(e){return e.tooltip.syncInteraction}var vq=["x","y"];function vY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v$(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?vY(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vY(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function vK(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var vZ=(0,R.createContext)(null),vJ=(0,R.createContext)(null);function vQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v0(){return(v0=Object.assign.bind()).apply(null,arguments)}function v1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v2(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v2(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var v3=()=>{var e,t,r,n,i,a,s,o,l,u,c,d;return e=e3(),(0,R.useEffect)(()=>{e(g_())},[e]),t=e8(ot),r=e8(on),n=e3(),i=e8(or),a=e8(f7),s=ik(),o=iI(),l=e8(e=>e.rootProps.className),(0,R.useEffect)(()=>{if(null==t)return eu;var e=(e,l,u)=>{if(r!==u&&t===e){if(!1===l.payload.active)return void n(ff({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));
1if("index"===i){if(o&&null!=l&&null!=(c=l.payload)&&c.coordinate&&l.payload.sourceViewBox){var c,d,h=l.payload.coordinate,f=h.x,p=h.y,m=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(h,vq),g=l.payload.sourceViewBox,v=g.x,y=g.y,x=g.width,b=g.height,_=v$(v$({},m),{},{x:o.x+(x?(f-v)/x:0)*o.width,y:o.y+(b?(p-y)/b:0)*o.height});n(v$(v$({},l),{},{payload:v$(v$({},l.payload),{},{coordinate:_})}))}else n(l);return}if(null!=a){if("function"==typeof i){var S=i(a,{activeTooltipIndex:null==l.payload.index?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:null==l.payload.index?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate});d=a[S]}else"value"===i&&(d=a.find(e=>String(e.value)===l.payload.label));var w=l.payload.coordinate;if(null==w||null==o)return void n(ff({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));if(null==d)return void n(ff({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:void 0}));var M=w.x,T=w.y,E=Math.min(M,o.x+o.width),A=Math.min(T,o.y+o.height),C={x:"horizontal"===s?d.coordinate:E,y:"horizontal"===s?A:d.coordinate};n(ff({active:l.payload.active,coordinate:C,dataKey:l.payload.dataKey,index:String(d.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:l.payload.graphicalItemId}))}}};return vG.on(vH,e),()=>{vG.off(vH,e)}},[l,n,r,t,i,a,s,o]),u=e8(ot),c=e8(on),d=e3(),(0,R.useEffect)(()=>{if(null==u)return eu;var e=(e,t,r)=>{c!==r&&u===e&&d(gT(t))};return vG.on(vW,e),()=>{vG.off(vW,e)}},[d,c,u]),null};function v4(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var v5=(0,R.forwardRef)((e,t)=>{var r,n,i=(0,R.useRef)(null),a=v1((0,R.useState)({containerWidth:v4(null==(r=e.style)?void 0:r.width),containerHeight:v4(null==(n=e.style)?void 0:n.height)}),2),s=a[0],o=a[1],l=(0,R.useCallback)((e,t)=>{o(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),u=(0,R.useCallback)(e=>{if("function"==typeof t&&t(e),null!=i.current&&(i.current.disconnect(),i.current=null),null!=e&&"u">typeof ResizeObserver){var r=e.getBoundingClientRect();l(r.width,r.height);var n=new ResizeObserver(e=>{var t=e[0];if(null!=t){var r=t.contentRect;l(r.width,r.height)}});n.observe(e),i.current=n}},[t,l]);return(0,R.useEffect)(()=>()=>{var e=i.current;null!=e&&e.disconnect()},[l]),R.createElement(R.Fragment,null,R.createElement(ij,{width:s.containerWidth,height:s.containerHeight}),R.createElement("div",v0({ref:u},e)))}),v6=(0,R.forwardRef)((e,t)=>{var r=e.width,n=e.height,i=v1((0,R.useState)({containerWidth:v4(r),containerHeight:v4(n)}),2),a=i[0],s=i[1],o=(0,R.useCallback)((e,t)=>{s(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),l=(0,R.useCallback)(e=>{if("function"==typeof t&&t(e),null!=e){var r=e.getBoundingClientRect();o(r.width,r.height)}},[t,o]);return R.createElement(R.Fragment,null,R.createElement(ij,{width:a.containerWidth,height:a.containerHeight}),R.createElement("div",v0({ref:l},e)))}),v8=(0,R.forwardRef)((e,t)=>{var r=e.width,n=e.height;return R.createElement(R.Fragment,null,R.createElement(ij,{width:r,height:n}),R.createElement("div",v0({ref:t},e)))}),v9=(0,R.forwardRef)((e,t)=>{var r=e.width,n=e.height;return"string"==typeof r||"string"==typeof n?R.createElement(v6,v0({},e,{ref:t})):"number"==typeof r&&"number"==typeof n?R.createElement(v8,v0({},e,{width:r,height:n,ref:t})):R.createElement(R.Fragment,null,R.createElement(ij,{width:r,height:n}),R.createElement("div",v0({ref:t},e)))}),v7=(0,R.forwardRef)((e,t)=>{var r,n,i,a,s,o,l=e.children,u=e.className,c=e.height,d=e.onClick,h=e.onContextMenu,f=e.onDoubleClick,p=e.onMouseDown,m=e.onMouseEnter,g=e.onMouseLeave,v=e.onMouseMove,y=e.onMouseUp,x=e.onTouchEnd,b=e.onTouchMove,_=e.onTouchStart,S=e.style,w=e.width,M=e.responsive,T=e.dispatchTouchEvents,E=void 0===T||T,A=(0,R.useRef)(null),C=e3(),P=v1((0,R.useState)(null),2),I=P[0],O=P[1],N=v1((0,R.useState)(null),2),D=N[0],k=N[1],U=(r=e3(),a=(i=function(e){if(Array.isArray(e))return e}(n=(0,R.useState)(null))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}
1finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(n)||function(e){if(e){if("string"==typeof e)return vK(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vK(e,2):void 0}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],s=i[1],o=e8(n5),(0,R.useEffect)(()=>{if(null!=a){var e=a.getBoundingClientRect().width/a.offsetWidth;eR(e)&&e!==o&&r(nu(e))}},[a,r,o]),s),F=iA(),z=(null==F?void 0:F.width)>0?F.width:w,j=(null==F?void 0:F.height)>0?F.height:c,B=(0,R.useCallback)(e=>{U(e),"function"==typeof t&&t(e),O(e),k(e),null!=e&&(A.current=e)},[U,t,O,k]),V=(0,R.useCallback)(e=>{C(gP(e)),C(ve({handler:d,reactEvent:e}))},[C,d]),G=(0,R.useCallback)(e=>{C(gO(e)),C(ve({handler:m,reactEvent:e}))},[C,m]),H=(0,R.useCallback)(e=>{C(fc()),C(ve({handler:g,reactEvent:e}))},[C,g]),W=(0,R.useCallback)(e=>{C(gO(e)),C(ve({handler:v,reactEvent:e}))},[C,v]),X=(0,R.useCallback)(()=>{C(g3())},[C]),q=(0,R.useCallback)(()=>{C(g4())},[C]),Y=(0,R.useCallback)(e=>{C(g2(e.key))},[C]),$=(0,R.useCallback)(e=>{C(ve({handler:h,reactEvent:e}))},[C,h]),K=(0,R.useCallback)(e=>{C(ve({handler:f,reactEvent:e}))},[C,f]),Z=(0,R.useCallback)(e=>{C(ve({handler:p,reactEvent:e}))},[C,p]),J=(0,R.useCallback)(e=>{C(ve({handler:y,reactEvent:e}))},[C,y]),Q=(0,R.useCallback)(e=>{C(ve({handler:_,reactEvent:e}))},[C,_]),ee=(0,R.useCallback)(e=>{E&&C(vo(e)),C(ve({handler:b,reactEvent:e}))},[C,E,b]),et=(0,R.useCallback)(e=>{C(ve({handler:x,reactEvent:e}))},[C,x]);return R.createElement(vZ.Provider,{value:I},R.createElement(vJ.Provider,{value:D},R.createElement(M?v5:v9,{width:null!=z?z:null==S?void 0:S.width,height:null!=j?j:null==S?void 0:S.height,className:(0,L.clsx)("recharts-wrapper",u),style:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vQ(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vQ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({position:"relative",cursor:"default",width:z,height:j},S),onClick:V,onContextMenu:$,onDoubleClick:K,onFocus:X,onBlur:q,onKeyDown:Y,onMouseDown:Z,onMouseEnter:G,onMouseLeave:H,onMouseMove:W,onMouseUp:J,onTouchEnd:et,onTouchMove:ee,onTouchStart:Q,ref:B},R.createElement(v3,null),l)))});function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var yt=(0,R.createContext)(void 0),yr=e=>{var t,r=e.children,n=(function(e){if(Array.isArray(e))return e}(t=(0,R.useState)("".concat(et("recharts"),"-clip")))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),1!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(t)||function(e){if(e){if("string"==typeof e)return ye(e,1);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ye(e,1):void 0}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],i=pP();if(null==i)return null;var a=i.x,s=i.y,o=i.width,l=i.height;return R.createElement(yt.Provider,{value:n},R.createElement("defs",null,R.createElement("clipPath",{id:n},R.createElement("rect",{x:a,y:s,height:l,width:o}))),r)};e.s(["ClipPathProvider",0,yr,"useClipPathId",0,()=>(0,R.useContext)(yt)],89763);var yn=["width","height","responsive","children","className","style","compact","title","desc"],yi=(0,R.forwardRef)((e,t)=>
1{var r=e.width,n=e.height,i=e.responsive,a=e.children,s=e.className,o=e.style,l=e.compact,u=e.title,c=e.desc,d=z(function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,yn));return l?R.createElement(R.Fragment,null,R.createElement(ij,{width:r,height:n}),R.createElement(vV,{otherAttributes:d,title:u,desc:c},a)):R.createElement(v7,{className:s,style:o,width:r,height:n,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},R.createElement(vV,{otherAttributes:d,title:u,desc:c,ref:t},R.createElement(yr,null,a)))});function ya(){return(ya=Object.assign.bind()).apply(null,arguments)}function ys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var yo=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ys(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},vg),yl=(0,R.forwardRef)(function(e,t){var r,n=eO(e.categoricalChartProps,yo),i=e.chartName,a=e.defaultTooltipEventType,s=e.validateTooltipEventTypes,o=e.tooltipPayloadSearcher,l=e.categoricalChartProps;return R.createElement(vE,{preloadedState:{options:{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:o,eventEmitter:void 0}},reduxStoreName:null!=(r=l.id)?r:i},R.createElement(vA,{chartData:l.data}),R.createElement(vC,{layout:n.layout,margin:n.margin}),R.createElement(vI,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),R.createElement(vP,{baseValue:n.baseValue,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),R.createElement(yi,ya({},n,{ref:t})))});e.s(["CartesianChart",0,yl],33369);var yu=(e,t)=>{var r=e.x,n=e.y,i=t.x,a=t.y;return{x:Math.min(r,i),y:Math.min(n,a),width:Math.abs(i-r),height:Math.abs(a-n)}},yc=function(e){var t=e.width,r=e.height,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(n%180+180)%180*Math.PI/180,a=Math.atan(r/t);return Math.abs(i>a&&i<Math.PI-a?r/Math.sin(i):t/Math.cos(i))};function yd(e,t){if(t<1)return[];if(1===t)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];void 0!==i&&r.push(i)}return r}function yh(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function yf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?yf(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ym(e,t,r){var n,i,a,s,o,l,u=e.tick,c=e.ticks,d=e.viewBox,h=e.minTickGap,f=e.orientation,p=e.interval,m=e.tickFormatter,g=e.unit,v=e.angle;if(!c||!c.length||!u)return[];if(J(p)||ec.isSsr)return null!=(l=yd(c,(J(p)?p:0)+1))?l:[];var y="top"===f||"bottom"===f?"width":"height",x=g&&"width"===y?ev(g,{fontSize:t,letterSpacing:r}):{width:0,height:0},b=(e,n)=>{var i,a="function"==typeof m?m(e.value,n):e.value;return"width"===y?(i=ev(a,{fontSize:t,letterSpacing:r}),yc({width:i.width+x.width,height:i.height+x.height},v)):ev(a,{fontSize:t,letterSpacing:r})[y]},_=c[0],S=c[1],w=c.length>=2&&null!=_&&null!=S?$(S.coordinate-_.coordinate):1,M=(n="width"===y,i=d.x,a=d.y,s=d.width,o=d.height,1===w?{start:n?i:a,end:n?i+s:a+o}:{start:n?i+s:a+o,end:n?i:a});return"equidistantPreserveStart"===p?function(e,t,r,n,i){for(var a,s=(n||[]).slice(),o=t.start,l=t.end,u=0,c=1,d=o;c<=s.length;)if(a=function(){var t,a=null==n?void 0:n[u];if(void 0===a)return{v:yd(n,c)};var s=u,h=()=>(void 0===t&&(t=r(a,s)),t),f=a.coordinate,p=0===u||yh(e,f,h,d,l);p||(u=0,d=o,c+=1),p&&(d=f+e*(h()/2+i),u+=c)}())return a.v;return[]}(w,M,b,c,h):"equidistantPreserveEnd"===p?function(e,t,r,n,i){var a=(n||[]).slice().length;if(0===a)return[];for(var s=t.start,o=t.end,l=1;l<=a;l++){for(var u,c=(a-1)%l,d=s,h=!0,f=c;f<a&&(0===(u=function(){var t,a=n[f];if(null==a)return 0;var s=f,l=()=>(void 0===t&&(t=r(a,s)),t),u=a.coordinate,p=f===c||yh(e,u,l,d,o);if(!p)return h=!1,1;p&&(d=u+e*(l()/2+i))}())||1!==u);f+=l);if(h){for(var p=[],m=c;m<a;m+=l){var g=n[m];null!=g&&p.push(g)}return p}}return[]}(w,M,b,c,h):("preserveStart"===p||"preserveStartEnd"===p?function(e,t,r,n,i,a){var s=(n||[]).slice(),o=s.length,l=t.start,u=t.end;if(a){var c=n[o-1];if(null!=c){var d=r(c,o-1),h=e*(c.coordinate+e*d/2-u);s[o-1]=c=yp(yp({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate}),null!=c.tickCoord&&yh(e,c.tickCoord,()=>d,l,u)&&(u=c.tickCoord-e*(d/2+i),s[o-1]=yp(yp({},c),{},{isShow:!0}))}}for(var f=a?o-1:o,p=function(t){var n,a=s[t];if(null==a)return 1;var o=a,c=()=>(void 0===n&&(n=r(a,t)),n);if(0===t){var d=e*(o.coordinate-e*c()/2-l);s[t]=o=yp(yp({},o),{},{tickCoord:d<0?o.coordinate-d*e:o.coordinate})}else s[t]=o=yp(yp({},o),{},{tickCoord:o.coordinate});null!=o.tickCoord&&yh(e,o.tickCoord,c,l,u)&&(l=o.tickCoord+e*(c()/2+i),s[t]=yp(yp({},o),{},{isShow:!0}))},m=0;m<f;m++)if(p(m))continue;return s}(w,M,b,c,h,"preserveStartEnd"===p):function(e,t,r,n,i){for(var a=(n||[]).slice(),s=a.length,o=t.start,l=t.end,u=function(t){var n,u=a[t];if(null==u)return 1;var c=u,d=()=>(void 0===n&&(n=r(u,t)),n);if(t===s-1){var h=e*(c.coordinate+e*d()/2-l);a[t]=c=yp(yp({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate})}else a[t]=c=yp(yp({},c),{},{tickCoord:c.coordinate});null!=c.tickCoord&&yh(e,c.tickCoord,d,o,l)&&(l=c.tickCoord-e*(d()/2+i),a[t]=yp(yp({},c),{},{isShow:!0}))},c=s-1;c>=0;c--)if(u(c))continue;return a}(w,M,b,c,h)).filter(e=>e.isShow)}e.s(["getAngledRectangleWidth",0,yc,"rectWithCoords",0,e=>yu({x:e.x1,y:e.y1},{x:e.x2,y:e.y2}),"rectWithPoints",0,yu],44171),e.s(["getTicks",0,ym],28108);var yg=e.i(13287),yv=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function yy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}
1finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yx(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yx(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yx(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function yb(){return(yb=Object.assign.bind()).apply(null,arguments)}function y_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yS(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y_(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var yw={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:iB.axis};function yM(e){var t=e.x,r=e.y,n=e.width,i=e.height,a=e.orientation,s=e.mirror,o=e.axisLine,l=e.otherSvgProps;if(!o)return null;var u=yS(yS(yS({},l),z(o)),{},{fill:"none"});if("top"===a||"bottom"===a){var c=+("top"===a&&!s||"bottom"===a&&s);u=yS(yS({},u),{},{x1:t,y1:r+c*i,x2:t+n,y2:r+c*i})}else{var d=+("left"===a&&!s||"right"===a&&s);u=yS(yS({},u),{},{x1:t+d*n,y1:r,x2:t+d*n,y2:r+i})}return R.createElement("line",yb({},u,{className:(0,L.clsx)("recharts-cartesian-axis-line",(0,X.default)(o,"className"))}))}function yT(e){var t,r=e.option,n=e.tickProps,i=e.value,a=(0,L.clsx)(n.className,"recharts-cartesian-axis-tick-value");if(R.isValidElement(r))t=R.cloneElement(r,yS(yS({},n),{},{className:a}));else if("function"==typeof r)t=r(yS(yS({},n),{},{className:a}));else{var s="recharts-cartesian-axis-tick-value";"boolean"!=typeof r&&(s=(0,L.clsx)(s,r&&"object"==typeof r&&"className"in r&&"string"==typeof r.className?r.className:"")),t=R.createElement(e$,yb({},n,{className:s}),i)}return t}function yE(e){var t=e.ticks,r=e.axisType,n=e.axisId,i=e3(),a=(0,R.useRef)(null);return(0,R.useEffect)(()=>{if(null!=n&&null!=r){var e=t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index})),s=a.current;null!=s&&s.axisId===n&&s.axisType===r&&(0,yg.default)(s.ticks,e)||(a.current={ticks:e,axisId:n,axisType:r},i(vS({ticks:e,axisId:n,axisType:r})))}},[i,t,n,r]),(0,R.useEffect)(()=>null==n||null==r?eu:()=>{i(vw({axisId:n,axisType:r}))},[i,n,r]),null}var yA=(0,R.forwardRef)((e,t)=>{var r=e.ticks,n=e.tick,i=e.tickLine,a=e.stroke,s=e.tickFormatter,o=e.unit,l=e.padding,u=e.tickTextProps,c=e.orientation,d=e.mirror,h=e.x,f=e.y,p=e.width,m=e.height,g=e.tickSize,v=e.tickMargin,y=e.fontSize,x=e.letterSpacing,b=e.getTicksConfig,_=e.events,S=e.axisType,w=e.axisId,M=ym(yS(yS({},b),{},{ticks:void 0===r?[]:r}),y,x),T=z(b),E=j(n),A=eV(T.textAnchor)?T.textAnchor:function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(c,d),C=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(c,d),P={};"object"==typeof i&&(P=i);var I=yS(yS({},T),{},{fill:"none"},P),O=M.map(e=>yS({entry:e},function(e,t,r,n,i,a,s,o,l){var u,c,d,h,f,p,m=o?-1:1,g=e.tickSize||s,v=J(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":u=c=e.coordinate,p=(d=(h=r+!o*i)-m*g)-m*l,f=v;break;case"left":d=h=e.coordinate,f=(u=(c=t+!o*n)-m*g)-m*l,p=v;break;case"right":d=h=e.coordinate,f=(u=(c=t+o*n)+m*g)+m*l,p=v;break;default:u=c=e.coordinate,p=(d=(h=r+o*i)+m*g)+m*l,f=v}return{line:{x1:u,y1:d,x2:c,y2:h},tick:{x:f,y:p}}}(e,h,f,p,m,c,g,d,v))),N=O.map(e=>{var t=e.entry,r=e.line;return R.createElement(W,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},i&&R.createElement("line",yb({},I,r,{className:(0,L.clsx)("recharts-cartesian-axis-tick-line",(0,X.default)(i,"className"))})))}),k=O.map((e,t)=>{var r,i,c=e.entry,d=e.tick,h=yS(yS(yS(yS({verticalAnchor:C},T),{},{textAnchor:A,stroke:"none",fill:a},d),{},{index:t,payload:c,visibleTicksCount:M.length,tickFormatter:s,padding:l},u),{},{angle:null!=(r=null!=(i=null==u?void 0:u.angle)?i:T.angle)?r:0}),f=yS(yS({},h),E);return R.createElement(W,yb({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(c.value,"-").concat(c.coordinate,"-").concat(c.tickCoord)},((e,t,r)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var n=null;return Object.keys(e).forEach(i=>
1{var a=e[i];D(i)&&"function"==typeof a&&(n||(n={}),n[i]=e=>(a(t,r,e),null))}),n})(_,c,t)),n&&R.createElement(yT,{option:n,tickProps:f,value:"".concat("function"==typeof s?s(c.value,t):c.value).concat(o||"")}))});return R.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(S,"-ticks")},R.createElement(yE,{ticks:M,axisId:w,axisType:S}),k.length>0&&R.createElement(si,{zIndex:iB.label},R.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(S,"-tick-labels"),ref:t},k)),N.length>0&&R.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(S,"-tick-lines")},N))}),yC=(0,R.forwardRef)((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,a=e.className,s=e.hide,o=e.ticks,l=e.axisType,u=e.axisId,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,yv),d=yy((0,R.useState)(""),2),h=d[0],f=d[1],p=yy((0,R.useState)(""),2),m=p[0],g=p[1],v=(0,R.useRef)(null);(0,R.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>{var t;return(e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=e.tickSize,a=e.tickMargin,s=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>s&&(s=t.width)}});var o=r?r.getBoundingClientRect().width:0;return Math.round(s+((void 0===i?0:i)+(void 0===a?0:a))+o+(r?void 0===n?5:n:0))}return 0})({ticks:v.current,label:null==(t=e.labelRef)?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})},getCalculatedHeight:()=>{var t;return(e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=e.tickSize,a=e.tickMargin,s=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.height>s&&(s=t.height)}});var o=r?r.getBoundingClientRect().height:0;return Math.round(s+((void 0===i?0:i)+(void 0===a?0:a))+o+(r?void 0===n?5:n:0))}return 0})({ticks:v.current,label:null==(t=e.labelRef)?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var y=(0,R.useCallback)(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=t;var r=t[0];if(r){var n=window.getComputedStyle(r),i=n.fontSize,a=n.letterSpacing;(i!==h||a!==m)&&(f(i),g(a))}}},[h,m]);return s||null!=n&&n<=0||null!=i&&i<=0?null:R.createElement(si,{zIndex:e.zIndex},R.createElement(W,{className:(0,L.clsx)("recharts-cartesian-axis",a)},R.createElement(yM,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:z(e)}),R.createElement(yA,{ref:y,axisType:l,events:c,fontSize:h,getTicksConfig:e,height:e.height,letterSpacing:m,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:o,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),R.createElement(sh,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},R.createElement(sx,{label:e.label,labelRef:e.labelRef}),e.children)))}),yP=R.forwardRef((e,t)=>{var r=eO(e,yw);return R.createElement(yC,yb({},r,{ref:t}))});function yI(){return(yI=Object.assign.bind()).apply(null,arguments)}function yO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yR(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yO(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yO(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function yL(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function yN(e){return Array.isArray(e)&&Q(e[0])&&Q(e[1])?e.join(" ~ "):e}yP.displayName="CartesianAxis",e.s(["CartesianAxis",0,yP,"defaultCartesianAxisProps",0,yw],9928);var yD={margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},yk={display:"block",paddingTop:4,paddingBottom:4,color:"#000"},yU={},yF=e=>{var t=e.separator,r=void 0===t?" : ":t,n=e.contentStyle,i=e.itemStyle,a=e.labelStyle,s=e.payload,o=e.formatter,l=e.itemSorter,u=e.wrapperClassName,c=e.labelClassName,d=e.label,h=e.labelFormatter,f=e.accessibilityLayer,p=yR(yR({},yD),n),m=yR({margin:0},void 0===a?yU:a),g=!es(d),v=g?d:"",y=(0,L.clsx)("recharts-default-tooltip",u),x=(0,L.clsx)("recharts-tooltip-label",c);return g&&h&&null!=s&&(v=h(d,s)),R.createElement("div",yI({className:y,style:p},void 0!==f&&f?{role:"status","aria-live":"assertive"}:{}),R.createElement("p",{className:x,style:m},R.isValidElement(v)?v:"".concat(v)),(()=>{if(s&&s.length){var e=(null==l?s:(0,nI.default)(s,l)).map((e,t)=>{if(!e||"none"===e.type)return null;var n=e.formatter||o||yN,a=e.value,l=e.name,u=a,c=l,d=n(a,l,e,t,s);if(Array.isArray(d)){var h=function(e){if(Array.isArray(e))return e}(d)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(d)||function(e){if(e){if("string"==typeof e)return yL(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?yL(e,2):void 0}}(d)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();u=h[0],c=h[1]}else{if(null==d)return null;u=d}var f=yR(yR({},yk),{},{color:e.color||yk.color},i);return R.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:f},Q(c)?R.createElement("span",{className:"recharts-tooltip-item-name"},c):null,Q(c)?R.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,R.createElement("span",{className:"recharts-tooltip-item-value"},u),R.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return R.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},yz="recharts-tooltip-wrapper",yj={visibility:"hidden"};function yB(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offset,a=e.position,s=e.reverseDirection,o=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&J(a[n]))return a[n];var c=r[n]-o-(i>0?i:0),d=r[n]+i;if(t[n])return s[n]?c:d;var h=l[n];return null==h?0:s[n]?c<h?Math.max(d,h):Math.max(c,h):null==u?0:d+o>h+u?Math.max(c,h):Math.max(d,h)}function yV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yV(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yV(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function yH(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var yW=R.memo(function(e){var t,r,n,i,a,s,o,l,u,c,d,h,f,p,m,g,v,y,x,b,_,S,w,M,T,E,A,C=mn(),P=function(e){if(Array.isArray(e))return e}(_=R.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(_)||function(e){if(e){if("string"==typeof e)return yH(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?yH(e,2):void 0}}(_)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),I=P[0],O=P[1];R.useEffect(()=>{var t=t=>
1{if("Escape"===t.key){var r,n,i,a;O({dismissed:!0,dismissedAtCoordinate:{x:null!=(r=null==(n=e.coordinate)?void 0:n.x)?r:0,y:null!=(i=null==(a=e.coordinate)?void 0:a.y)?i:0}})}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[null==(S=e.coordinate)?void 0:S.x,null==(w=e.coordinate)?void 0:w.y]),I.dismissed&&((null!=(M=null==(T=e.coordinate)?void 0:T.x)?M:0)!==I.dismissedAtCoordinate.x||(null!=(E=null==(A=e.coordinate)?void 0:A.y)?E:0)!==I.dismissedAtCoordinate.y)&&O(yG(yG({},I),{},{dismissed:!1}));var N=(h=(t={allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:"number"==typeof e.offset?e.offset:e.offset.x,offsetTop:"number"==typeof e.offset?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:e.lastBoundingBox,useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}).allowEscapeViewBox,f=t.coordinate,p=t.offsetTop,m=t.offsetLeft,g=t.position,v=t.reverseDirection,y=t.tooltipBox,x=t.useTranslate3d,b=t.viewBox,y&&y.height>0&&y.width>0&&f?(n=(r={translateX:c=yB({allowEscapeViewBox:h,coordinate:f,key:"x",offset:m,position:g,reverseDirection:v,tooltipDimension:y.width,viewBox:b,viewBoxDimension:b.width}),translateY:d=yB({allowEscapeViewBox:h,coordinate:f,key:"y",offset:p,position:g,reverseDirection:v,tooltipDimension:y.height,viewBox:b,viewBoxDimension:b.height}),useTranslate3d:x}).translateX,i=r.translateY,u={transform:r.useTranslate3d?"translate3d(".concat(n,"px, ").concat(i,"px, 0)"):"translate(".concat(n,"px, ").concat(i,"px)")}):u=yj,{cssProperties:u,cssClasses:(s=(a={translateX:c,translateY:d,coordinate:f}).coordinate,o=a.translateX,l=a.translateY,(0,L.clsx)(yz,{["".concat(yz,"-right")]:J(o)&&s&&J(s.x)&&o>=s.x,["".concat(yz,"-left")]:J(o)&&s&&J(s.x)&&o<s.x,["".concat(yz,"-bottom")]:J(l)&&s&&J(s.y)&&l>=s.y,["".concat(yz,"-top")]:J(l)&&s&&J(s.y)&&l<s.y}))}),D=N.cssClasses,k=N.cssProperties,U=e.hasPortalFromProps?{}:yG(yG({transition:function(e){if((!e.prefersReducedMotion||"auto"!==e.isAnimationActive)&&e.isAnimationActive&&e.active){var t="string"==typeof e.animationEasing?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}({prefersReducedMotion:C,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},k),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),F=yG(yG({},U),{},{visibility:!I.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return R.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:D,style:F,ref:e.innerRef},e.children)}),yX=e.i(92809);function yq(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function yY(e,t){return Math.abs(e.height-t.height)>1||Math.abs(e.left-t.left)>1||Math.abs(e.top-t.top)>1||Math.abs(e.width-t.width)>1}function y$(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}var yK=["x","y","top","left","width","height","className"];function yZ(){return(yZ=Object.assign.bind()).apply(null,arguments)}function yJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var yQ=e=>{var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,a=e.top,s=void 0===a?0:a,o=e.left,l=void 0===o?0:o,u=e.width,c=void 0===u?0:u,d=e.height,h=void 0===d?0:d,f=e.className,p=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yJ(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yJ(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({x:r,y:i,top:s,left:l,width:c,height:h},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,yK));return J(r)&&J(i)&&J(c)&&J(h)&&J(s)&&J(l)?R.createElement("path",yZ({},B(p),{className:(0,L.clsx)("recharts-cross",f),d:"M".concat(r,",").concat(s,"v").concat(h,"M").concat(l,",").concat(i,"h").concat(c)})):null},y0=["radius"],y1=["radius"];function y2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y2(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y2(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y4(){return(y4=Object.assign.bind()).apply(null,arguments)}function y5(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function y6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y8(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var y9=(e,t,r,n,i)=>{var a=q(r),s=q(n),o=Math.min(Math.abs(a)/2,Math.abs(s)/2),l=s>=0?1:-1,u=a>=0?1:-1,c=+(s>=0&&a>=0||s<0&&a<0);if(o>0&&Array.isArray(i)){for(var d=[0,0,0,0],h=0;h<4;h++){var f,p,T=null!=(p=i[h])?p:0;d[h]=T>o?o:T}f=Y(m||(m=y8(["M",",",""])),e,t+l*d[0]),d[0]>0&&(f+=Y(g||(g=y8(["A ",",",",0,0,",",",",",""])),d[0],d[0],c,e+u*d[0],t)),f+=Y(v||(v=y8(["L ",",",""])),e+r-u*d[1],t),d[1]>0&&(f+=Y(y||(y=y8(["A ",",",",0,0,",",\n ",",",""])),d[1],d[1],c,e+r,t+l*d[1])),f+=Y(x||(x=y8(["L ",",",""])),e+r,t+n-l*d[2]),d[2]>0&&(f+=Y(b||(b=y8(["A ",",",",0,0,",",\n ",",",""])),d[2],d[2],c,e+r-u*d[2],t+n)),f+=Y(_||(_=y8(["L ",",",""])),e+u*d[3],t+n),d[3]>0&&(f+=Y(S||(S=y8(["A ",",",",0,0,",",\n ",",",""])),d[3],d[3],c,e,t+n-l*d[3])),f+="Z"}else if(o>0&&i===+i&&i>0){var E=Math.min(o,i);f=Y(w||(w=y8(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+l*E,E,E,c,e+u*E,t,e+r-u*E,t,E,E,c,e+r,t+l*E,e+r,t+n-l*E,E,E,c,e+r-u*E,t+n,e+u*E,t+n,E,E,c,e,t+n-l*E)}else f=Y(M||(M=y8(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return f},y7={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},xe=e=>{let t,r;var n,i=eO(e,y7),a=(0,R.useRef)(null),s=function(e){if(Array.isArray(e))return e}(n=(0,R.useState)(-1))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}
1finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(n)||function(e){if(e){if("string"==typeof e)return y6(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y6(e,2):void 0}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=s[0],l=s[1];(0,R.useEffect)(()=>{if(a.current&&a.current.getTotalLength)try{var e=a.current.getTotalLength();e&&l(e)}catch(e){}},[]);var u=i.x,c=i.y,d=i.width,h=i.height,f=i.radius,p=i.className,m=i.animationEasing,g=i.animationDuration,v=i.animationBegin,y=i.isAnimationActive,x=i.isUpdateAnimationActive,b=(0,R.useRef)(d),_=(0,R.useRef)(h),S=(0,R.useRef)(u),w=(0,R.useRef)(c),M=mp((0,R.useMemo)(()=>({x:u,y:c,width:d,height:h,radius:f}),[u,c,d,h,f]),"rectangle-");if(u!==+u||c!==+c||d!==+d||h!==+h||0===d||0===h)return null;var T=(0,L.clsx)("recharts-rectangle",p);if(!x){var E=B(i),A=(E.radius,y5(E,y0));return R.createElement("path",y4({},A,{x:q(u),y:q(c),width:q(d),height:q(h),radius:"number"==typeof f?f:void 0,className:T,d:y9(u,c,d,h,f)}))}var C=b.current,P=_.current,I=S.current,O=w.current,N="0px ".concat(-1===o?1:o,"px"),D="".concat(o,"px ").concat(o,"px"),k=(t=["strokeDasharray"],r="string"==typeof m?m:y7.animationEasing,t.map(e=>"".concat(e.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase()))," ").concat(g,"ms ").concat(r)).join(","));return R.createElement(mf,{animationId:M,key:M,canBegin:o>0,duration:g,easing:m,isActive:x,begin:v},e=>{var t,r=ei(C,d,e),n=ei(P,h,e),s=ei(I,u,e),o=ei(O,c,e);a.current&&(b.current=r,_.current=n,S.current=s,w.current=o),t=y?e>0?{transition:k,strokeDasharray:D}:{strokeDasharray:N}:{strokeDasharray:D};var l=B(i),p=(l.radius,y5(l,y1));return R.createElement("path",y4({},p,{radius:"number"==typeof f?f:void 0,className:T,d:y9(s,o,r,n,f),ref:a,style:y3(y3({},t),i.style)}))})};function xt(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle;return{points:[eQ(t,r,n,i),eQ(t,r,n,a)],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function xr(){return(xr=Object.assign.bind()).apply(null,arguments)}function xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}e.s(["Rectangle",0,xe],29905);var xi=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,a=e.sign,s=e.isExternal,o=e.cornerRadius,l=e.cornerIsExternal,u=o*(s?1:-1)+n,c=Math.asin(o/u)/eJ,d=l?i:i+a*c,h=eQ(t,r,u,d);return{center:h,circleTangency:eQ(t,r,n,d),lineTangency:eQ(t,r,u*Math.cos(c*eJ),l?i-a*c:i),theta:c}},xa=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,a=e.startAngle,s=e.endAngle,o=$(s-a)*Math.min(Math.abs(s-a),359.999),l=a+o,u=eQ(t,r,i,a),c=eQ(t,r,i,l),d=Y(T||(T=xn(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),u.x,u.y,i,i,+(Math.abs(o)>180),+(a>l),c.x,c.y);if(n>0){var h=eQ(t,r,n,a),f=eQ(t,r,n,l);d+=Y(E||(E=xn(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),f.x,f.y,n,n,+(Math.abs(o)>180),+(a<=l),h.x,h.y)}else d+=Y(A||(A=xn(["L ",","," Z"])),t,r);return d},xs={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xo=e=>{var t,r=eO(e,xs),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,o=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,d=r.endAngle,h=r.className;if(s<a||c===d)return null;var f=(0,L.clsx)("recharts-sector",h),p=s-a,m=er(o,p,0,!0);return t=m>0&&360>Math.abs(c-d)?(e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,s=e.forceCornerRadius,o=e.cornerIsExternal,l=e.startAngle,u=e.endAngle,c=$(u-l),d=xi({cx:t,cy:r,radius:i,angle:l,sign:c,cornerRadius:a,cornerIsExternal:o}),h=d.circleTangency,f=d.lineTangency,p=d.theta,m=xi({cx:t,cy:r,radius:i,angle:u,sign:-c,cornerRadius:a,cornerIsExternal:o}),g=m.circleTangency,v=m.lineTangency,y=m.theta,x=o?Math.abs(l-u):Math.abs(l-u)-p-y;if(x<0)return s?Y(C||(C=xn(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),f.x,f.y,a,a,2*a,a,a,-(2*a)):xa({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:u});var b=Y(P||(P=xn(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),f.x,f.y,a,a,+(c<0),h.x,h.y,i,i,+(x>180),+(c<0),g.x,g.y,a,a,+(c<0),v.x,v.y);if(n>0){var _=xi({cx:t,cy:r,radius:n,angle:l,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:o}),S=_.circleTangency,w=_.lineTangency,M=_.theta,T=xi({cx:t,cy:r,radius:n,angle:u,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:o}),E=T.circleTangency,A=T.lineTangency,R=T.theta,L=o?Math.abs(l-u):Math.abs(l-u)-M-R;if(L<0&&0===a)return"".concat(b,"L").concat(t,",").concat(r,"Z");b+=Y(I||(I=xn(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),A.x,A.y,a,a,+(c<0),E.x,E.y,n,n,+(L>180),+(c>0),S.x,S.y,a,a,+(c<0),w.x,w.y)}else b+=Y(O||(O=xn(["L",",","Z"])),t,r);return b})({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(m,p/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:d}):xa({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:c,endAngle:d}),R.createElement("path",xr({},B(r),{className:f,d:t}))};function xl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?xl(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xl(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xc(){return(xc=Object.assign.bind()).apply(null,arguments)}function xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xd(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xf(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return(0,R.isValidElement)(t)?(0,R.cloneElement)(t,n):(0,R.createElement)(r,n)}function xp(e){var t,r,n,i,a,s=e.coordinate,o=e.payload,l=e.index,u=e.offset,c=e.tooltipAxisBandSize,d=e.layout,h=e.cursor,f=e.tooltipEventType,p=e.chartName;if(!h||!s||"ScatterChart"!==p&&"axis"!==f)return null;if("ScatterChart"===p)n=s,i=yQ,a=iB.cursorLine;else if("BarChart"===p)t=c/2,n={stroke:"none",fill:"#ccc",x:"horizontal"===d?s.x-t:u.left+.5,y:"horizontal"===d?u.top+.5:s.y-t,width:"horizontal"===d?c:u.width-1,height:"horizontal"===d?u.height-1:c},i=xe,a=iB.cursorRectangle;else if("radial"===d&&sP(s)){var m=xt(s),g=m.cx,v=m.cy,y=m.radius;n={cx:g,cy:v,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:y,outerRadius:y},i=xo,a=iB.cursorLine}else n={points:function(e,t,r){if("horizontal"===e)return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if("vertical"===e)return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(sP(t)){if("centric"===e){var n=t.cx,i=t.cy,a=t.innerRadius,s=t.outerRadius,o=t.angle,l=eQ(n,i,a,o),u=eQ(n,i,s,o);return[{x:l.x,y:l.y},{x:u.x,y:u.y}]}return xt(t)}}(d,s,u)},i=gy,a=iB.cursorLine;var x="object"==typeof h&&"className"in h?h.className:void 0,b=xh(xh(xh(xh({stroke:"#ccc",pointerEvents:"none"},u),n),j(h)),{},{payload:o,payloadIndex:l,className:(0,L.clsx)("recharts-tooltip-cursor",x)});return R.createElement(si,{zIndex:null!=(r=e.zIndex)?r:a},R.createElement(xf,{cursor:h,cursorComp:i,cursorProps:b}))}function xm(e){var t,r,n,i=(t=e8(dX),r=e8(f7),n=e8(f6),t&&n?nQ(xu(xu({},t),{},{scale:n}),r):nQ(void 0,r)),a=iR(),s=ik(),o=pF();return null==i||null==a||null==s||null==o?null:R.createElement(xp,xc({},e,{offset:a,layout:s,tooltipAxisBandSize:i,chartName:o}))}function xg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xg(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function xx(e){return e.dataKey}var xb=[],x_={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};e.s(["Tooltip",0,function(e){var t,r,n,i,a,s,o,l,u,c,d,h,f=eO(e,x_),p=f.active,m=f.allowEscapeViewBox,g=f.animationDuration,v=f.animationEasing,y=f.content,x=f.filterNull,b=f.isAnimationActive,_=f.offset,S=f.payloadUniqBy,w=f.position,M=f.reverseDirection,T=f.useTranslate3d,E=f.wrapperStyle,A=f.cursor,C=f.shared,P=f.trigger,I=f.defaultIndex,O=f.portal,L=f.axisId,N=e3(),D="number"==typeof I?String(I):I;(0,R.useEffect)(()=>{N(fl({shared:C,trigger:P,axisId:L,active:p,defaultIndex:D}))},[N,C,P,L,p,D]);var k=iI(),U=vO(),F=e8(e=>fe(e,C)),z=null!=(d=e8(e=>pZ(e,F,P,D)))?d:{},j=z.activeIndex,B=z.isActive,V=e8(e=>pK(e,F,P,D)),G=e8(e=>p$(e,F,P,D)),H=e8(e=>pY(e,F,P,D)),W=(0,R.useContext)(vZ),X=null!=(h=null!=p?p:B)&&h,q=function(e){if(Array.isArray(e))return e}(t=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=function(e){if(Array.isArray(e))return e}(e=(0,R.useState)({height:0,left:0,top:0,width:0}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(e)||function(e){if(e){if("string"==typeof e)return yq(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?yq(e,2):void 0}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],i=r[1],a=(0,R.useRef)(null),s=(0,R.useRef)(n);s.current=n;var o=(0,R.useCallback)(e=>{if(null!=a.current&&(a.current.disconnect(),a.current=null),null!=e){var t=y$(e);if(yY(t,s.current)&&i(t),"u">typeof ResizeObserver){var r=new ResizeObserver(()=>{var t=y$(e);yY(t,s.current)&&i(t)});r.observe(e),a.current=r}}},[...t]);return(0,R.useEffect)(()=>()=>{var e;null==(e=a.current)||e.disconnect()},[]),[n,o]}([V,X]))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,s=[],o=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(s.push(r.value),2!==s.length);o=!0);}catch(e){l=!0,n=e}finally{try{if(!o&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(t)||function(e){if(e){if("string"==typeof e)return xy(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xy(e,2):void 0}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),Y=q[0],$=q[1],K="axis"===F?G:void 0;r=e8(e=>pW(e,F,P)),n=e8(po),i=e8(on),a=e8(ot),s=e8(or),l=(null==(o=e8(vX))?void 0:o.sourceViewBox)!=null,u=iI(),(0,R.useEffect)(()=>{if(!l&&null!=a&&null!=i){var e=ff({active:X,coordinate:H,dataKey:r,index:j,label:"number"==typeof K?String(K):K,sourceViewBox:u,graphicalItemId:n});vG.emit(vH,a,e,i)}},[l,H,r,n,j,K,i,a,s,X,u]);var Z=null!=O?O:W;if(null==Z||null==k||null==F)return null;var J=null!=V?V:xb;X||(J=xb),x&&J.length&&(c=J.filter(e=>null!=e.value&&(!0!==e.hide||f.includeHidden)),J=!0===S?(0,yX.default)(c,xx):"function"==typeof S?(0,yX.default)(c,S):c);var Q=J.length>0,ee=xv(xv({},f),{},{payload:J,label:K,active:X,activeIndex:j,coordinate:H,accessibilityLayer:U}),et=R.createElement(yW,{allowEscapeViewBox:m,animationDuration:g,animationEasing:v,isAnimationActive:b,active:X,coordinate:H,hasPayload:Q,offset:_,position:w,reverseDirection:M,useTranslate3d:T,viewBox:k,wrapperStyle:E,lastBoundingBox:Y,innerRef:$,hasPortalFromProps:!!O},R.isValidElement(y)?R.cloneElement(y,ee):"function"==typeof y?R.createElement(y,ee):R.createElement(yF,ee));return R.createElement(R.Fragment,null,(0,i5.createPortal)(et,Z),X&&R.createElement(xm,{cursor:A,tooltipEventType:F,coordinate:H,payload:J,index:j}))}],34239);var xS=["domain","range"],xw=["domain","range"];function xM(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xT(e,t){return e===t||!!(Array.isArray(e)&&2===e.length&&Array.isArray(t))&&2===t.length&&e[0]===t[0]&&e[1]===t[1]}function xE(e,t){if(e===t)return!0;var r=e.domain,n=e.range,i=xM(e,xS),a=t.domain,s=t.range,o=xM(t,xw);return!!xT(r,a)&&!!xT(n,s)&&mW(i,o)}var xA=["type"],xC=["dangerouslySetInnerHTML","ticks","scale"],xP=["id","scale"];function xI(){return(xI=Object.assign.bind()).apply(null,arguments)}function xO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xR(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?xO(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xO(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xL(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xN(e){var t=e3(),r=(0,R.useRef)(null),n=iU(),i=e.type,a=xL(e,xA),s=iW(n,"xAxis",i),o=(0,R.useMemo)(()=>{if(null!=s)return xR(xR({},a),{},{type:s})},[a,s]);return(0,R.useLayoutEffect)(()=>{null!=o&&(null===r.current?t(py(o)):r.current!==o&&t(px({prev:r.current,next:o})),r.current=o)},[o,t]),(0,R.useLayoutEffect)(()=>()=>{r.current&&(t(pb(r.current)),r.current=null)},[t]),null}var xD=e=>{var t=e.xAxisId,r=e.className,n=e.height,i=e.label,a=(0,R.useRef)(null),s=(0,R.useRef)(null),o=e8(ii),l=is(),u=e3(),c="xAxis",d=e8(e=>hQ(e,c,t,l)),h=e8(e=>hH(e,t)),f=e8(e=>hq(e,t)),p=e8(e=>dm(e,t));if((0,R.useLayoutEffect)(()=>{if(!("auto"!==n||!h||sm(i)||(0,R.isValidElement)(i))&&null!=p){var e=a.current;if(e){var r=e.getCalculatedHeight();Math.round(h.height)!==Math.round(r)&&u(pT({id:t,height:r}))}}},[d,h,u,i,t,n,p]),null==h||null==f||null==p)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=xL(e,xC);p.id,p.scale;var g=xL(p,xP);return R.createElement(yP,xI({},m,g,{ref:a,labelRef:s,x:f.x,y:f.y,width:h.width,height:h.height,className:(0,L.clsx)("recharts-".concat(c," ").concat(c),r),viewBox:o,ticks:d,axisType:c,axisId:t}))},xk={allowDataOverflow:dp.allowDataOverflow,allowDecimals:dp.allowDecimals,allowDuplicatedCategory:dp.allowDuplicatedCategory,angle:dp.angle,axisLine:yw.axisLine,height:dp.height,hide:!1,includeHidden:dp.includeHidden,interval:dp.interval,label:!1,minTickGap:dp.minTickGap,mirror:dp.mirror,orientation:dp.orientation,padding:dp.padding,reversed:dp.reversed,scale:dp.scale,tick:dp.tick,tickCount:dp.tickCount,tickLine:yw.tickLine,tickSize:yw.tickSize,type:dp.type,niceTicks:dp.niceTicks,xAxisId:0},xU=R.memo(e=>{var t=eO(e,xk);return R.createElement(R.Fragment,null,R.createElement(xN,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),R.createElement(xD,t))},xE);xU.displayName="XAxis",e.s(["XAxis",0,xU],85183);var xF=["type"],xz=["dangerouslySetInnerHTML","ticks","scale"],xj=["id","scale"];function xB(){return(xB=Object.assign.bind()).apply(null,arguments)}function xV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xV(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xV(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xH(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xW(e){var t=e3(),r=(0,R.useRef)(null),n=iU(),i=e.type,a=xH(e,xF),s=iW(n,"yAxis",i),o=(0,R.useMemo)(()=>{if(null!=s)return xG(xG({},a),{},{type:s})},[s,a]);return(0,R.useLayoutEffect)(()=>{null!=o&&(null===r.current?t(p_(o)):r.current!==o&&t(pS({prev:r.current,next:o})),r.current=o)},[o,t]),(0,R.useLayoutEffect)(()=>()=>{r.current&&(t(pw(r.current)),r.current=null)},[t]),null}function xX(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,a=(0,R.useRef)(null),s=(0,R.useRef)(null),o=e8(ii),l=is(),u=e3(),c="yAxis",d=e8(e=>h$(e,t)),h=e8(e=>hY(e,t)),f=e8(e=>hQ(e,c,t,l)),p=e8(e=>dy(e,t));if((0,R.useLayoutEffect)(()=>{if(!("auto"!==n||!d||sm(i)||(0,R.isValidElement)(i))&&null!=p){var e=a.current;if(e){var r=e.getCalculatedWidth();Math.round(d.width)!==Math.round(r)&&u(pM({id:t,width:r}))}}},[f,d,u,i,t,n,p]),null==d||null==h||null==p)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=xH(e,xz);p.id,p.scale;var g=xH(p,xj);return R.createElement(yP,xB({},m,g,{ref:a,labelRef:s,x:h.x,y:h.y,tickTextProps:"auto"===n?{width:void 0}:{width:n},width:d.width,height:d.height,className:(0,L.clsx)("recharts-".concat(c," ").concat(c),r),viewBox:o,ticks:f,axisType:c,axisId:t}))}var xq={allowDataOverflow:dv.allowDataOverflow,allowDecimals:dv.allowDecimals,allowDuplicatedCategory:dv.allowDuplicatedCategory,angle:dv.angle,axisLine:yw.axisLine,hide:!1,includeHidden:dv.includeHidden,interval:dv.interval,label:!1,minTickGap:dv.minTickGap,mirror:dv.mirror,orientation:dv.orientation,padding:dv.padding,reversed:dv.reversed,scale:dv.scale,tick:dv.tick,tickCount:dv.tickCount,tickLine:yw.tickLine,tickSize:yw.tickSize,type:dv.type,niceTicks:dv.niceTicks,width:dv.width,yAxisId:0},xY=R.memo(e=>{var t=eO(e,xq);return R.createElement(R.Fragment,null,R.createElement(xW,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),R.createElement(xX,t))},xE);xY.displayName="YAxis",e.s(["YAxis",0,xY],93230)},66936,(e,t,r)=>{"use strict";function n(e,t){var r=e.length;for(e.push(t);0<r;){var n=r-1>>>1,i=e[n];if(0<s(i,t))e[n]=t,e[r]=i,r=n;else break}}function i(e){return 0===e.length?null:e[0]}function a(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;for(var n=0,i=e.length,a=i>>>1;n<a;){var o=2*(n+1)-1,l=e[o],u=o+1,c=e[u];if(0>s(l,r))u<i&&0>s(c,l)?(e[n]=c,e[u]=r,n=u):(e[n]=l,e[o]=r,n=o);else if(u<i&&0>s(c,r))e[n]=c,e[u]=r,n=u;else break}}return t}function s(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(r.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,l=performance;r.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();r.unstable_now=function(){return u.now()-c}}var d=[],h=[],f=1,p=null,m=3,g=!1,v=!1,y=!1,x=!1,b="function"==typeof setTimeout?setTimeout:null,_="function"==typeof clearTimeout?clearTimeout:null,S="u">typeof setImmediate?setImmediate:null;function w(e){for(var t=i(h);null!==t;){if(null===t.callback)a(h);else if(t.startTime<=e)a(h),t.sortIndex=t.expirationTime,n(d,t);else break;t=i(h)}}function M(e){if(y=!1,w(e),!v)if(null!==i(d))v=!0,T||(T=!0,o());else{var t=i(h);null!==t&&L(M,t.startTime-e)}}var T=!1,E=-1,A=5,C=-1;function P(){return!!x||!(r.unstable_now()-C<A)}function I(){if(x=!1,T){var e=r.unstable_now();C=e;var t=!0;try{t:{v=!1,y&&(y=!1,_(E),E=-1),g=!0;var n=m;try{r:{for(w(e),p=i(d);null!==p&&!(p.expirationTime>e&&P());){var s=p.callback;if("function"==typeof s){p.callback=null,m=p.priorityLevel;var l=s(p.expirationTime<=e);if(e=r.unstable_now(),"function"==typeof l){p.callback=l,w(e),t=!0;break r}p===i(d)&&a(d),w(e)}else a(d);p=i(d)}if(null!==p)t=!0;else{var u=i(h);null!==u&&L(M,u.startTime-e),t=!1}}break t}finally{p=null,m=n,g=!1}}}finally{t?o():T=!1}}}if("function"==typeof S)o=function(){S(I)};else if("u">typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=I,o=function(){R.postMessage(null)}}else o=function(){b(I,0)};function L(e,t){E=b(function(){e(r.unstable_now())},t)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(e){e.callback=null},r.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"):A=0<e?Math.floor(1e3/e):5},r.unstable_getCurrentPriorityLevel=function(){return m},r.unstable_next=function(e){switch(m){case 1:case 2:case 3:var t=3;break;default:t=m}var r=m;m=t;try{return e()}finally{m=r}},r.unstable_requestPaint=function(){x=!0},r.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=m;m=e;try{return t()}finally{m=r}},r.unstable_scheduleCallback=function(e,t,a){var s=r.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=0x3fffffff;break;case 4:l=1e4;break;default:l=5e3}return l=a+l,e={id:f++,callback:t,priorityLevel:e,startTime:a,expirationTime:l,sortIndex:-1},a>s?(e.sortIndex=a,n(h,e),null===i(d)&&e===i(h)&&(y?(_(E),E=-1):y=!0,L(M,a-s))):(e.sortIndex=l,n(d,e),v||g||(v=!0,T||(T=!0,o()))),e},r.unstable_shouldYield=P,r.unstable_wrapCallback=function(e){var t=m;return function(){var r=m;m=t;try{return e.apply(this,arguments)}finally{m=r}}}},89499,(e,t,r)=>{"use strict";e.i(47167),t.exports=e.r(66936)},99946,80401,e=>{"use strict";let t,r,n;function i(e){Object.keys(e).forEach(t=>{try{e[t]=null}catch{}try{delete e[t]}catch{}})}function a(e,t=0){return setTimeout(e,t)}function s(){return Date.now()}function o(e,t="x"){let r=window.getComputedStyle(e,null),n=r.transform||r.webkitTransform;if(!n||"none"===n)return 0;let i=new DOMMatrixReadOnly(n);return"x"===t?i.m41:i.m42}function l(e){return"object"==typeof e&&null!==e&&!!e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function u(e,...t){let r=Object(e);for(let e=0;e<t.length;e+=1){let n=t[e];if(null==n||"u">typeof HTMLElement&&n instanceof HTMLElement||n&&"object"==typeof n&&(1===n.nodeType||11===n.nodeType))continue;let i=Object.keys(Object(n));for(let e=0,t=i.length;e<t;e+=1){let t=i[e];if("__proto__"===t||"constructor"===t||"prototype"===t)continue;let a=Object.getOwnPropertyDescriptor(n,t);if(!a||!a.enumerable)continue;let s=n[t];l(r[t])&&l(s)?s.__swiper__?r[t]=s:u(r[t],s):!l(r[t])&&l(s)?(r[t]={},s.__swiper__?r[t]=s:u(r[t],s)):r[t]=s}}return r}function c(e,t,r){e.style.setProperty(t,r)}function d(e,t=""){let r=[...e.children];return e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(e=>e.matches(t)):r}function h(e,t){let r=t.contains(e);return!r&&t instanceof HTMLSlotElement&&((r=[...t.assignedElements()].includes(e))||(r=function(e,t){let r=[t];for(;r.length>0;){let t=r.shift();if(e===t)return!0;r.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}return!1}(e,t))),r}function f(e){try{console.warn(e)}catch{}}function p(e,t=[]){let r=document.createElement(e);return r.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),r}function m(e,t){let r=[],n=e.previousElementSibling;for(;n;)(!t||n.matches(t))&&r.push(n),n=n.previousElementSibling;return r}function g(e,t){let r=[],n=e.nextElementSibling;for(;n;)(!t||n.matches(t))&&r.push(n),n=n.nextElementSibling;return r}function v(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)}function y(e){if(e&&e.parentNode)return[...e.parentNode.children].indexOf(e)}function x(e,t){let r=[],n=e.parentElement;for(;n;)(!t||n.matches(t))&&r.push(n),n=n.parentElement;return r}function b(e,t,r){{let r=window.getComputedStyle(e,null);return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(r.getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(r.getPropertyValue("width"===t?"margin-left":"margin-bottom"))}}function _(e,t=""){let r=globalThis.trustedTypes;void 0!==r?e.innerHTML=r.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}e.s(["a",0,p,"b",0,y,"d",0,i,"e",0,d,"f",0,h,"g",0,g,"i",0,b,"j",0,x,"k",0,m,"l",0,v,"n",0,u,"q",0,o,"s",0,function(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)},"t",0,a,"u",0,s,"v",0,c,"w",0,_,"x",0,f],99946);var S=e.i(71645);let w=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesB
1ounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_snapToSlideEdge","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreload","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function M(e){return"object"==typeof e&&null!==e&&!!e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function T(e,t){let r=Object.keys(t);for(let n=0,i=r.length;n<i;n+=1){let i=r[n];if("__proto__"===i||"constructor"===i||"prototype"===i)continue;let a=t[i],s=e[i];void 0===s?e[i]=a:M(a)&&M(s)&&Object.keys(a).length>0?a.__swiper__?e[i]=a:T(s,a):e[i]=a}return e}function E(e={}){let t=e.navigation;return!!t&&(!0===t||void 0===t.nextEl&&void 0===t.prevEl)}function A(e={}){let t=e.pagination;return!!t&&(!0===t||void 0===t.el)}function C(e={}){let t=e.scrollbar;return!!t&&(!0===t||void 0===t.el)}function P(e=""){let t=e.split(" ").map(e=>e.trim()).filter(e=>!!e),r=[];return t.forEach(e=>{0>r.indexOf(e)&&r.push(e)}),r.join(" ")}function I(){return t||(t="u"<typeof window?{touch:!1}:{touch:"ontouchstart"in window||navigator.maxTouchPoints>0}),t}function O(e={}){return r||(r=function({userAgent:e}={}){if("u"<typeof window)return{ios:!1,android:!1};let t=I(),r=navigator.platform,n=e||navigator.userAgent,i={ios:!1,android:!1},a=/(Android);?[\s/]+([\d.]+)?/.test(n),s=/(iPhone\sOS|iOS|iPod)/.test(n),o=/iPad/.test(n),l="MacIntel"===r&&t.touch&&navigator.maxTouchPoints>1;return a&&"Win32"!==r&&(i.os="android",i.android=!0),(o||l||s)&&(i.os="ios",i.ios=!0),i}(e)),r}function R(){return n||(n=function(){if("u"<typeof window)return{isSafari:!1,isWebView:!1,need3dFix:!1};let e=O(),t=navigator.userAgent,r=t.toLowerCase(),n=r.includes("safari")&&!r.includes("chrome")&&!r.includes("android"),i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t),a=n||i&&e.ios;return{isSafari:n,isWebView:i,need3dFix:a}}()),n}let L=(e,t)=>{if(!e||e.destroyed||!e.params||!e.params.lazyPreload)return;let r=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(r){let t=r.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(r.shadowRoot?t=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{if(r.shadowRoot){let t=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`);t&&!t.lazyPreloaderManaged&&t.remove()}})),t&&!t.lazyPreloaderManaged&&t.remove()}},N=(e,t)=>{if(!e.slides[t])return;let r=e.slides[t].querySelector('[loading="lazy"]');r&&r.removeAttribute("loading")},D=e=>{if(!e||e.destroyed||!e.params||!e.params.lazyPreload)return;let t=e.params.lazyPreloadPrevNext,r=e.slides.length;if(!r||!t||t<0)return;t=Math.min(t,r);let n="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&(e.params.grid.rows??1)>1){let r=[i-t];r.push(...Array.from({length:t}).map((e,t)=>i+n+t)),e.slides.forEach((t,n)=>{void 0!==t.column&&r.includes(t.column)&&N(e,n)});return}let a=i+n-1;if(e.params.rewind||e.params.loop)for(let n=i-t;n<=a+t;n+=1){let t=(n%r+r)%r;(t<i||t>a)&&N(e,t)}else for(let n=Math.max(i-t,0);n<=Math.min(a+t,r-1);n+=1)n!==i&&(n>a||n<i)&&N(e,n)},k=(e,t)=>!!(e.grid&&t.grid&&t.grid.rows>1),U={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",
1spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreload:!0,lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function F(e){this.destroyed||this.enabled&&!this.allowClick&&(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function z(){this.destroyed||!this.documentTouchHandlerProceeded&&(this.documentTouchHandlerProceeded=!0,this.params.touchReleaseOnEdges&&(this.el.style.touchAction="auto"))}function j(e){this.destroyed||(L(this,e.target),!this.params.cssMode&&("auto"===this.params.slidesPerView||this.params.autoHeight)&&this.update())}function B(){let e=this,{params:t,el:r}=e;if(r&&0===r.offsetWidth)return;t.breakpoints&&e.setBreakpoint();let{allowSlideNext:n,allowSlidePrev:i,snapGrid:a}=e,s=e.virtual&&e.params.virtual?.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();let o=s&&t.loop;if("auto"!==t.slidesPerView&&!(t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||o)e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{let t=s?e.virtual.slides.length:e.slides.length;e.slideTo(t-1,0,!1,!0)}if(e.autoplay&&e.autoplay.running&&e.autoplay.paused){let t=e.autoplay;clearTimeout(t.resizeTimeout),t.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)}e.allowSlidePrev=i,e.allowSlideNext=n,e.params.watchOverflow&&a!==e.snapGrid&&e.checkOverflow()}function V(){if(this.destroyed)return;let{wrapperEl:e,rtlTranslate:t,enabled:r}=this;if(!r)return;this.previousTranslate=this.translate,this.isHorizontal()?this.translate=-e.scrollLeft:this.translate=-e.scrollTop,0===this.translate&&(this.translate=0),this.updateActiveIndex(),this.updateSlidesClasses();let n=this.maxTranslate()-this.minTranslate();(0===n?0:(this.translate-this.minTranslate())/n)!==this.progress&&this.updateProgress(t?-this.translate:this.translate),this.emit("setTranslate",this.translate,!1)}function G(e){let t,r=this;if(r.destroyed)return;let n=r.touchEventsData,i=e.originalEvent??e;if("touchend"===i.type||"touchcancel"===i.type){let e=[...i.changedTouches].find(e=>e.identifier===n.touchId);if(!e||e.identifier!==n.touchId)return}else if(null!==n.touchId||i.pointerId!==n.pointerId)return;if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(i.type)&&!(["pointercancel","contextmenu"].includes(i.type)&&(r.browser.isSafari||r.browser.isWebView)))return;n.pointerId=null,n.touchId=null;let{params:o,touches:l,rtlTranslate:u,slidesGrid:c,enabled:d}=r;if(!d||!o.simulateTouch&&"mouse"===i.pointerType)return;if(n.allowTouchCallbacks&&r.emit("touchEnd",i),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&o.grabCursor&&r.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}o.grabCursor&&n.isMoved&&n.isTouched&&(!0===r.allowSlideNext||!0===r.allowSlidePrev)&&r.setGrabCursor(!1);let h=s(),f=h-n.touchStartTime;if(r.allowClick){let e=i.path??(i.composedPath&&i.composedPath());r.updateClickedSlide(e&&e[0],e),r.emit("tap click",i),f<300&&h-n.lastClickTime<300&&r.emit("doubleTap doubleClick",i)}if(n.lastClickTime=s(),a(()=>{r.destroyed||(r.allowClick=!0)}),!n.isTouched||!n.isMoved||!r.swipeDirection||0===l.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,t=o.followFinger?u?r.translate:-r.translate:-(n.currentTranslate??0),o.cssMode)return;if(o.freeMode&&o.freeMode.enabled)return void r.freeMode.onTouchEnd({currentPos:t});let p=t>=-r.maxTranslate()&&!r.params.loop,m=0,g=r.slidesSizesGrid[0];for(let e=0;e<c.length;e+=e<o.slidesPerGroupSkip?1:o.slidesPerGroup){let r=e<o.slidesPerGroupSkip-1?1:o.slidesPerGroup;void 0!==c[e+r]?(p||t>=c[e]&&t<c[e+r])&&(m=e,g=c[e+r]-c[e]):(p||t>=c[e])&&(m=e,g=c[c.length-1]-c[c.length-2])}let v=null,y=null;o.rewind&&(r.isBeginning?y=o.virtual?.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1:r.isEnd&&(v=0));let x=(t-c[m])/g,b=m<o.slidesPerGroupSkip-1?1:o.slidesPerGroup;if(f>o.longSwipesMs){if(!o.longSwipes)return void r.slideTo(r.activeIndex);"next"===r.swipeDirection&&(x>=o.longSwipesRatio?r.slideTo(o.rewind&&r.isEnd?v:m+b):r.slideTo(m)),"prev"===r.swipeDirection&&(x>1-o.longSwipesRatio?r.slideTo(m+b):null!==y&&x<0&&Math.abs(x)>o.longSwipesRatio?r.slideTo(y):r.slideTo(m))}else{if(!o.shortSwipes)return void r.slideTo(r.activeIndex);
1r.navigation&&(i.target===r.navigation.nextEl||i.target===r.navigation.prevEl)?i.target===r.navigation.nextEl?r.slideTo(m+b):r.slideTo(m):("next"===r.swipeDirection&&r.slideTo(null!==v?v:m+b),"prev"===r.swipeDirection&&r.slideTo(null!==y?y:m))}}function H(e){let t;if(this.destroyed)return;let r=this.touchEventsData,{params:n,touches:i,rtlTranslate:a,enabled:o}=this;if(!o||!n.simulateTouch&&"mouse"===e.pointerType)return;let l=e.originalEvent??e;if("pointermove"===l.type&&(null!==r.touchId||l.pointerId!==r.pointerId))return;if("touchmove"===l.type){let e=[...l.changedTouches].find(e=>e.identifier===r.touchId);if(!e||e.identifier!==r.touchId)return;t=e}else t=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&this.emit("touchMoveOpposite",l);return}let u=t.pageX,c=t.pageY;if(l.preventedByNestedSwiper){i.startX=u,i.startY=c;return}if(!this.allowTouchMove){l.target.matches(r.focusableElements)||(this.allowClick=!1),r.isTouched&&(Object.assign(i,{startX:u,startY:c,currentX:u,currentY:c}),r.touchStartTime=s());return}if(n.touchReleaseOnEdges&&!n.loop){if(this.isVertical()){if(c<i.startY&&this.translate<=this.maxTranslate()||c>i.startY&&this.translate>=this.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(a&&(u>i.startX&&-this.translate<=this.maxTranslate()||u<i.startX&&-this.translate>=this.minTranslate()))return;else if(!a&&(u<i.startX&&this.translate<=this.maxTranslate()||u>i.startX&&this.translate>=this.minTranslate()))return}if(document.activeElement&&document.activeElement.matches(r.focusableElements)&&document.activeElement!==l.target&&"mouse"!==l.pointerType&&document.activeElement.blur(),document.activeElement&&l.target===document.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,this.allowClick=!1;return}r.allowTouchCallbacks&&this.emit("touchMove",l),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=u,i.currentY=c;let d=i.currentX-i.startX,h=i.currentY-i.startY;if(this.params.threshold&&Math.sqrt(d**2+h**2)<this.params.threshold)return;if(void 0===r.isScrolling){let e;this.isHorizontal()&&i.currentY===i.startY||this.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:d*d+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(d))/Math.PI,r.isScrolling=this.isHorizontal()?e>n.touchAngle:90-e>n.touchAngle)}if(r.isScrolling&&this.emit("touchMoveOpposite",l),void 0===r.startMoving&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(r.startMoving=!0),r.isScrolling||"touchmove"===l.type&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;this.allowClick=!1,!n.cssMode&&l.cancelable&&l.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&l.stopPropagation();let f=this.isHorizontal()?d:h,p=this.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;n.oneWayMovement&&(f=Math.abs(f)*(a?1:-1),p=Math.abs(p)*(a?1:-1)),i.diff=f,f*=n.touchRatio,a&&(f=-f,p=-p);let m=this.touchesDirection;this.swipeDirection=f>0?"prev":"next",this.touchesDirection=p>0?"prev":"next";let g=this.params.loop&&!n.cssMode,v="next"===this.touchesDirection&&this.allowSlideNext||"prev"===this.touchesDirection&&this.allowSlidePrev;if(!r.isMoved){if(g&&v&&this.loopFix({direction:this.swipeDirection}),r.startTranslate=this.getTranslate(),this.setTransition(0),this.animating){let e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});this.wrapperEl.dispatchEvent(e)}r.allowMomentumBounce=!1,n.grabCursor&&(!0===this.allowSlideNext||!0===this.allowSlidePrev)&&this.setGrabCursor(!0),this.emit("sliderFirstMove",l)}if(new Date().getTime(),!1!==n._loopSwapReset&&r.isMoved&&r.allowThresholdMove&&m!==this.touchesDirection&&g&&v&&Math.abs(f)>=1){Object.assign(i,{startX:u,startY:c,currentX:u,currentY:c,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}this.emit("sliderMove",l),r.isMoved=!0;let y=r.startTranslate??0;r.currentTranslate=f+y;let x=!0,b=n.resistanceRatio;if(n.touchReleaseOnEdges&&(b=0),f>0?(g&&v&&r.allowThresholdMove&&r.currentTranslate>(n.centeredSlides?this.minTranslate()-this.slidesSizesGrid[this.activeIndex+1]-("auto"!==n.slidesPerView&&this.slides.length-n.slidesPerView>=2?this.slidesSizesGrid[this.activeIndex+1]+this.params.spaceBetween:0)-this.params.spaceBetween:this.minTranslate())&&this.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>this.minTranslate()&&(x=!1,n.resistance&&(r.currentTranslate=this.minTranslate()-1+(-this.minTranslate()+y+f)**b))):f<0&&(g&&v&&r.allowThresholdMove&&r.currentTranslate<(n.centeredSlides?this.maxTranslate()+this.slidesSizesGrid[this.slidesSizesGrid.length-1]+this.params.spaceBetween+("auto"!==n.slidesPerView&&this.slides.length-n.slidesPerView>=2?this.slidesSizesGrid[this.slidesSizesGrid.length-1]+this.params.spaceBetween:0):this.maxTranslate())&&this.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:this.slides.length-("auto"===n.slidesPerView?this.slidesPerViewDynamic():Math.ceil(parseFloat(String(n.slidesPerView))))}),r.currentTranslate<this.maxTranslate()&&(x=!1,n.resistance&&(r.currentTranslate=this.maxTranslate()+1-(this.maxTranslate()-y-f)**b))),x&&(l.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&(r.currentTranslate??0)<y&&(r.currentTranslate=y),!this.allowSlidePrev&&"prev"===this.swipeDirection&&(r.currentTranslate??0)>y&&(r.currentTranslate=y),this.allowSlidePrev||this.allowSlideNext||(r.currentTranslate=y),n.threshold>0)if(Math.abs(f)>n.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,i.diff=this.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY;return}}else{r.currentTranslate=r.startTranslate;return}n.followFinger&&!n.cssMode&&((n.freeMode&&n.freeMode.enabled&&this.freeMode||n.watchSlidesProgress)&&(this.updateActiveIndex(),this.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&this.freeMode&&this.freeMode.onTouchMove(),this.updateProgress(r.currentTranslate),this.setTranslate(r.currentTranslate??0))}function W(e,t,r){let{params:n}=e,i=n.edgeSwipeDetection,a=n.edgeSwipeThreshold;return!i||!(r<=a)&&!(r>=window.innerWidth-a)||"prevent"===i&&(t.preventDefault(),!0)}function X(e){if(this.destroyed)return;let t=e.originalEvent??e,r=this.touchEventsData;if("pointerdown"===t.type){if(null!==r.pointerId&&r.pointerId!==t.pointerId)return;r.pointerId=t.pointerId}else"touchstart"===t.type&&1===t.targetTouches.length&&(r.touchId=t.targetTouches[0].identifier);if("touchstart"===t.type)return void W(this,t,t.targetTouches[0].pageX);let{params:n,touches:i,enabled:a}=this;if(!a||!n.simulateTouch&&"mouse"===t.pointerType||this.animating&&n.preventInteractionOnTransition)return;!this.animating&&n.cssMode&&n.loop&&this.loopFix();let o=t.target;if("wrapper"===n.touchEventsTarget&&!h(o,this.wrapperEl)||"number"==typeof t.which&&3===t.which||"number"==typeof t.button&&t.button>0||r.isTouched&&r.isMoved)return;let l=!!n.noSwipingClass&&""!==n.noSwipingClass,u=t.composedPath?t.composedPath():t.path;l&&t.target&&t.target.shadowRoot&&u&&(o=u[0]);let c=n.noSwipingSelector?n.noSwipingSelector:`.${n.noSwipingClass}`,d=!!(t.target&&t.target.shadowRoot);if(n.noSwiping&&(d?function e(t){if(!t||t===document||t===window)return null;let r=t;r.assignedSlot&&(r=r.assignedSlot);let n=r.closest(c);if(!n&&!r.getRootNode)return null;let i=r.getRootNode();return n||e(i.host)}(o):o.closest(c))){this.allowClick=!0;return}if(n.swipeHandler&&"string"==typeof n.swipeHandler&&!o.closest(n.swipeHandler))return;i.currentX=t.pageX,i.currentY=t.pageY;let f=i.currentX,p=i.currentY;if(!W(this,t,f))return;Object.assign(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),i.startX=f,i.startY=p,r.touchStartTime=s(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,n.threshold>0&&(r.allowThresholdMove=!1);let m=!0;o.matches(r.focusableElements)&&(m=!1,"SELECT"===o.nodeName&&(r.isTouched=!1)),document.activeElement&&document.activeElement.matches(r.focusableElements)&&document.activeElement!==o&&("mouse"===t.pointerType||"mouse"!==t.pointerType&&!o.matches(r.focusableElements))&&document.activeElement.blur();let g=m&&this.allowTouchMove&&n.touchStartPreventDefault;(n.touchStartForcePreventDefault||g)&&!o.isContentEditable&&t.preventDefault(),n.freeMode&&n.freeMode.enabled&&this.freeMode&&this.animating&&!n.cssMode&&this.freeMode.onTouchStart(),this.emit
1("touchStart",t)}let q=(e,t)=>{var r;let{params:n,el:i,wrapperEl:a,device:s}=e,o=!!n.nested,l="on"===t?"addEventListener":"removeEventListener";if(i&&"string"!=typeof i){document[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:o}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),document[l]("touchmove",e.onTouchMove,{passive:!1,capture:o}),document[l]("pointermove",e.onTouchMove,{passive:!1,capture:o}),document[l]("touchend",e.onTouchEnd,{passive:!0}),document[l]("pointerup",e.onTouchEnd,{passive:!0}),document[l]("pointercancel",e.onTouchEnd,{passive:!0}),document[l]("touchcancel",e.onTouchEnd,{passive:!0}),document[l]("pointerout",e.onTouchEnd,{passive:!0}),document[l]("pointerleave",e.onTouchEnd,{passive:!0}),document[l]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&i[l]("click",e.onClick,!0),n.cssMode&&a[l]("scroll",e.onScroll);r=n.updateOnWindowResize?s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate":"observerUpdate",e[t](r,B,!0),n.lazyPreload&&i[l]("load",e.onLoad,{capture:!0})}};function Y({swiper:e,runCallbacks:t,direction:r,step:n}){let{activeIndex:i,previousIndex:a}=e,s=r;s||(s=i>a?"next":i<a?"prev":"reset"),e.emit(`transition${n}`),t&&"reset"===s?e.emit(`slideResetTransition${n}`):t&&i!==a&&(e.emit(`slideChangeTransition${n}`),"next"===s?e.emit(`slideNextTransition${n}`):e.emit(`slidePrevTransition${n}`))}let $=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)},K=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)},Z={};class J{static extendedDefaults;static defaults;constructor(...e){let t,r;if(1===e.length&&null!==e[0]&&"object"==typeof e[0]&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?r=e[0]:[t,r]=e,r||(r={}),r=u({},r),t&&!r.el&&(r.el=t),r.el&&"string"==typeof r.el&&"u">typeof document&&document.querySelectorAll(r.el).length>1){const e=[];return document.querySelectorAll(r.el).forEach(t=>{let n=u({},r,{el:t});e.push(new J(n))}),e}const n=this;n.__swiper__=!0,n.support=I(),n.device=O({userAgent:r.userAgent??void 0}),n.browser=R(),n.eventsListeners={},n.eventsAnyListeners=[],n.modules=[...n.__modules__||[]],r.modules&&Array.isArray(r.modules)&&r.modules.forEach(e=>{"function"==typeof e&&0>n.modules.indexOf(e)&&n.modules.push(e)});const i={};n.modules.forEach(e=>{var t;e({params:r,swiper:n,extendParams:(t=r,function(e={}){let r=Object.keys(e)[0],n=e[r];"object"!=typeof n||null===n||(!0===t[r]&&(t[r]={enabled:!0}),"navigation"===r&&t[r]&&t[r].enabled&&!t[r].prevEl&&!t[r].nextEl&&(t[r].auto=!0),["pagination","scrollbar"].indexOf(r)>=0&&t[r]&&t[r].enabled&&!t[r].el&&(t[r].auto=!0),r in t&&"enabled"in n&&("object"!=typeof t[r]||"enabled"in t[r]||(t[r].enabled=!0),t[r]||(t[r]={enabled:!1}))),u(i,e)}),on:n.on.bind(n),once:n.once.bind(n),off:n.off.bind(n),emit:n.emit.bind(n)})});const a=u({},U,i);if(n.params=u({},a,Z,r),n.originalParams=u({},n.params),n.passedParams=u({},r),n.params&&n.params.on){const e=n.params.on;Object.keys(e).forEach(t=>{let r=e[t];r&&n.on(t,r)})}return n.params&&n.params.onAny&&n.onAny(n.params.onAny),Object.assign(n,{enabled:n.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===n.params.direction,isVertical:()=>"vertical"===n.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return 8388608*Math.trunc(this.translate/8388608)},allowSlideNext:n.params.allowSlideNext,allowSlidePrev:n.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:n.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:n.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),n.emit("_swiper"),n.params.init&&n.init(),n}getDirectionLabel(e){return this.isHorizontal()?e:({width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"})[e]}isHorizontal(){return"horizontal"===this.params.direction}isVertical(){return"vertical"===this.params.direction}cssOverflowAdjustment(){return 8388608*Math.trunc(this.translate/8388608)}getSlideIndex(e){let{slidesEl:t,params:r}=this,n=y(d(t,`.${r.slideClass}, swiper-slide`)[0]);return y(e)-(n??0)}
1getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>Number(t.getAttribute("data-swiper-slide-index"))===e))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){let{slidesEl:e,params:t}=this;this.slides=d(e,`.${t.slideClass}, swiper-slide`)}enable(){this.enabled||(this.enabled=!0,this.params.grabCursor&&this.setGrabCursor(),this.emit("enable"))}disable(){this.enabled&&(this.enabled=!1,this.params.grabCursor&&this.unsetGrabCursor(),this.emit("disable"))}setProgress(e,t){e=Math.min(Math.max(e,0),1);let r=this.minTranslate(),n=(this.maxTranslate()-r)*e+r;this.translateTo(n,void 0===t?0:t),this.updateActiveIndex(),this.updateSlidesClasses()}emitContainerClasses(){if(!this.params._emitClasses||!this.el)return;let e=this.el.className.split(" ").filter(e=>0===e.indexOf("swiper")||0===e.indexOf(this.params.containerModifierClass));this.emit("_containerClasses",e.join(" "))}getSlideClasses(e){return this.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(this.params.slideClass)).join(" ")}emitSlidesClasses(){if(!this.params._emitClasses||!this.el)return;let e=[];this.slides.forEach(t=>{let r=this.getSlideClasses(t);e.push({slideEl:t,classNames:r}),this.emit("_slideClass",t,r)}),this.emit("_slideClasses",e)}slidesPerViewDynamic(e="current",t=!1){let{params:r,slides:n,slidesGrid:i,slidesSizesGrid:a,size:s,activeIndex:o}=this,l=1;if("number"==typeof r.slidesPerView)return r.slidesPerView;if(!s)return l;if(r.centeredSlides){let e=n[o]?Math.ceil(n[o].swiperSlideSize??0):0,t=!1;for(let r=o+1;r<n.length;r+=1)n[r]&&!t&&(e+=Math.ceil(n[r].swiperSlideSize??0),l+=1,e>s&&(t=!0));for(let r=o-1;r>=0;r-=1)n[r]&&!t&&(e+=n[r].swiperSlideSize??0,l+=1,e>s&&(t=!0))}else if("current"===e)for(let e=o+1;e<n.length;e+=1)(t?i[e]+a[e]-i[o]<s:i[e]-i[o]<s)&&(l+=1);else for(let e=o-1;e>=0;e-=1)i[o]-i[e]<s&&(l+=1);return l}update(){let e,t=this;if(!t||t.destroyed)return;let{snapGrid:r,params:n}=t;function i(){let e=Math.min(Math.max(t.rtlTranslate?-1*t.translate:t.translate,t.maxTranslate()),t.minTranslate());t.setTranslate(e),t.updateActiveIndex(),t.updateSlidesClasses()}if(n.breakpoints&&t.setBreakpoint(),n.lazyPreload&&[...t.el.querySelectorAll('[loading="lazy"]')].forEach(e=>{e.complete&&L(t,e)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),n.freeMode?.enabled&&!n.cssMode)i(),n.autoHeight&&t.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&t.isEnd&&!n.centeredSlides){let r=t.virtual&&n.virtual?.enabled?t.virtual.slides.length:t.slides.length;e=t.slideTo(r-1,0,!1,!0)}else e=t.slideTo(t.activeIndex,0,!1,!0);e||i()}n.watchOverflow&&r!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(e,t=!0){let r=this.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(this.el.classList.remove(`${this.params.containerModifierClass}${r}`),this.el.classList.add(`${this.params.containerModifierClass}${e}`),this.emitContainerClasses(),this.params.direction=e,this.rtlTranslate="horizontal"===e&&this.rtl,this.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),this.emit("changeDirection"),t&&this.update()),this}changeLanguageDirection(e){(!this.rtl||"rtl"!==e)&&(this.rtl||"ltr"!==e)&&(this.rtl="rtl"===e,this.rtlTranslate="horizontal"===this.params.direction&&this.rtl,this.rtl?(this.el.classList.add(`${this.params.containerModifierClass}rtl`),this.el.dir="rtl"):(this.el.classList.remove(`${this.params.containerModifierClass}rtl`),this.el.dir="ltr"),this.update())}mount(e){let t=this;if(t.mounted)return!0;if("u"<typeof document)return!1;let r=e??t.params.el,n=null;if("string"==typeof r?n=document.querySelector(r):r instanceof HTMLElement&&(n=r),!n)return!1;n.swiper=t;let i=n.parentNode;i&&i.host&&i.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);let a=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`,s=n&&n.shadowRoot?n.shadowRoot.querySelector(a()):d(n,a())[0];!s&&t.params.createElements&&(s=p("div",t.params.wrapperClass),n.append(s),d(n,`.${t.params.slideClass}
1`).forEach(e=>{s.append(e)}));let o=t.isElement?n.parentNode.host:null;return Object.assign(t,{el:n,wrapperEl:s,slidesEl:t.isElement&&!o.slideSlots?o:s,hostEl:t.isElement?o:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===v(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===v(n,"direction")),wrongRTL:"-webkit-box"===v(s,"display")}),!0}init(e){let t=this;if(t.initialized||!1===t.mount(e))return t;if(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual?.enabled?t.slideTo((t.params.initialSlide??0)+(t.virtual.slidesBefore??0),0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents(),t.params.lazyPreload){let e=[...t.el.querySelectorAll('[loading="lazy"]')];t.isElement&&e.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),e.forEach(e=>{e.complete?L(t,e):e.addEventListener("load",e=>{L(t,e.target)})})}return t.initialized=!0,D(t),t.emit("init"),t.emit("afterInit"),t}destroy(e=!0,t=!0){let r=this,{params:n,el:a,wrapperEl:s,slides:o}=r;return void 0===r.params||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),n.loop&&r.loopDestroy(),t&&(r.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),s&&s.removeAttribute("style"),o&&o.length&&o.forEach(e=>{e.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(e=>{r.off(e)}),!1!==e&&(r.el&&"string"!=typeof r.el&&(r.el.swiper=null),i(r)),r.destroyed=!0),null}static extendDefaults(e){u(Z,e)}static installModule(e){J.prototype.__modules__||(J.prototype.__modules__=[]);let t=J.prototype.__modules__;"function"==typeof e&&0>t.indexOf(e)&&t.push(e)}static use(e){return Array.isArray(e)?e.forEach(e=>J.installModule(e)):J.installModule(e),J}}Object.defineProperty(J,"extendedDefaults",{get:()=>Z}),Object.defineProperty(J,"defaults",{get:()=>U});let Q={eventsEmitter:{on(e,t,r){let n=this;if(!n.eventsListeners||n.destroyed||"function"!=typeof t)return n;let i=r?"unshift":"push";return e.split(" ").forEach(e=>{n.eventsListeners[e]||(n.eventsListeners[e]=[]),n.eventsListeners[e][i](t)}),n},once(e,t,r){let n=this;if(!n.eventsListeners||n.destroyed||"function"!=typeof t)return n;let i=function(...r){n.off(e,i),i.__emitterProxy&&delete i.__emitterProxy,t.apply(n,r)};return i.__emitterProxy=t,n.on(e,i,r)},onAny(e,t){return!this.eventsListeners||this.destroyed||"function"!=typeof e||0>this.eventsAnyListeners.indexOf(e)&&this.eventsAnyListeners[t?"unshift":"push"](e),this},offAny(e){if(!this.eventsListeners||this.destroyed||!this.eventsAnyListeners)return this;let t=this.eventsAnyListeners.indexOf(e);return t>=0&&this.eventsAnyListeners.splice(t,1),this},off(e,t){let r=this;return r.eventsListeners&&!r.destroyed&&r.eventsListeners&&e.split(" ").forEach(e=>{void 0===t?r.eventsListeners[e]=[]:r.eventsListeners[e]&&r.eventsListeners[e].forEach((n,i)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&r.eventsListeners[e].splice(i,1)})}),r},emit(...e){let t,r,n,i=this;if(!i.eventsListeners||i.destroyed||!i.eventsListeners)return i;if("string"==typeof e[0]||Array.isArray(e[0]))t=e[0],r=e.slice(1,e.length),n=i;else{let a=e[0];t=a.events,r=a.data??[],n=a.context||i}return r.unshift(n),(Array.isArray(t)?t:t.split(" ")).forEach(e=>{i.eventsAnyListeners&&i.eventsAnyListeners.length&&i.eventsAnyListeners.forEach(t=>{t.apply(n,[e,...r])}),i.eventsListeners&&i.eventsListeners[e]&&i.eventsListeners[e].forEach(e=>{e.apply(n,r)})}),i}},update:{updateSize:function(){let e,t,r=this.el;e=void 0!==this.params.width&&null!==this.params.width?this.params.width:r.clientWidth,t=void 0!==this.params.height&&null!==this.params.height?this.params.height:r.clientHeight,0===e&&this.isHorizontal()||0===t&&this.isVertical()||
1(e=e-parseInt(v(r,"padding-left")||"0",10)-parseInt(v(r,"padding-right")||"0",10),t=t-parseInt(v(r,"padding-top")||"0",10)-parseInt(v(r,"padding-bottom")||"0",10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(this,{width:e,height:t,size:this.isHorizontal()?e:t}))},updateSlides:function(){let e=this;function t(t,r){return parseFloat(t.getPropertyValue(e.getDirectionLabel(r))||"0")}let r=e.params,{wrapperEl:n,slidesEl:i,rtlTranslate:a,wrongRTL:s}=e,o=!!(e.virtual&&r.virtual?.enabled),l=o?e.virtual.slides.length:e.slides.length,u=d(i,`.${e.params.slideClass}, swiper-slide`),h=o?e.virtual.slides.length:u.length,f=[],p=[],m=[],g=t=>"function"==typeof t?t.call(e):t,y=g(r.slidesOffsetBefore),x=g(r.slidesOffsetAfter),_=e.snapGrid.length,S=e.slidesGrid.length,w=e.size-y-x,M=r.spaceBetween,T=-y,E=0,A=0;if(void 0===w)return;"string"==typeof M&&M.indexOf("%")>=0?M=parseFloat(M.replace("%",""))/100*w:"string"==typeof M&&(M=parseFloat(M)),e.virtualSize=-M-y-x,u.forEach(e=>{a?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),r.centeredSlides&&r.cssMode&&(c(n,"--swiper-centered-offset-before",""),c(n,"--swiper-centered-offset-after","")),r.cssMode&&(c(n,"--swiper-slides-offset-before",`${y}px`),c(n,"--swiper-slides-offset-after",`${x}px`));let C=r.grid&&r.grid.rows>1&&e.grid;C?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let P=0,I="auto"===r.slidesPerView&&r.breakpoints&&Object.keys(r.breakpoints).filter(e=>{let t=r.breakpoints[e];return void 0!==t?.slidesPerView}).length>0;for(let n=0;n<h;n+=1){P=0;let i=u[n];if(!i||(C&&e.grid.updateSlide(n,i,u),"none"!==v(i,"display"))){if(o&&"auto"===r.slidesPerView)r.virtual?.slidesPerViewAutoSlideSize&&(P=r.virtual.slidesPerViewAutoSlideSize),P&&i&&(r.roundLengths&&(P=Math.floor(P)),i.style[e.getDirectionLabel("width")]=`${P}px`);else if("auto"===r.slidesPerView){I&&(i.style[e.getDirectionLabel("width")]="");let n=getComputedStyle(i),a=i.style.transform,s=i.style.webkitTransform;if(a&&(i.style.transform="none"),s&&(i.style.webkitTransform="none"),r.roundLengths)P=e.isHorizontal()?b(i,"width"):b(i,"height");else{let e=t(n,"width"),r=t(n,"padding-left"),a=t(n,"padding-right"),s=t(n,"margin-left"),o=t(n,"margin-right"),l=n.getPropertyValue("box-sizing");if(l&&"border-box"===l)P=e+s+o;else{let{clientWidth:t,offsetWidth:n}=i;P=e+r+a+s+o+(n-t)}}a&&(i.style.transform=a),s&&(i.style.webkitTransform=s),r.roundLengths&&(P=Math.floor(P))}else P=(w-(r.slidesPerView-1)*M)/r.slidesPerView,r.roundLengths&&(P=Math.floor(P)),i&&(i.style[e.getDirectionLabel("width")]=`${P}px`);i&&(i.swiperSlideSize=P),m.push(P),r.centeredSlides?(T=T+P/2+E/2+M,0===E&&0!==n&&(T=T-w/2-M),0===n&&(T=T-w/2-M),.001>Math.abs(T)&&(T=0),r.roundLengths&&(T=Math.floor(T)),A%r.slidesPerGroup==0&&f.push(T),p.push(T)):(r.roundLengths&&(T=Math.floor(T)),(A-Math.min(e.params.slidesPerGroupSkip,A))%e.params.slidesPerGroup==0&&f.push(T),p.push(T),T=T+P+M),e.virtualSize+=P+M,E=P,A+=1}}if(e.virtualSize=Math.max(e.virtualSize,w)+x,a&&s&&("slide"===r.effect||"coverflow"===r.effect)&&(n.style.width=`${e.virtualSize+M}px`),r.setWrapperSize&&(n.style[e.getDirectionLabel("width")]=`${e.virtualSize+M}px`),C&&e.grid.updateWrapperSize(P,f),!r.centeredSlides){let t="auto"!==r.slidesPerView&&r.slidesPerView%1!=0,n=r.snapToSlideEdge&&!r.loop&&("auto"===r.slidesPerView||t),i=f.length;if(n){let e;if("auto"===r.slidesPerView){e=1;let t=0;for(let r=m.length-1;r>=0;r-=1)if((t+=m[r]+(r<m.length-1?M:0))<=w)e=m.length-r;else break}else e=Math.floor(r.slidesPerView);i=Math.max(h-e,0)}let a=[];for(let t=0;t<f.length;t+=1){let s=f[t];r.roundLengths&&(s=Math.floor(s)),n?t<=i&&a.push(s):f[t]<=e.virtualSize-w&&a.push(s)}f=a,Math.floor(e.virtualSize-w)-Math.floor(f[f.length-1])>1&&!n&&f.push(e.virtualSize-w)}if(o&&r.loop){let t=m[0]+M,n=(e.virtual.slidesBefore??0)+(e.virtual.slidesAfter??0);if(r.slidesPerGroup>1){let e=Math.ceil(n/r.slidesPerGroup),i=t*r.slidesPerGroup;for(let t=0;t<e;t+=1)f.push(f[f.length-1]+i)}for(let i=0;i<n;i+=1)1===r.slidesPerGroup&&f.push(f[f.length-1]+t),p.push(p[p.length-1]+t),e.virtualSize+=t}if(0===f.length&&(f=[0]),0!==M){let t=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");u.filter((e,t)=>
1!r.cssMode||!!r.loop||t!==u.length-1).forEach(e=>{e.style[t]=`${M}px`})}if(r.centeredSlides&&r.centeredSlidesBounds){let e=0;m.forEach(t=>{e+=t+(M||0)});let t=(e-=M)>w?e-w:0;f=f.map(e=>e<=0?-y:e>t?t+x:e)}if(r.centerInsufficientSlides){let e=0;if(m.forEach(t=>{e+=t+(M||0)}),(e-=M)<w){let t=(w-e)/2;f.forEach((e,r)=>{f[r]=e-t}),p.forEach((e,r)=>{p[r]=e+t})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:p,slidesSizesGrid:m}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){c(n,"--swiper-centered-offset-before",`${-f[0]}px`),c(n,"--swiper-centered-offset-after",`${e.size/2-m[m.length-1]/2}px`);let t=-e.snapGrid[0],r=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+r)}if(h!==l&&e.emit("slidesLengthChange"),f.length!==_&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==S&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!o&&!r.cssMode&&("slide"===r.effect||"fade"===r.effect)){let t=`${r.containerModifierClass}backface-hidden`,n=e.el.classList.contains(t);h<=r.maxBackfaceHiddenSlides?n||e.el.classList.add(t):n&&e.el.classList.remove(t)}},updateAutoHeight:function(e){let t,r=this,n=[],i=r.virtual&&r.params.virtual?.enabled,a=0;"number"==typeof e?r.setTransition(e):!0===e&&r.setTransition(r.params.speed);let s=e=>i?r.slides[r.getSlideIndexByData(e)]:r.slides[e];if("auto"!==r.params.slidesPerView&&r.params.slidesPerView>1)if(r.params.centeredSlides)(r.visibleSlides||[]).forEach(e=>{n.push(e)});else for(t=0;t<Math.ceil(r.params.slidesPerView);t+=1){let e=r.activeIndex+t;if(e>r.slides.length&&!i)break;let a=s(e);a&&n.push(a)}else{let e=s(r.activeIndex);e&&n.push(e)}for(t=0;t<n.length;t+=1)if(void 0!==n[t]){let e=n[t].offsetHeight;a=e>a?e:a}(a||0===a)&&(r.wrapperEl.style.height=`${a}px`)},updateSlidesOffset:function(){let e=this.slides,t=this.isElement?this.isHorizontal()?this.wrapperEl.offsetLeft:this.wrapperEl.offsetTop:0;for(let r=0;r<e.length;r+=1)e[r].swiperSlideOffset=(this.isHorizontal()?e[r].offsetLeft:e[r].offsetTop)-t-this.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){let t=this.params,{slides:r,rtlTranslate:n,snapGrid:i}=this;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&this.updateSlidesOffset();let a=-e;n&&(a=e),this.visibleSlidesIndexes=[],this.visibleSlides=[];let s=t.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*this.size:"string"==typeof s&&(s=parseFloat(s));for(let e=0;e<r.length;e+=1){let o=r[e],l=o.swiperSlideOffset??0;t.cssMode&&t.centeredSlides&&(l-=r[0].swiperSlideOffset??0);let u=o.swiperSlideSize??0,c=(a+(t.centeredSlides?this.minTranslate():0)-l)/(u+s),d=(a-i[0]+(t.centeredSlides?this.minTranslate():0)-l)/(u+s),h=-(a-l),f=h+this.slidesSizesGrid[e],p=h>=0&&h<=this.size-this.slidesSizesGrid[e],m=h>=0&&h<this.size-1||f>1&&f<=this.size||h<=0&&f>=this.size;m&&(this.visibleSlides.push(o),this.visibleSlidesIndexes.push(e)),K(o,m,t.slideVisibleClass),K(o,p,t.slideFullyVisibleClass),o.progress=n?-c:c,o.originalProgress=n?-d:d}},updateProgress:function(e){if(void 0===e){let t=this.rtlTranslate?-1:1;e=this&&this.translate&&this.translate*t||0}let t=this.params,r=this.maxTranslate()-this.minTranslate(),{progress:n,isBeginning:i,isEnd:a}=this,s=this.progressLoop,o=i,l=a;if(0===r)n=0,i=!0,a=!0;else{n=(e-this.minTranslate())/r;let t=1>Math.abs(e-this.minTranslate()),s=1>Math.abs(e-this.maxTranslate());i=t||n<=0,a=s||n>=1,t&&(n=0),s&&(n=1)}if(t.loop){let t=this.getSlideIndexByData(0),r=this.getSlideIndexByData(this.slides.length-1),n=this.slidesGrid[t],i=this.slidesGrid[r],a=this.slidesGrid[this.slidesGrid.length-1],o=Math.abs(e);(s=o>=n?(o-n)/a:(o+a-i)/a)>1&&(s-=1)}Object.assign(this,{progress:n,progressLoop:s,isBeginning:i,isEnd:a}),(t.watchSlidesProgress||t.centeredSlides&&t.autoHeight)&&this.updateSlidesProgress(e),i&&
1!o&&this.emit("reachBeginning toEdge"),a&&!l&&this.emit("reachEnd toEdge"),(o&&!i||l&&!a)&&this.emit("fromEdge"),this.emit("progress",n)},updateSlidesClasses:function(){let e,t,r,{slides:n,params:i,slidesEl:a,activeIndex:s}=this,o=!!(this.virtual&&i.virtual?.enabled),l=this.grid&&i.grid&&i.grid.rows>1,u=e=>d(a,`.${i.slideClass}${e}, swiper-slide${e}`)[0];if(o)if(i.loop){let t=this.virtual.slides,r=s-(this.virtual.slidesBefore??0);r<0&&(r=t.length+r),r>=t.length&&(r-=t.length),e=u(`[data-swiper-slide-index="${r}"]`)}else e=u(`[data-swiper-slide-index="${s}"]`);else l?(e=n.find(e=>e.column===s),r=n.find(e=>e.column===s+1),t=n.find(e=>e.column===s-1)):e=n[s];e&&!l&&(r=g(e,`.${i.slideClass}, swiper-slide`)[0],i.loop&&!r&&(r=n[0]),t=m(e,`.${i.slideClass}, swiper-slide`)[0],i.loop),n.forEach(n=>{$(n,n===e,i.slideActiveClass),$(n,n===r,i.slideNextClass),$(n,n===t,i.slidePrevClass)}),this.emitSlidesClasses()},updateActiveIndex:function(e){let t,r,n=this,i=n.rtlTranslate?n.translate:-n.translate,{snapGrid:a,params:s,activeIndex:o,realIndex:l,snapIndex:u}=n,c=e,d=e=>{let t=n.virtual.slides,r=e-(n.virtual.slidesBefore??0);return r<0&&(r=t.length+r),r>=t.length&&(r-=t.length),r};if(void 0===c&&(c=function(e){let t,{slidesGrid:r,params:n}=e,i=e.rtlTranslate?e.translate:-e.translate;for(let e=0;e<r.length;e+=1)void 0!==r[e+1]?i>=r[e]&&i<r[e+1]-(r[e+1]-r[e])/2?t=e:i>=r[e]&&i<r[e+1]&&(t=e+1):i>=r[e]&&(t=e);return n.normalizeSlideIndex&&(t<0||void 0===t)&&(t=0),t}(n)),a.indexOf(i)>=0)t=a.indexOf(i);else{let e=Math.min(s.slidesPerGroupSkip,c);t=e+Math.floor((c-e)/s.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),c===o&&!n.params.loop){t!==u&&(n.snapIndex=t,n.emit("snapIndexChange"));return}if(c===o&&n.params.loop&&n.virtual&&n.params.virtual?.enabled){n.realIndex=d(c);return}let h=n.grid&&s.grid&&s.grid.rows>1;if(n.virtual&&s.virtual?.enabled)r=s.loop?d(c):c;else if(h){let e=n.slides.find(e=>e.column===c),t=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(t)&&(t=Math.max(n.slides.indexOf(e),0)),r=Math.floor(t/s.grid.rows)}else if(n.slides[c]){let e=n.slides[c].getAttribute("data-swiper-slide-index");r=e?parseInt(e,10):c}else r=c;Object.assign(n,{previousSnapIndex:u,snapIndex:t,previousRealIndex:l,realIndex:r,previousIndex:o,activeIndex:c}),n.initialized&&D(n),n.__loopFixInProgress__||(n.emit("activeIndexChange"),n.emit("snapIndexChange"),(n.initialized||n.params.runCallbacksOnInit)&&((n.__lastEmittedRealIndex__??l)!==r&&n.emit("realIndexChange"),n.emit("slideChange")),n.__lastEmittedRealIndex__=r)},updateClickedSlide:function(e,t){let r,n=this.params,i=e.closest(`.${n.slideClass}, swiper-slide`);!i&&this.isElement&&t&&t.length>
11&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!i&&e.matches&&e.matches(`.${n.slideClass}, swiper-slide`)&&(i=e)});let a=!1;if(i){for(let e=0;e<this.slides.length;e+=1)if(this.slides[e]===i){a=!0,r=e;break}}if(i&&a)this.clickedSlide=i,this.virtual&&this.params.virtual?.enabled?this.clickedIndex=parseInt(i.getAttribute("data-swiper-slide-index"),10):this.clickedIndex=r;else{this.clickedSlide=void 0,this.clickedIndex=void 0;return}n.slideToClickedSlide&&void 0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}},translate:{getTranslate:function(e=this.isHorizontal()?"x":"y"){let{params:t,rtlTranslate:r,translate:n,wrapperEl:i}=this;if(t.virtualTranslate)return r?-n:n;if(t.cssMode)return n;let a=o(i,e);return a+=this.cssOverflowAdjustment(),r&&(a=-a),a||0},setTranslate:function(e,t){let{rtlTranslate:r,params:n,wrapperEl:i,progress:a}=this,s=0,o=0;this.isHorizontal()?s=r?-e:e:o=e,n.roundLengths&&(s=Math.floor(s),o=Math.floor(o)),this.previousTranslate=this.translate,this.translate=this.isHorizontal()?s:o,n.cssMode?i[this.isHorizontal()?"scrollLeft":"scrollTop"]=this.isHorizontal()?-s:-o:n.virtualTranslate||(this.isHorizontal()?s-=this.cssOverflowAdjustment():o-=this.cssOverflowAdjustment(),i.style.transform=`translate3d(${s}px, ${o}px, 0px)`);let l=this.maxTranslate()-this.minTranslate();(0===l?0:(e-this.minTranslate())/l)!==a&&this.updateProgress(e),this.emit("setTranslate",this.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,r=!0,n=!0,i){let a,s=this,{params:o,wrapperEl:l}=s;if(s.animating&&o.preventInteractionOnTransition)return!1;let u=s.minTranslate(),c=s.maxTranslate();if(a=n&&e>u?u:n&&e<c?c:e,s.updateProgress(a),o.cssMode){let e=s.isHorizontal();return 0===t?l[e?"scrollLeft":"scrollTop"]=-a:l.scrollTo({[e?"left":"top"]:-a,behavior:"smooth"}),!0}return 0===t?(s.setTransition(0),s.setTranslate(a),r&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionEnd"))):(s.setTransition(t),s.setTranslate(a),r&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionStart")),s.animating||(s.animating=!0,s.onTranslateToWrapperTransitionEnd||(s.onTranslateToWrapperTransitionEnd=function(e){!s||s.destroyed||e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onTranslateToWrapperTransitionEnd),s.onTranslateToWrapperTransitionEnd=null,delete s.onTranslateToWrapperTransitionEnd,s.animating=!1,r&&s.emit("transitionEnd"))}),s.wrapperEl.addEventListener("transitionend",s.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){this.params.cssMode||(this.wrapperEl.style.transitionDuration=`${e}ms`,this.wrapperEl.style.transitionDelay=0===e?"0ms":""),this.emit("setTransition",e,t)},transitionStart:function(e=!0,t){let{params:r}=this;r.cssMode||(r.autoHeight&&this.updateAutoHeight(),Y({swiper:this,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){let{params:r}=this;this.animating=!1,r.cssMode||(this.setTransition(0),Y({swiper:this,runCallbacks:e,direction:t,step:"End"}))}},slide:{slideTo:function(e=0,t,r=!0,n,i){let a;"string"==typeof e&&(e=parseInt(e,10));let s=this,o=e;o<0&&(o=0);let{params:l,snapGrid:u,slidesGrid:c,previousIndex:d,activeIndex:h,rtlTranslate:f,wrapperEl:p,enabled:m}=s;if(!m&&!n&&!i||s.destroyed||s.animating&&l.preventInteractionOnTransition)return!1;void 0===t&&(t=s.params.speed);let g=Math.min(s.params.slidesPerGroupSkip,o),v=g+Math.floor((o-g)/s.params.slidesPerGroup);v>=u.length&&(v=u.length-1);let y=-u[v];if(l.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){let t=-Math.floor(100*y),r=Math.floor(100*c[e]),n=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=r&&t<n-(n-r)/2?o=e:t>=r&&t<n&&(o=e+1):t>=r&&(o=e)}if(s.initialized&&o!==h&&(!s.allowSlideNext&&(f?y>s.translate&&y>s.minTranslate():y<s.translate&&y<s.minTranslate())||!s.allowSlidePrev&&y>s.translate&&y>s.maxTranslate()&&(h||0)!==o))return!1;o!==(d||0)&&r&&s.emit("beforeSlideChangeStart"),s.updateProgress(y),a=o>h?"next":o<h?"prev":"reset";let x=s.virtual&&s.params.virtual?.enabled;if(!(x&&i)&&(f&&-y===s.translate||!f&&y===s.translate))return s.updateActiveIndex(o),l.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==l.effect&&s.setTranslate(y),"reset"!==a&&(s.transitionStart(r,a),s.transitionEnd(r,a)),!1;if(l.cssMode){let e=s.isHorizontal(),r=f?y:-y;return 0===t?(x&&(s.wrapperEl.style.scrollSnapType="none",s._immediateVirtual=!0),x&&!s._cssModeVirtualInitialSet&&(s.params.initialSlide??0)>0?(s._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{p[e?"scrollLeft":"scrollTop"]=r})):p[e?"scrollLeft":"scrollTop"]=r,x&&requestAnimationFrame(()=>{s.wrapperEl.style.scrollSnapType="",s._immediateVirtual=!1})):p.scrollTo({[e?"left":"top"]:r,behavior:"smooth"}),!0}let b=R().isSafari;return x&&!i&&b&&s.isElement&&s.virtual.update(!1,!1,o),s.setTransition(t),s.setTranslate(y),s.updateActiveIndex(o),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,n),s.transitionStart(r,a),0===t?s.transitionEnd(r,a):s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){!s||s.destroyed||e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(r,a))}),s.wrapperEl.addEventListener("transitionend",s.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,r=!0,n){"string"==typeof e&&(e=parseInt(e,10));let i=this;if(i.destroyed)return;void 0===t&&(t=i.params.speed);let a=i.grid&&i.params.grid&&i.params.grid.rows>1,s=e;if(i.params.loop)if(i.virtual&&i.params.virtual?.enabled)s+=i.virtual.slidesBefore??0;else{let e,t;if(a){let t=s*i.params.grid.rows,r=i.slides.find(e=>Number(e.getAttribute("data-swiper-slide-index"))===t);e=r?.column??0}else e=i.getSlideIndexByData(s);let r=a?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:o,slidesOffsetBefore:l,slidesOffsetAfter:u}=i.params,c=o||!!l||!!u;"auto"===i.params.slidesPerView?t=i.slidesPerViewDynamic():(t=Math.ceil(parseFloat(String(i.params.slidesPerView))),c&&t%2==0&&(t+=1));let d=r-e<t;if(c&&(d=d||e<Math.ceil(t/2)),n&&c&&"auto"!==i.params.slidesPerView&&!a&&(d=!1),d){let t=c?e<i.activeIndex?"prev":"next":e-i.activeIndex-1<i.params.slidesPerView?"next":"prev";
1i.loopFix({direction:t,slideTo:!0,activeSlideIndex:"next"===t?e+1:e-r+1,slideRealIndex:"next"===t?i.realIndex:void 0})}if(a){let e=s*i.params.grid.rows,t=i.slides.find(t=>Number(t.getAttribute("data-swiper-slide-index"))===e);s=t?.column??0}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,r,n)}),i},slideNext:function(e,t=!0,r){let n=this,{enabled:i,params:a,animating:s}=n;if(!i||n.destroyed)return n;void 0===e&&(e=n.params.speed);let o=a.slidesPerGroup;"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(o=Math.max(n.slidesPerViewDynamic("current",!0),1));let l=n.activeIndex<a.slidesPerGroupSkip?1:o,u=n.virtual&&a.virtual?.enabled;if(a.loop){if(s&&!u&&a.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&a.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+l,e,t,r)}),!0}return a.rewind&&n.isEnd?n.slideTo(0,e,t,r):n.slideTo(n.activeIndex+l,e,t,r)},slidePrev:function(e,t=!0,r){let n=this,{params:i,snapGrid:a,slidesGrid:s,rtlTranslate:o,enabled:l,animating:u}=n;if(!l||n.destroyed)return n;void 0===e&&(e=n.params.speed);let c=n.virtual&&i.virtual?.enabled;if(i.loop){if(u&&!c&&i.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}let h=d(o?n.translate:-n.translate),f=a.map(e=>d(e)),p=i.freeMode&&i.freeMode.enabled,m=a[f.indexOf(h)-1];if(void 0===m&&(i.cssMode||p)){let e;a.forEach((t,r)=>{h>=t&&(e=r)}),void 0!==e&&(m=p?a[e]:a[e>0?e-1:e])}let g=0;if(void 0!==m&&((g=s.indexOf(m))<0&&(g=n.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(g=Math.max(g=g-n.slidesPerViewDynamic("previous",!0)+1,0))),i.rewind&&n.isBeginning){let i=n.params.virtual?.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(i,e,t,r)}return i.loop&&0===n.activeIndex&&i.cssMode?(requestAnimationFrame(()=>{n.slideTo(g,e,t,r)}),!0):n.slideTo(g,e,t,r)},slideReset:function(e,t=!0,r){if(!this.destroyed)return void 0===e&&(e=this.params.speed),this.slideTo(this.activeIndex,e,t,r)},slideToClosest:function(e,t=!0,r,n=.5){if(this.destroyed)return;void 0===e&&(e=this.params.speed);let i=this.activeIndex,a=Math.min(this.params.slidesPerGroupSkip,i),s=a+Math.floor((i-a)/this.params.slidesPerGroup),o=this.rtlTranslate?this.translate:-this.translate;if(o>=this.snapGrid[s]){let e=this.snapGrid[s];o-e>(this.snapGrid[s+1]-e)*n&&(i+=this.params.slidesPerGroup)}else{let e=this.snapGrid[s-1];o-e<=(this.snapGrid[s]-e)*n&&(i-=this.params.slidesPerGroup)}return i=Math.min(i=Math.max(i,0),this.slidesGrid.length-1),this.slideTo(i,e,t,r)},slideToClickedSlide:function(){let e,t=this;if(t.destroyed)return;let{params:r,slidesEl:n,clickedSlide:i,clickedIndex:s}=t;if(void 0===i||void 0===s)return;let o="auto"===r.slidesPerView?t.slidesPerViewDynamic():r.slidesPerView,l=t.getSlideIndexWhenGrid(s),u=t.isElement?"swiper-slide":`.${r.slideClass}`,c=t.grid&&t.params.grid&&t.params.grid.rows>1;if(r.loop){if(t.animating)return;e=parseInt(i.getAttribute("data-swiper-slide-index"),10),r.centeredSlides?t.slideToLoop(e):l>(c?(t.slides.length-o)/2-(t.params.grid.rows-1):t.slides.length-o)?(t.loopFix(),l=t.getSlideIndex(d(n,`${u}[data-swiper-slide-index="${e}"]`)[0]),a(()=>{t.slideTo(l)})):t.slideTo(l)}else t.slideTo(l)}},loop:{loopCreate:function(e,t){let r,n=this,{params:i,slidesEl:a}=n;if(!i.loop||n.virtual&&n.params.virtual?.enabled)return;let s=n.grid&&i.grid&&i.grid.rows>1;i.loopAddBlankSlides&&(i.slidesPerGroup>1||s)&&((r=d(a,`.${i.slideBlankClass}
1`)).forEach(e=>{e.remove()}),r.length>0&&(n.recalcSlides(),n.updateSlides()));let o=i.slidesPerGroup*(s?i.grid.rows:1),l=n.slides.length%o!=0,u=s&&n.slides.length%i.grid.rows!=0,c=e=>{for(let t=0;t<e;t+=1){let e=n.isElement?p("swiper-slide",[i.slideBlankClass]):p("div",[i.slideClass,i.slideBlankClass]);n.slidesEl.append(e)}};l?i.loopAddBlankSlides?(c(o-n.slides.length%o),n.recalcSlides(),n.updateSlides()):f("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"):u&&(i.loopAddBlankSlides?(c(i.grid.rows-n.slides.length%i.grid.rows),n.recalcSlides(),n.updateSlides()):f("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)")),d(a,`.${i.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",String(t))});let h=i.centeredSlides||!!i.slidesOffsetBefore||!!i.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:h?void 0:"next",initial:t})},loopFix:function(e={}){let{slideRealIndex:t,slideTo:r=!0,direction:n,setTranslate:i,activeSlideIndex:a,initial:s,byController:o,byMousewheel:l}=e,u=a,c=this;if(!c.params.loop)return;c.emit("beforeLoopFix"),c.__loopFixInProgress__=!0;let{slides:d,allowSlidePrev:h,allowSlideNext:p,slidesEl:m,params:g}=c,{centeredSlides:v,slidesOffsetBefore:y,slidesOffsetAfter:x,initialSlide:b}=g,_=v||!!y||!!x;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&g.virtual?.enabled){if(r){let e=c.virtual.slides.length,t=c.virtual.slidesBefore??0;_||0!==c.snapIndex?_&&c.snapIndex<g.slidesPerView?c.slideTo(e+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(t,0,!1,!0):c.slideTo(e,0,!1,!0)}c.allowSlidePrev=h,c.allowSlideNext=p,c.__loopFixInProgress__=!1,c.emit("loopFix");return}let S=g.slidesPerView;"auto"===S?S=c.slidesPerViewDynamic():(S=Math.ceil(parseFloat(String(g.slidesPerView))),_&&S%2==0&&(S+=1));let w=g.slidesPerGroupAuto?S:g.slidesPerGroup,M=e=>("function"==typeof e?e.call(c):e)||0,T=c.slidesGrid.length>1?(c.slidesGrid[c.slidesGrid.length-1]-c.slidesGrid[0])/(c.slidesGrid.length-1):c.size,E=T>0?M(y)/T:0,A=T>0?M(x)/T:0,C=_?Math.max(w,(v?Math.ceil(S/2):0)+Math.ceil(Math.max(E,A))):w;C%w!=0&&(C+=w-C%w),c.loopedSlides=C+=g.loopAdditionalSlides;let P=c.grid&&g.grid&&g.grid.rows>1;d.length<S+C||"cards"===c.params.effect&&d.length<S+2*C?f("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):P&&"row"===g.grid.fill&&f("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");let I=[],O=[],R=P?Math.ceil(d.length/g.grid.rows):d.length,L=s&&R-b<S&&!_,N=L?b:c.activeIndex;void 0===u?u=c.getSlideIndex(d.find(e=>e.classList.contains(g.slideActiveClass))):N=u;let D="next"===n||!n,k="prev"===n||!n,U=0,F=0,z=(P?d[u].column??0:u)+(_&&void 0===i?(v?-S/2+.5:0)-E:0);if(z<C){U=Math.max(C-z,w);for(let e=0;e<C-z;e+=1){let t=e-Math.floor(e/R)*R;if(P){let e=R-t-1;for(let t=d.length-1;t>=0;t-=1)d[t].column===e&&I.push(t)}else I.push(R-t-1)}}else if(z+S>R-C){F=Math.max(z-(R-2*C),w),L&&(F=Math.max(F,S-R+b+1));for(let e=0;e<F;e+=1){let t=e-Math.floor(e/R)*R;P?d.forEach((e,r)=>{e.column===t&&O.push(r)}):O.push(t)}}if(c.__preventObserver__=!0,requestAnimationFrame(()=>{c.__preventObserver__=!1}),"cards"===c.params.effect&&d.length<S+2*C&&(O.includes(u)&&O.splice(O.indexOf(u),1),I.includes(u)&&I.splice(I.indexOf(u),1)),k&&I.forEach(e=>{let t=d[e];t.swiperLoopMoveDOM=!0,m.prepend(t),t.swiperLoopMoveDOM=!1}),D&&O.forEach(e=>{let t=d[e];t.swiperLoopMoveDOM=!0,m.append(t),t.swiperLoopMoveDOM=!1}),c.recalcSlides(),"auto"===g.slidesPerView?c.updateSlides():P&&(I.length>0&&k||O.length>0&&D)&&c.slides.forEach((e,t)=>{c.grid.updateSlide(t,e,c.slides)}),g.watchSlidesProgress&&c.updateSlidesOffset(),r){if(I.length>0&&k){if(void 0===t){let e=c.slidesGrid[N],t=c.slidesGrid[N+U]-e;l?c.setTranslate(c.translate-t):(c.slideTo(N+Math.ceil(U),0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else if(i){let e=P?I.length/g.grid.rows:I.length;c.slideTo(c.activeIndex+e,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(O.length>0&&D)if(void 0===t){let e=c.slidesGrid[N],t=c.slidesGrid[N-F]-e;l?c.setTranslate(c.translate-t):(c.slideTo(N-F,0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else{let e=P?O.length/g.grid.rows:O.length;c.slideTo(c.activeIndex-e,0,!1,!0)}}c.allowSlidePrev=h,c.allowSlideNext=p;let j=c.controller?.control;if(j&&!o){let e={slideRealIndex:t,direction:n,setTranslate:i,activeSlideIndex:u,byController:!0};
1Array.isArray(j)?j.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===g.slidesPerView&&r})}):j instanceof c.constructor&&j.params.loop&&j.loopFix({...e,slideTo:j.params.slidesPerView===g.slidesPerView&&r})}c.__loopFixInProgress__=!1,c.emit("loopFix")},loopDestroy:function(){let{params:e,slidesEl:t}=this;if(!e.loop||!t||this.virtual&&this.params.virtual?.enabled)return;this.recalcSlides();let r=[];this.slides.forEach(e=>{r[void 0===e.swiperSlideIndex?Number(e.getAttribute("data-swiper-slide-index")):e.swiperSlideIndex]=e}),this.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),r.forEach(e=>{t.append(e)}),this.recalcSlides(),this.slideTo(this.realIndex,0)}},grabCursor:{setGrabCursor:function(e){let t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;let r="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),r.style.cursor="move",r.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){let e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){let{params:e}=this;this.onTouchStart=X.bind(this),this.onTouchMove=H.bind(this),this.onTouchEnd=G.bind(this),this.onDocumentTouchStart=z.bind(this),e.cssMode&&(this.onScroll=V.bind(this)),this.onClick=F.bind(this),this.onLoad=j.bind(this),q(this,"on")},detachEvents:function(){q(this,"off")}},breakpoints:{setBreakpoint:function(){let e=this,{realIndex:t,initialized:r,params:n,el:i}=e,a=n.breakpoints;if(!a||a&&0===Object.keys(a).length)return;let s="window"!==n.breakpointsBase&&n.breakpointsBase?"container":n.breakpointsBase,o=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?e.el:document.querySelector(n.breakpointsBase),l=e.getBreakpoint(a,s,o);if(!l||e.currentBreakpoint===l)return;let c=(l in a?a[l]:void 0)||e.originalParams,d=k(e,n),h=k(e,c),f=e.params.grabCursor,p=c.grabCursor,m=n.enabled;d&&!h?(i.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!d&&h&&(i.classList.add(`${n.containerModifierClass}grid`),(c.grid.fill&&"column"===c.grid.fill||!c.grid.fill&&"column"===n.grid.fill)&&i.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),f&&!p?e.unsetGrabCursor():!f&&p&&e.setGrabCursor();let g=(e,t)=>e[t];["navigation","pagination","scrollbar"].forEach(t=>{let r=g(c,t);if(void 0===r)return;let i=g(n,t),a="object"==typeof i&&null!==i&&i.enabled,s="object"==typeof r&&null!==r&&r.enabled,o=e[t];a&&!s&&o?.disable?.(),!a&&s&&o?.enable?.()});let v=c.direction&&c.direction!==n.direction,y=n.loop&&(c.slidesPerView!==n.slidesPerView||v),x=n.loop;v&&r&&e.changeDirection(),u(e.params,c);let b=e.params.enabled,_=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!b?e.disable():!m&&b&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",c),r&&(y?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!x&&_?(e.loopCreate(t),e.updateSlides()):x&&!_&&e.loopDestroy()),e.emit("breakpoint",c)},getBreakpoint:function(e,t="window",r){if(!e||"container"===t&&!r)return;let n=!1,i="window"===t?window.innerHeight:r.clientHeight,a=Object.keys(e).map(e=>"string"==typeof e&&0===e.indexOf("@")?{value:i*parseFloat(e.substr(1)),point:e}:{value:e,point:e});a.sort((e,t)=>parseInt(String(e.value),10)-parseInt(String(t.value),10));for(let e=0;e<a.length;e+=1){let{point:i,value:s}=a[e];"window"===t?window.matchMedia(`(min-width: ${s}px)`).matches&&(n=i):s<=r.clientWidth&&(n=i)}return n||"max"}},checkOverflow:{checkOverflow:function(){let{isLocked:e,params:t}=this,{slidesOffsetBefore:r}=t;if(r){let e=this.slides.length-1,t=this.slidesGrid[e]+this.slidesSizesGrid[e]+2*r;this.isLocked=this.size>t}else this.isLocked=1===this.snapGrid.length;!0===t.allowSlideNext&&(this.allowSlideNext=!this.isLocked),!0===t.allowSlidePrev&&(this.allowSlidePrev=!this.isLocked),e&&e!==this.isLocked&&(this.isEnd=!1),e!==this.isLocked&&this.emit
1(this.isLocked?"lock":"unlock")}},classes:{addClasses:function(){var e,t;let r,{classNames:n,params:i,rtl:a,el:s,device:o}=this,l=(e=["initialized",i.direction,{"free-mode":this.params.freeMode&&i.freeMode.enabled},{autoheight:i.autoHeight},{rtl:a},{grid:i.grid&&i.grid.rows>1},{"grid-column":i.grid&&i.grid.rows>1&&"column"===i.grid.fill},{android:o.android},{ios:o.ios},{"css-mode":i.cssMode},{centered:i.cssMode&&i.centeredSlides},{"watch-progress":i.watchSlidesProgress}],t=i.containerModifierClass,r=[],e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(n=>{e[n]&&r.push(t+n)}):"string"==typeof e&&r.push(t+e)}),r);n.push(...l),s.classList.add(...n),this.emitContainerClasses()},removeClasses:function(){let{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},ee=J.prototype;Object.keys(Q).forEach(e=>{let t=Q[e];Object.keys(t).forEach(e=>{ee[e]=t[e]})}),J.use([({swiper:e,on:t,emit:r})=>{let n=null,i=null,a=()=>{e&&!e.destroyed&&e.initialized&&(r("beforeResize"),r("resize"))},s=()=>{e&&!e.destroyed&&e.initialized&&r("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==window.ResizeObserver?e&&!e.destroyed&&e.initialized&&(n=new ResizeObserver(t=>{i=window.requestAnimationFrame(()=>{let{width:r,height:n}=e,i=r,s=n;t.forEach(({contentBoxSize:t,contentRect:r,target:n})=>{if(n&&n!==e.el)return;let a=Array.isArray(t)?t[0]:t;i=r?r.width:a.inlineSize,s=r?r.height:a.blockSize}),(i!==r||s!==n)&&a()})})).observe(e.el):(window.addEventListener("resize",a),window.addEventListener("orientationchange",s))}),t("destroy",()=>{i&&window.cancelAnimationFrame(i),n&&n.unobserve&&e.el&&(n.unobserve(e.el),n=null),window.removeEventListener("resize",a),window.removeEventListener("orientationchange",s)})},({swiper:e,extendParams:t,on:r})=>{let n=[],i=(t,r={})=>{let i=window.MutationObserver||window.WebkitMutationObserver;if(!i)return;let a=new i(t=>{if(e.__preventObserver__)return;if(1===t.length)return void e.emit("observerUpdate",t[0]);let r=function(){e.emit("observerUpdate",t[0])};window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,0)});a.observe(t,{attributes:void 0===r.attributes||r.attributes,childList:e.isElement||void 0===r.childList||r.childList,characterData:void 0===r.characterData||r.characterData}),n.push(a)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",()=>{if(e.params.observer){if(e.params.observeParents){let t=x(e.hostEl);for(let e=0;e<t.length;e+=1)i(t[e])}i(e.hostEl,{childList:e.params.observeSlideChildren}),i(e.wrapperEl,{attributes:!1})}}),r("destroy",()=>{n.forEach(e=>{e.disconnect()}),n.splice(0,n.length)})}]);let et=(0,S.createContext)(null),er=(0,S.createContext)(null);function en(e){return"object"==typeof e&&null!==e&&"type"in e&&"props"in e}function ei(e){if(!en(e))return!1;let{type:t}=e;if("function"!=typeof t&&"object"!=typeof t)return!1;let r=t.displayName;return!!r&&r.includes("SwiperSlide")}function ea(e,t){return"u"<typeof window?(0,S.useEffect)(e,t):(0,S.useLayoutEffect)(e,t)}let es=(0,S.forwardRef)(function(e,t){let r,n,{className:i,tag:a="div",wrapperTag:s="div",children:o,onSwiper:l,...u}=e??{},c=!1,[d,h]=(0,S.useState)("swiper"),[f,p]=(0,S.useState)(null),[m,g]=(0,S.useState)(!1),v=(0,S.useRef)(!1),y=(0,S.useRef)(null),x=(0,S.useRef)(null),b=(0,S.useRef)(null),I=(0,S.useRef)(null),O=(0,S.useRef)(null),R=(0,S.useRef)(null),L=(0,S.useRef)(null),N=(0,S.useRef)(null),{params:D,passedParams:k,rest:F,events:z}=function(e={},t=!0){let r={on:{}},n={},i={};T(r,U),r._emitClasses=!0,r.init=!1;let a={},s=w.map(e=>e.replace(/_/,""));return Object.keys({...e}).forEach(o=>{let l=e[o];if(void 0!==l)if(s.indexOf(o)>=0)M(l)?(r[o]={},i[o]={},T(r[o],l),T(i[o],l)):(r[o]=l,i[o]=l);else if(0===o.search(/on[A-Z]/)&&"function"==typeof l){let e=`${o[2].toLowerCase()}${o.substring(3)}`;t?n[e]=l:r.on[e]=l}else a[o]=l}),["navigation","pagination","scrollbar"].forEach(e=>{!0===r[e]&&(r[e]={}),!1===r[e]&&delete r[e]}),{params:r,passedParams:i,rest:a,events:n}}(u),{slides:j,slots:B}=(r=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]}
1,S.default.Children.toArray(o).forEach(e=>{if(ei(e))r.push(e);else if(en(e)&&e.props&&e.props.slot&&e.props.slot in n)n[e.props.slot].push(e);else if(en(e)&&e.props&&e.props.children){let t=function e(t){let r=[];return S.default.Children.toArray(t).forEach(t=>{ei(t)?r.push(t):en(t)&&t.props&&t.props.children&&e(t.props.children).forEach(e=>r.push(e))}),r}(e.props.children);t.length>0?t.forEach(e=>r.push(e)):n["container-end"].push(e)}else en(e)&&n["container-end"].push(e)}),{slides:r,slots:n}),V=()=>{g(!m)};Object.assign(D.on,{_containerClasses(e,t){h(t)}});let G=()=>{Object.assign(D.on,z),c=!0;let e={...D};delete e.wrapperClass,x.current=new J(e);let t=x.current;if(t.virtual&&t.params.virtual?.enabled){t.virtual.slides=j;let e={cache:!1,slides:j,renderExternal:p,renderExternalUpdate:!1};T(t.params.virtual,e),t.originalParams.virtual&&T(t.originalParams.virtual,e)}};return y.current||G(),x.current&&x.current.on("_beforeBreakpoint",V),(0,S.useEffect)(()=>()=>{x.current&&x.current.off("_beforeBreakpoint",V)}),(0,S.useEffect)(()=>{!v.current&&x.current&&(x.current.emitSlidesClasses(),v.current=!0)}),ea(()=>{if(t&&("function"==typeof t?t(y.current):t.current=y.current),y.current)return x.current&&x.current.destroyed&&G(),!function(e,t){let{el:r,nextEl:n,prevEl:i,paginationEl:a,scrollbarEl:s,swiper:o}=e;if(E(t)&&n&&i){let e=o.params.navigation,t=o.originalParams.navigation;e.nextEl=n,t.nextEl=n,e.prevEl=i,t.prevEl=i}A(t)&&a&&(o.params.pagination.el=a,o.originalParams.pagination.el=a),C(t)&&s&&(o.params.scrollbar.el=s,o.originalParams.scrollbar.el=s),o.init(r)}({el:y.current,nextEl:O.current,prevEl:R.current,paginationEl:L.current,scrollbarEl:N.current,swiper:x.current},D),l&&x.current&&!x.current.destroyed&&l(x.current),()=>{x.current&&!x.current.destroyed&&x.current.destroy(!0,!1)}},[]),ea(()=>{!c&&z&&x.current&&Object.keys(z).forEach(e=>{x.current.on(e,z[e])});let e=function(e,t,r,n,i){let a=[];if(!t)return a;let s=e=>{0>a.indexOf(e)&&a.push(e)};if(r&&n){let e=n.map(i),t=r.map(i);e.join("")!==t.join("")&&s("children"),n.length!==r.length&&s("children")}return w.filter(e=>"_"===e[0]).map(e=>e.replace(/_/,"")).forEach(r=>{if(r in e&&r in t){let n=e[r],i=t[r];if(M(n)&&M(i)){let e=Object.keys(n),t=Object.keys(i);e.length!==t.length?s(r):(e.forEach(e=>{n[e]!==i[e]&&s(r)}),t.forEach(e=>{n[e]!==i[e]&&s(r)}))}else n!==i&&s(r)}}),a}(k,b.current,j,I.current,e=>e.key);return b.current=k,I.current=j,e.length&&x.current&&!x.current.destroyed&&function(e){let t,r,n,i,a,s,o,l,{nextEl:u,prevEl:c,scrollbarEl:d,paginationEl:h}=e,{swiper:f,slides:p,passedParams:m,changedParams:g}=e,v=g.filter(e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e),{params:y,pagination:x,navigation:b,scrollbar:S,virtual:w,thumbs:T}=f,E=m.thumbs,A=y.thumbs;g.includes("thumbs")&&M(E)&&E.swiper&&!E.swiper.destroyed&&M(A)&&(!A.swiper||A.swiper.destroyed)&&(t=!0);let C=m.controller,P=y.controller;g.includes("controller")&&M(C)&&C.control&&M(P)&&!P.control&&(r=!0);let I=m.pagination;g.includes("pagination")&&M(I)&&(I.el||h)&&(y.pagination||!1===y.pagination)&&x&&!x.el&&(n=!0);let O=m.scrollbar;g.includes("scrollbar")&&M(O)&&(O.el||d)&&(y.scrollbar||!1===y.scrollbar)&&S&&!S.el&&(i=!0);let R=m.navigation;g.includes("navigation")&&M(R)&&(R.prevEl||c)&&(R.nextEl||u)&&(y.navigation||!1===y.navigation)&&b&&!b.prevEl&&!b.nextEl&&(a=!0);let L=e=>{let t=f[e];if(!t)return;t.destroy();let r=y[e],n=M(r)?r:void 0;"navigation"===e?(f.isElement&&(t.prevEl?.remove(),t.nextEl?.remove()),n&&(n.prevEl=void 0,n.nextEl=void 0),t.prevEl=void 0,t.nextEl=void 0):(f.isElement&&t.el?.remove(),n&&(n.el=void 0),t.el=void 0)};if(g.includes("loop")&&f.isElement&&(y.loop&&!m.loop?s=!0:!y.loop&&m.loop?o=!0:l=!0),v.forEach(e=>{let t=y[e],r=m[e];M(t)&&M(r)?(Object.assign(t,r),("navigation"===e||"pagination"===e||"scrollbar"===e)&&"enabled"in r&&!r.enabled&&L(e)):(!0===r||!1===r)&&("navigation"===e||"pagination"===e||"scrollbar"===e)?!1===r&&L(e):y[e]=r}),v.includes("controller")&&!r&&f.controller&&f.controller.control&&M(P)&&P.control&&(f.controller.control=P.control),g.includes("children")&&p&&w&&y.virtual?.enabled?(w.slides=p,w.update(!0)):g.includes("virtual")&&w&&y.virtual?.enabled&&(p&&(w.slides=p),w.update(!0)),g.includes("children")&&p&&y.loop&&(l=!0),t&&T&&T.init(
1)&&T.update(!0),r&&f.controller&&M(P)&&(f.controller.control=P.control),n&&x){if(f.isElement&&(!h||"string"==typeof h)){let e=document.createElement("div");e.classList.add("swiper-pagination"),e.part.add("pagination"),f.el.appendChild(e),h=e}let e=y.pagination;h&&M(e)&&(e.el=h),x.init(),x.render(),x.update()}if(i&&S){if(f.isElement&&(!d||"string"==typeof d)){let e=document.createElement("div");e.classList.add("swiper-scrollbar"),e.part.add("scrollbar"),f.el.appendChild(e),d=e}let e=y.scrollbar;d&&M(e)&&(e.el=d),S.init(),S.updateSize(),S.setTranslate()}if(a&&b){if(f.isElement){if(!u||"string"==typeof u){let e=document.createElement("div");e.classList.add("swiper-button-next"),_(e,b.arrowSvg),e.part.add("button-next"),f.el.appendChild(e),u=e}if(!c||"string"==typeof c){let e=document.createElement("div");e.classList.add("swiper-button-prev"),_(e,b.arrowSvg),e.part.add("button-prev"),f.el.appendChild(e),c=e}}let e=y.navigation;u&&M(e)&&(e.nextEl=u),c&&M(e)&&(e.prevEl=c),b.init(),b.update()}g.includes("allowSlideNext")&&(f.allowSlideNext=m.allowSlideNext),g.includes("allowSlidePrev")&&(f.allowSlidePrev=m.allowSlidePrev),g.includes("direction")&&f.changeDirection(m.direction,!1),(s||l)&&f.loopDestroy(),(o||l)&&f.loopCreate(),f.update()}({swiper:x.current,slides:j,passedParams:k,changedParams:e,nextEl:O.current,prevEl:R.current,scrollbarEl:N.current,paginationEl:L.current}),()=>{z&&x.current&&Object.keys(z).forEach(e=>{x.current.off(e,z[e])})}}),ea(()=>{var e;(e=x.current)&&!e.destroyed&&e.params.virtual&&(!e.params.virtual||e.params.virtual.enabled)&&(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate?.())},[f]),S.default.createElement(a,{ref:y,className:P(`${d}${i?` ${i}`:""}`),...F},S.default.createElement(er.Provider,{value:x.current},B["container-start"],S.default.createElement(s,{className:function(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}(D.wrapperClass)},B["wrapper-start"],D.virtual?function(e,t,r){if(!r||!e)return null;let n=e=>{let r=e;return e<0?r=t.length+e:r>=t.length&&(r-=t.length),r},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${r.offset}px`}:{top:`${r.offset}px`},{from:a,to:s}=r,o=e.params.loop?-t.length:0,l=e.params.loop?2*t.length:t.length,u=[];for(let e=o;e<l;e+=1)if(e>=a&&e<=s){let r=t[n(e)];r&&u.push(r)}return u.map((t,r)=>{let n=t.props.virtualIndex;return S.default.cloneElement(t,{swiper:e,style:i,key:n||t.key||`slide-${r}`})})}(x.current,j,f):j.map((e,t)=>S.default.cloneElement(e,{swiper:x.current,swiperSlideIndex:t})),B["wrapper-end"]),E(D)&&S.default.createElement(S.default.Fragment,null,S.default.createElement("div",{ref:R,className:"swiper-button-prev"}),S.default.createElement("div",{ref:O,className:"swiper-button-next"})),C(D)&&S.default.createElement("div",{ref:N,className:"swiper-scrollbar"}),A(D)&&S.default.createElement("div",{ref:L,className:"swiper-pagination"}),B["container-end"]))});es.displayName="Swiper";let eo=(0,S.forwardRef)(function(e,t){let{tag:r="div",children:n,className:i="",swiper:a,zoom:s,lazy:o,virtualIndex:l,swiperSlideIndex:u,...c}=e,d=(0,S.useRef)(null),[h,f]=(0,S.useState)("swiper-slide"),[p,m]=(0,S.useState)(!1);function g(e,t,r){t===d.current&&f(r)}ea(()=>{if(void 0!==u&&d.current&&(d.current.swiperSlideIndex=u),t&&("function"==typeof t?t(d.current):t.current=d.current),d.current&&a){if(a.destroyed){"swiper-slide"!==h&&f("swiper-slide");return}return a.on("_slideClass",g),()=>{a&&a.off("_slideClass",g)}}}),ea(()=>{a&&d.current&&!a.destroyed&&f(a.getSlideClasses(d.current))},[a]);let v={isActive:h.indexOf("swiper-slide-active")>=0,isVisible:h.indexOf("swiper-slide-visible")>=0,isFullyVisible:h.indexOf("swiper-slide-fully-visible")>=0,isPrev:h.indexOf("swiper-slide-prev")>=0,isNext:h.indexOf("swiper-slide-next")>=0},y=()=>"function"==typeof n?n(v):n,x=e=>{e&&(e.lazyPreloaderManaged=!0)};return S.default.createElement(r,{ref:d,className:P(`${h}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:()=>{m(!0)},...c},s&&S.default.createElement(et.Provider,{value:v},S.default.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof s?s:void 0},y(),o&&!p&&S.default.createElement("div",{className:"swiper-lazy-preloader",ref:x}))),!s&&S.default.createElement(et.Provider,{value:v},y(),o&&!p&&S.default.createElement("div",{className:"swiper-lazy-preloader",ref:x})))});
1eo.displayName="SwiperSlide",e.s(["Swiper",0,es,"SwiperSlide",0,eo],80401)},90072,8560,46791,1950,25234,28600,e=>{"use strict";let t,r,n,i,a,s,o,l,u,c,d,h,f,p,m,g,v,y,x="attached",b="detached",_="srgb",S="srgb-linear",w="linear",M="srgb",T="300 es",E={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function A(e,t){return new E[e](t)}function C(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function P(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function I(){let e=P("canvas");return e.style.display="block",e}let O={},R=null;function L(...e){let t="THREE."+e.shift();R?R("log",t,...e):console.log(t,...e)}function N(e){let t=e[0];if("string"==typeof t&&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 D(...e){let t="THREE."+(e=N(e)).shift();if(R)R("warn",t,...e);else{let r=e[0];r&&r.isStackTrace?console.warn(r.getError(t)):console.warn(t,...e)}}function k(...e){let t="THREE."+(e=N(e)).shift();if(R)R("error",t,...e);else{let r=e[0];r&&r.isStackTrace?console.error(r.getError(t)):console.error(t,...e)}}function U(...e){let t=e.join(" ");t in O||(O[t]=!0,D(...e))}function F(e,t,r){return new Promise(function(n,i){setTimeout(function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,r);break;default:n()}},r)})}let z={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3};class j{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){let r=this._listeners;return void 0!==r&&void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){let r=this._listeners;if(void 0===r)return;let n=r[e];if(void 0!==n){let e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(void 0===t)return;let r=t[e.type];if(void 0!==r){e.target=this;let t=r.slice(0);for(let r=0,n=t.length;r<n;r++)t[r].call(this,e);e.target=null}}}let B=["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","cd","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"],V=1234567,G=Math.PI/180,H=180/Math.PI;function W(){let e=0xffffffff*Math.random()|0,t=0xffffffff*Math.random()|0,r=0xffffffff*Math.random()|0,n=0xffffffff*Math.random()|0;return(B[255&e]+B[e>>8&255]+B[e>>16&255]+B[e>>24&255]+"-"+B[255&t]+B[t>>8&255]+"-"+B[t>>16&15|64]+B[t>>24&255]+"-"+B[63&r|128]+B[r>>8&255]+"-"+B[r>>16&255]+B[r>>24&255]+B[255&n]+B[n>>8&255]+B[n>>16&255]+B[n>>24&255]).toLowerCase()}function X(e,t,r){return Math.max(t,Math.min(r,e))}function q(e,t){return(e%t+t)%t}function Y(e,t,r){return(1-r)*e+r*t}function $(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/0xffffffff;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/0x7fffffff,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error("THREE.MathUtils: Invalid component type.")}}function K(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(0xffffffff*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(0x7fffffff*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw Error("THREE.MathUtils: Invalid component type.")}}class Z{static{Z.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("THREE.Vector2: 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("THREE.Vector2: 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}
vendor: 5,387 bytes, line 1
1sub(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)}applyMatrix3(e){let t=this.x,r=this.y,n=e.elements;return this.x=n[0]*t+n[3]*r+n[6],this.y=n[1]*t+n[4]*r+n[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=X(this.x,e.x,t.x),this.y=X(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=X(this.x,e,t),this.y=X(this.y,e,t),this}clampLength(e,t){let r=this.length();return this.divideScalar(r||1).multiplyScalar(X(r,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());return 0===t?Math.PI/2:Math.acos(X(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,r=this.y-e.y;return t*t+r*r}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,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,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 r=Math.cos(t),n=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*r-a*n+e.x,this.y=i*n+a*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class J{constructor(e=0,t=0,r=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=r,this._w=n}static slerpFlat(e,t,r,n,i,a,s){let o=r[n+0],l=r[n+1],u=r[n+2],c=r[n+3],d=i[a+0],h=i[a+1],f=i[a+2],p=i[a+3];if(c!==p||o!==d||l!==h||u!==f){let e=o*d+l*h+u*f+c*p;e<0&&(d=-d,h=-h,f=-f,p=-p,e=-e);let t=1-s;if(e<.9995){let r=Math.acos(e),n=Math.sin(r);o=o*(t=Math.sin(t*r)/n)+d*(s=Math.sin(s*r)/n),l=l*t+h*s,u=u*t+f*s,c=c*t+p*s}else{let e=1/Math.sqrt((o=o*t+d*s)*o+(l=l*t+h*s)*l+(u=u*t+f*s)*u+(c=c*t+p*s)*c);o*=e,l*=e,u*=e,c*=e}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,r,n,i,a){let s=r[n],o=r[n+1],l=r[n+2],u=r[n+3],c=i[a],d=i[a+1],h=i[a+2],f=i[a+3];return e[t]=s*f+u*c+o*h-l*d,e[t+1]=o*f+u*d+l*c-s*h,e[t+2]=l*f+u*h+s*d-o*c,e[t+3]=u*f-s*c-o*d-l*h,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,r,n){return this._x=e,this._y=t,this._z=r,this._w=n,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 r=e._x,n=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(r/2),u=s(n/2),c=s(i/2),d=o(r/2),h=o(n/2),f=o(i/2);switch(a){case"XYZ":this._x=d*u*c+l*h*f,this._y=l*h*c-d*u*f,this._z=l*u*f+d*h*c,this._w=l*u*c-d*h*f;break;case"YXZ":this._x=d*u*c+l*h*f,this._y=l*h*c-d*u*f,this._z=l*u*f-d*h*c,this._w=l*u*c+d*h*f;break;case"ZXY":this._x=d*u*c-l*h*f,this._y=l*h*c+d*u*f,this._z=l*u*f+d*h*c,this._w=l*u*c-d*h*f;break;case"ZYX":this._x=d*u*c-l*h*f,this._y=l*h*c+d*u*f,this._z=l*u*f-d*h*c,this._w=l*u*c+d*h*f;break;case"YZX":this._x=d*u*c+l*h*f,this._y=l*h*c+d*u*f,this._z=l*u*f-d*h*c,this._w=l*u*c-d*h*f;break;case"XZY":this._x=d*u*c-l*h*f,this._y=l*h*c-d*u*f,this._z=l*u*f+d*h*c,this._w=l*u*c+d*h*f;break;default:D("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let r=t/2,n=Math.sin(r);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,r=t[0],n=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],d=r+s+c;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(u-o)*e,this._y=(i-l)*e,this._z=(a-n)*e}else if(r>s&&r>c){let e=2*Math.sqrt(1+r-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(n+a)/e,this._z=(i+l)/e}else if(s>c){let e=2*Math.sqrt(1+s-r-c);this._w=(i-l)/e,this._x=(n+a)/e,this._y=.25*e,this._z=(o+u)/e}else{let e=2*Math.sqrt(1+c-r-s);this._w=(a-n)/e,this._x=(i+l)/e,this._y=(o+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let r=e.dot(t)+1;return r<1e-8?(r=0,Math.abs(e.x)>
vendor: 12,365 bytes, line 1
1Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(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=r,this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(X(this.dot(e),-1,1)))}rotateTowards(e,t){let r=this.angleTo(e);if(0===r)return this;let n=Math.min(1,t/r);return this.slerp(e,n),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 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let r=e._x,n=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=r*u+a*s+n*l-i*o,this._y=n*u+a*o+i*s-r*l,this._z=i*u+a*l+r*o-n*s,this._w=a*u-r*s-n*o-i*l,this._onChangeCallback(),this}slerp(e,t){let r=e._x,n=e._y,i=e._z,a=e._w,s=this.dot(e);s<0&&(r=-r,n=-n,i=-i,a=-a,s=-s);let o=1-t;if(s<.9995){let e=Math.acos(s),l=Math.sin(e);o=Math.sin(o*e)/l,t=Math.sin(t*e)/l,this._x=this._x*o+r*t,this._y=this._y*o+n*t,this._z=this._z*o+i*t,this._w=this._w*o+a*t,this._onChangeCallback()}else this._x=this._x*o+r*t,this._y=this._y*o+n*t,this._z=this._z*o+i*t,this._w=this._w*o+a*t,this.normalize();return this}slerpQuaternions(e,t,r){return this.copy(e).slerp(t,r)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),r=Math.random(),n=Math.sqrt(1-r),i=Math.sqrt(r);return this.set(n*Math.sin(e),n*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}}class Q{static{Q.prototype.isVector3=!0}constructor(e=0,t=0,r=0){this.x=e,this.y=t,this.z=r}set(e,t,r){return void 0===r&&(r=this.z),this.x=e,this.y=t,this.z=r,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("THREE.Vector3: 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("THREE.Vector3: 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(et.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(et.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,r=this.y,n=this.z,i=e.elements;return this.x=i[0]*t+i[3]*r+i[6]*n,this.y=i[1]*t+i[4]*r+i[7]*n,this.z=i[2]*t+i[5]*r+i[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,r=this.y,n=this.z,i=e.elements,a=1/(i[3]*t+i[7]*r+i[11]*n+i[15]);return this.x=(i[0]*t+i[4]*r+i[8]*n+i[12])*a,this.y=(i[1]*t+i[5]*r+i[9]*n+i[13])*a,this.z=(i[2]*t+i[6]*r+i[10]*n+i[14])*a,this}applyQuaternion(e){let t=this.x,r=this.y,n=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*n-s*r),u=2*(s*t-i*n),c=2*(i*r-a*t);return this.x=t+o*l+a*c-s*u,this.y=r+o*u+s*l-i*c,this.z=n+o*c+i*u-a*l,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,r=this.y,n=this.z,i=e.elements;return this.x=i[0]*t+i[4]*r+i[8]*n,this.y=i[1]*t+i[5]*r+i[9]*n,this.z=i[2]*t+i[6]*r+i[10]*n,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=X(this.x,e.x,t.x),this.y=X(this.y,e.y,t.y),this.z=X(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=X(this.x,e,t),this.y=X(this.y,e,t),this.z=X(this.z,e,t),this}clampLength(e,t){let r=this.length();return this.divideScalar(r||1).multiplyScalar(X(r,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,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let r=e.x,n=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=n*o-i*s,this.y=i*a-r*o,this.z=r*s-n*a,this}projectOnVector(e){let t=e.lengthSq();if(0===t)return this.set(0,0,0);let r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return ee.copy(this).projectOnVector(e),this.sub(ee)}reflect(e){return this.sub(ee.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(X(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,r=this.y-e.y,n=this.z-e.z;return t*t+r*r+n*n}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,r){let n=Math.sin(t)*e;return this.x=n*Math.sin(r),this.y=Math.cos(t)*e,this.z=n*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,r){return this.x=e*Math.sin(t),this.y=r,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(),r=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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=2*Math.random()-1,r=Math.sqrt(1-t*t);return this.x=r*Math.cos(e),this.y=t,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}let ee=new Q,et=new J;class er{static{er.prototype.isMatrix3=!0}constructor(e,t,r,n,i,a,s,o,l){this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,r,n,i,a,s,o,l)}set(e,t,r,n,i,a,s,o,l){let u=this.elements;return u[0]=e,u[1]=n,u[2]=s,u[3]=t,u[4]=i,u[5]=o,u[6]=r,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this}extractBasis(e,t,r){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),r.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 r=e.elements,n=t.elements,i=this.elements,a=r[0],s=r[3],o=r[6],l=r[1],u=r[4],c=r[7],d=r[2],h=r[5],f=r[8],p=n[0],m=n[3],g=n[6],v=n[1],y=n[4],x=n[7],b=n[2],_=n[5],S=n[8];return i[0]=a*p+s*v+o*b,i[3]=a*m+s*y+o*_,i[6]=a*g+s*x+o*S,i[1]=l*p+u*v+c*b,i[4]=l*m+u*y+c*_,i[7]=l*g+u*x+c*S,i[2]=d*p+h*v+f*b,i[5]=d*m+h*y+f*_,i[8]=d*g+h*x+f*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],r=e[1],n=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-r*i*u+r*s*o+n*i*l-n*a*o}invert(){let e=this.elements,t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=u*a-s*l,d=s*o-u*i,h=l*i-a*o,f=t*c+r*d+n*h;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);let p=1/f;return e[0]=c*p,e[1]=(n*l-u*r)*p,e[2]=(s*r-n*a)*p,e[3]=d*p,e[4]=(u*t-n*o)*p,e[5]=(n*i-s*t)*p,e[6]=h*p,e[7]=(r*o-l*t)*p,e[8]=(a*t-r*i)*p,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,r,n,i,a,s){let o=Math.cos(i),l=Math.sin(i);return this.set(r*o,r*l,-r*(o*a+l*s)+a+e,-n*l,n*o,-n*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return U("Matrix3: .scale() is deprecated. Use .makeScale() instead."),this.premultiply(en.makeScale(e,t)),this}rotate(e){return U("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."),this.premultiply(en.makeRotation(-e)),this}translate(e,t){return U("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."),this.premultiply(en.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),r=Math.sin(e);return this.set(t,-r,0,r,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,r=e.elements;for(let e=0;e<9;e++)if(t[e]!==r[e])return!1;return!0}fromArray(e,t=0){for(let r=0;r<9;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){let r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}let en=new er,ei=new er().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ea=new er().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.20397
17,1.0569715),es=(h=[.64,.33,.3,.6,.15,.06],f=[.2126,.7152,.0722],p=[.3127,.329],(d={enabled:!0,workingColorSpace:S,spaces:{},convert:function(e,t,r){return!1!==this.enabled&&t!==r&&t&&r&&(this.spaces[t].transfer===M&&(e.r=eo(e.r),e.g=eo(e.g),e.b=eo(e.b)),this.spaces[t].primaries!==this.spaces[r].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[r].fromXYZ)),this.spaces[r].transfer===M&&(e.r=el(e.r),e.g=el(e.g),e.b=el(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?w: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,r){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[r].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(e,t){return U("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),d.workingToColorSpace(e,t)},toWorkingColorSpace:function(e,t){return U("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),d.colorSpaceToWorking(e,t)}}).define({[S]:{primaries:h,whitePoint:p,transfer:w,toXYZ:ei,fromXYZ:ea,luminanceCoefficients:f,workingColorSpaceConfig:{unpackColorSpace:_},outputColorSpaceConfig:{drawingBufferColorSpace:_}},[_]:{primaries:h,whitePoint:p,transfer:M,toXYZ:ei,fromXYZ:ea,luminanceCoefficients:f,outputColorSpaceConfig:{drawingBufferColorSpace:_}}}),d);function eo(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function el(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class eu{static getDataURL(e,r="image/png"){let n;if(/^data:/i.test(e.src)||"u"<typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)n=e;else{void 0===t&&(t=P("canvas")),t.width=e.width,t.height=e.height;let r=t.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=t}return n.toDataURL(r)}static sRGBToLinear(e){if("u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof ImageBitmap&&e instanceof ImageBitmap){let t=P("canvas");t.width=e.width,t.height=e.height;let r=t.getContext("2d");r.drawImage(e,0,0,e.width,e.height);let n=r.getImageData(0,0,e.width,e.height),i=n.data;for(let e=0;e<i.length;e++)i[e]=255*eo(i[e]/255);return r.putImageData(n,0,0),t}if(!e.data)return D("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e;{let t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*eo(t[e]/255)):t[e]=eo(t[e]);return{data:t,width:e.width,height:e.height}}}}let ec=0;class ed{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:ec++}),this.uuid=W(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return"u">typeof HTMLVideoElement&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):"u">typeof VideoFrame&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):null!==t?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){!0===e&&this.version++}toJSON(e){let t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];let r={uuid:this.uuid,url:""},n=this.data;if(null!==n){let e;if(Array.isArray(n)){e=[];for(let t=0,r=n.length;t<r;t++)n[t].isDataTexture?e.push(eh(n[t].image)):e.push(eh(n[t]))}else e=eh(n);r.url=e}return t||(e.images[this.uuid]=r),r}}function eh(e){return"u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof ImageBitmap&&e instanceof ImageBitmap?eu.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(D("Texture: Unable to serialize Texture."),{})}let ef=0,ep=new Q;class em extends j{constructor(e=em.DEFAULT_IMAGE,t=em.DEFAULT_MAPPING,r=1001,n=1001,i=1006,a=1008,s=1023,o=1009,l=em.DEFAULT_ANISOTROPY,u=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:ef++}),this.uuid=W(),this.name="",this.source=new ed(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=r,this.wrapT=n,this.magFilter=i,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new Z(0,0),this.repeat=new Z(1,1),this.center=new Z(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new er,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace
1=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!e&&!!e.depth&&e.depth>1,this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(ep).x}get height(){return this.source.getSize(ep).y}get depth(){return this.source.getSize(ep).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 r=e[t];if(void 0===r){D(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let n=this[t];if(void 0===n){D(`Texture.setValues(): property '${t}' does not exist.`);continue}n&&r&&n.isVector2&&r.isVector2||n&&r&&n.isVector3&&r.isVector3||n&&r&&n.isMatrix3&&r.isMatrix3?n.copy(r):this[t]=r}}toJSON(e){let t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];let r={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.type,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&&(r.userData=this.userData),t||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}}em.DEFAULT_IMAGE=null,em.DEFAULT_MAPPING=300,em.DEFAULT_ANISOTROPY=1;class eg{static{eg.prototype.isVector4=!0}constructor(e=0,t=0,r=0,n=1){this.x=e,this.y=t,this.z=r,this.w=n}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,r,n){return this.x=e,this.y=t,this.z=r,this.w=n,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("THREE.Vector4: 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("THREE.Vector4: 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=void 0!==e.w?e.w:1,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}
1sub(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,r=this.y,n=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*r+a[8]*n+a[12]*i,this.y=a[1]*t+a[5]*r+a[9]*n+a[13]*i,this.z=a[2]*t+a[6]*r+a[10]*n+a[14]*i,this.w=a[3]*t+a[7]*r+a[11]*n+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,r,n,i,a=e.elements,s=a[0],o=a[4],l=a[8],u=a[1],c=a[5],d=a[9],h=a[2],f=a[6],p=a[10];if(.01>Math.abs(o-u)&&.01>Math.abs(l-h)&&.01>Math.abs(d-f)){if(.1>Math.abs(o+u)&&.1>Math.abs(l+h)&&.1>Math.abs(d+f)&&.1>Math.abs(s+c+p-3))return this.set(1,0,0,0),this;t=Math.PI;let e=(s+1)/2,a=(c+1)/2,m=(p+1)/2,g=(o+u)/4,v=(l+h)/4,y=(d+f)/4;return e>a&&e>m?e<.01?(r=0,n=.707106781,i=.707106781):(n=g/(r=Math.sqrt(e)),i=v/r):a>m?a<.01?(r=.707106781,n=0,i=.707106781):(r=g/(n=Math.sqrt(a)),i=y/n):m<.01?(r=.707106781,n=.707106781,i=0):(r=v/(i=Math.sqrt(m)),n=y/i),this.set(r,n,i,t),this}let m=Math.sqrt((f-d)*(f-d)+(l-h)*(l-h)+(u-o)*(u-o));return .001>Math.abs(m)&&(m=1),this.x=(f-d)/m,this.y=(l-h)/m,this.z=(u-o)/m,this.w=Math.acos((s+c+p-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=X(this.x,e.x,t.x),this.y=X(this.y,e.y,t.y),this.z=X(this.z,e.z,t.z),this.w=X(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=X(this.x,e,t),this.y=X(this.y,e,t),this.z=X(this.z,e,t),this.w=X(this.w,e,t),this}clampLength(e,t){let r=this.length();return this.divideScalar(r||1).multiplyScalar(X(r,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}round(){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,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this.w=e.w+(t.w-e.w)*r,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}}class ev extends j{constructor(e=1,t=1,r={}){super(),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:1006,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1,useArrayDepthTexture:!1},r),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=r.depth,this.scissor=new eg(0,0,e,t),this.scissorTest=!1,this.viewport=new eg(0,0,e,t),this.textures=[];const n=new em({width:e,height:t,depth:r.depth}),i=r.count;for(let e=0;e<i;e++)this.textures[e]=n.clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;this._setTextureOptions(r),this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.resolveDepthBuffer=r.resolveDepthBuffer,this.resolveStencilBuffer=r.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=r.depthTexture,this.samples=r.samples,this.multiview=r.multiview,this.useArrayDepthTexture=r.useArrayDepthTexture}_setTextureOptions(e={}){let t={minFilter:1006,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==e.mapping&&(t.mapping=e.mapping),void 0!==e.wrapS&&(t.wrapS=e.wrapS),void 0!==e.wrapT&&(t.wrapT=e.wrapT),void 0!==e.wrapR&&(t.wrapR=e.wrapR),void 0!==e.magFilter&&(t.magFilter=e.magFilter),void 0!==e.minFilter&&(t.minFilter=e.minFilter),void 0!==e.format&&(t.format=e.format),void 0!==e.type&&(t.type=e.type),void 0!==e.anisotropy&&(t.anisotropy=e.anisotropy),void 0!==e.colorSpace&&(t.colorSpace
vendor: 9,950 bytes, line 1
1=e.colorSpace),void 0!==e.flipY&&(t.flipY=e.flipY),void 0!==e.generateMipmaps&&(t.generateMipmaps=e.generateMipmaps),void 0!==e.internalFormat&&(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){null!==this._depthTexture&&(this._depthTexture.renderTarget=null),null!==e&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,r=1){if(this.width!==e||this.height!==t||this.depth!==r){this.width=e,this.height=t,this.depth=r;for(let n=0,i=this.textures.length;n<i;n++)this.textures[n].image.width=e,this.textures[n].image.height=t,this.textures[n].image.depth=r,!0!==this.textures[n].isData3DTexture&&(this.textures[n].isArrayTexture=this.textures[n].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,r=e.textures.length;t<r;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new ed(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this.useArrayDepthTexture=e.useArrayDepthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ey extends ev{constructor(e=1,t=1,r={}){super(e,t,r),this.isWebGLRenderTarget=!0}}class ex extends em{constructor(e=null,t=1,r=1,n=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:r,depth:n},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class eb extends em{constructor(e=null,t=1,r=1,n=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:r,depth:n},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class e_{static{e_.prototype.isMatrix4=!0}constructor(e,t,r,n,i,a,s,o,l,u,c,d,h,f,p,m){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,r,n,i,a,s,o,l,u,c,d,h,f,p,m)}set(e,t,r,n,i,a,s,o,l,u,c,d,h,f,p,m){let g=this.elements;return g[0]=e,g[4]=t,g[8]=r,g[12]=n,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,g[14]=d,g[3]=h,g[7]=f,g[11]=p,g[15]=m,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,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this}copyPosition(e){let t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[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,r){return 0===this.determinantAffine()?(e.set(1,0,0),t.set(0,1,0),r.set(0,0,1)):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2)),this}makeBasis(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this}extractRotation(e){if(0===e.determinantAffine())return this.identity();let t=this.elements,r=e.elements,n=1/eS.setFromMatrixColumn(e,0).length(),i=1/eS.setFromMatrixColumn(e,1).length(),a=1/eS.setFromMatrixColumn(e,2).length();return t[0]=r[0]*n,t[1]=r[1]*n,t[2]=r[2]*n,t[3]=0,t[4]=r[4]*i,t[5]=r[5]*i,t[6]=r[6]*i,t[7]=0,t[8]=r[8]*a,t[9]=r[9]*a,t[10]=r[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,r=e.x,n=e.y,i=e.z,a=Math.cos(r),s=Math.sin(r),o=Math.cos(n),l=Math.sin(n),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){let e=a*u,r=a*c,n=s*u,i=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=r+n*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=n+r*l,t[10]=a*o}else if("YXZ"===e.order){let e=o*u,r=o*c,n=l*u,i=l*c;t[0]=e+i*s,t[4]=n*s-r,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=r*s-n,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){let e=o*u,r=o*c,n=l*u,i=l*c;t[0]=e-i*s,t[4]=-a*c,t[8]=n+r*s,t[1]=r+n*s,t[5]=a*u,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){let e=a*u,r=a*c,n=s*u,i=s*c;t[0]=o*u,t[4]=n*l-r,t[8]=e*l+i,t[1]=o*c,t[5]=i*l+e,t[9]=r*l-n,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){let e=a*o,r=a*l,n=s*o,i=s*l;t[0]=o*u,t[4]=i-e*c,t[8]=n*c+r,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=r*c+n,t[10]=e-i*c}else if("XZY"===e.order){let e=a*o,r=a*l,n=s*o,i=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=e*c+i,t[5]=a*u,t[9]=r*c-n,t[2]=n*c-r,t[6]=s*u,t[10]=i*c+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(eM,e,eT)}lookAt(e,t,r){let n=this.elements;return eC.subVectors(e,t),0===eC.lengthSq()&&(eC.z=1),eC.normalize(),eE.crossVectors(r,eC),0===eE.lengthSq()&&(1===Math.abs(r.z)?eC.x+=1e-4:eC.z+=1e-4,eC.normalize(),eE.crossVectors(r,eC)),eE.normalize(),eA.crossVectors(eC,eE),n[0]=eE.x,n[4]=eA.x,n[8]=eC.x,n[1]=eE.y,n[5]=eA.y,n[9]=eC.y,n[2]=eE.z,n[6]=eA.z,n[10]=eC.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let r=e.elements,n=t.elements,i=this.elements,a=r[0],s=r[4],o=r[8],l=r[12],u=r[1],c=r[5],d=r[9],h=r[13],f=r[2],p=r[6],m=r[10],g=r[14],v=r[3],y=r[7],x=r[11],b=r[15],_=n[0],S=n[4],w=n[8],M=n[12],T=n[1],E=n[5],A=n[9],C=n[13],P=n[2],I=n[6],O=n[10],R=n[14],L=n[3],N=n[7],D=n[11],k=n[15];return i[0]=a*_+s*T+o*P+l*L,i[4]=a*S+s*E+o*I+l*N,i[8]=a*w+s*A+o*O+l*D,i[12]=a*M+s*C+o*R+l*k,i[1]=u*_+c*T+d*P+h*L,i[5]=u*S+c*E+d*I+h*N,i[9]=u*w+c*A+d*O+h*D,i[13]=u*M+c*C+d*R+h*k,i[2]=f*_+p*T+m*P+g*L,i[6]=f*S+p*E+m*I+g*N,i[10]=f*w+p*A+m*O+g*D,i[14]=f*M+p*C+m*R+g*k,i[3]=v*_+y*T+x*P+b*L,i[7]=v*S+y*E+x*I+b*N,i[11]=v*w+y*A+x*O+b*D,i[15]=v*M+y*C+x*R+b*k,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],r=e[4],n=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],d=e[10],h=e[14],f=e[3],p=e[7],m=e[11],g=e[15],v=o*h-l*d,y=s*h-l*c,x=s*d-o*c,b=a*h-l*u,_=a*d-o*u,S=a*c-s*u;return t*(p*v-m*y+g*x)-r*(f*v-m*b+g*_)+n*(f*y-p*b+g*S)-i*(f*x-p*_+m*S)}determinantAffine(){let e=this.elements,t=e[0],r=e[4],n=e[8],i=e[1],a=e[5],s=e[9],o=e[2],l=e[6],u=e[10];return t*(a*u-s*l)-r*(i*u-s*o)+n*(i*l-a*o)}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(e,t,r){let n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=r),this}invert(){let e=this.elements,t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=t*s-r*a,y=t*o-n*a,x=t*l-i*a,b=r*o-n*s,_=r*l-i*s,S=n*l-i*o,w=u*p-c*f,M=u*m-d*f,T=u*g-h*f,E=c*m-d*p,A=c*g-h*p,C=d*g-h*m,P=v*C-y*A+x*E+b*T-_*M+S*w;if(0===P)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let I=1/P;return e[0]=(s*C-o*A+l*E)*I,e[1]=(n*A-r*C-i*E)*I,e[2]=(p*S-m*_+g*b)*I,e[3]=(d*_-c*S-h*b)*I,e[4]=(o*T-a*C-l*M)*I,e[5]=(t*C-n*T+i*M)*I,e[6]=(m*x-f*S-g*y)*I,e[7]=(u*S-d*x+h*y)*I,e[8]=(a*A-s*T+l*w)*I,e[9]=(r*T-t*A-i*w)*I,e[10]=(f*_-p*x+g*v)*I,e[11]=(c*x-u*_-h*v)*I,e[12]=(s*M-a*E-o*w)*I,e[13]=(t*E-r*M+n*w)*I,e[14]=(p*y-f*b-m*v)*I,e[15]=(u*b-c*y+d*v)*I,this}scale(e){let t=this.elements,r=e.x,n=e.y,i=e.z;return t[0]*=r,t[4]*=n,t[8]*=i,t[1]*=r,t[5]*=n,t[9]*=i,t[2]*=r,t[6]*=n,t[10]*=i,t[3]*=r,t[7]*=n,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,r){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,r,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let r=Math.cos(t),n=Math.sin(t),i=1-r,a=e.x,s=e.y,o=e.z,l=i*a,u=i*s;return this.set(l*a+r,l*s-n*o,l*o+n*s,0,l*s+n*o,u*s+r,u*o-n*a,0,l*o-n*s,u*o+n*a,i*o*o+r,0,0,0,0,1),this}makeScale(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,t,r,n,i,a){return this.set(1,r,i,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,r){let n=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,u=a+a,c=s+s,d=i*l,h=i*u,f=i*c,p=a*u,m=a*c,g=s*c,v=o*l,y=o*u,x=o*c,b=r.x,_=r.y,S=r.z;return n[0]=(1-(p+g))*b,n[1]=(h+x)*b,n[2]=(f-y)*b,n[3]=0,n[4]=(h-x)*_,n[5]=(1-(d+g))*_,n[6]=(m+v)*_,n[7]=0,n[8]=(f+y)*S,n[9]=(m-v)*S,n[10]=(1-(d+p))*S,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,r){let n=this.elements;e.x=n[12],e.y=n[13],e.z=n[14];let i=this.determinantAffine();if(0===i)return r.set(1,1,1),t.identity(),this;let a=eS.set(n[0],n[1],n[2]).length(),s=eS.set(n[4],n[5],n[6]).length(),o=eS.set(n[8],n[9],n[10]).length();i<0&&(a=-a),ew.copy(this);let l=1/a,u=1/s,c=1/o;return ew.elements[0]*=l,ew.elements[1]*=l,ew.elements[2]*=l,ew.elements[4]*=u,ew.elements[5]*=u,ew.elements[6]*=u,ew.elements[8]*=c,ew.elements[9]*=c,ew.elements[10]*=c,t.setFromRotationMatrix(ew),r.x=a,r.
1y=s,r.z=o,this}makePerspective(e,t,r,n,i,a,s=2e3,o=!1){let l,u,c=this.elements;if(o)l=i/(a-i),u=a*i/(a-i);else if(2e3===s)l=-(a+i)/(a-i),u=-2*a*i/(a-i);else if(2001===s)l=-a/(a-i),u=-a*i/(a-i);else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return c[0]=2*i/(t-e),c[4]=0,c[8]=(t+e)/(t-e),c[12]=0,c[1]=0,c[5]=2*i/(r-n),c[9]=(r+n)/(r-n),c[13]=0,c[2]=0,c[6]=0,c[10]=l,c[14]=u,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,r,n,i,a,s=2e3,o=!1){let l,u,c=this.elements;if(o)l=1/(a-i),u=a/(a-i);else if(2e3===s)l=-2/(a-i),u=-(a+i)/(a-i);else if(2001===s)l=-1/(a-i),u=-i/(a-i);else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return c[0]=2/(t-e),c[4]=0,c[8]=0,c[12]=-(t+e)/(t-e),c[1]=0,c[5]=2/(r-n),c[9]=0,c[13]=-(r+n)/(r-n),c[2]=0,c[6]=0,c[10]=l,c[14]=u,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,r=e.elements;for(let e=0;e<16;e++)if(t[e]!==r[e])return!1;return!0}fromArray(e,t=0){for(let r=0;r<16;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){let r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}}let eS=new Q,ew=new e_,eM=new Q(0,0,0),eT=new Q(1,1,1),eE=new Q,eA=new Q,eC=new Q,eP=new e_,eI=new J;class eO{constructor(e=0,t=0,r=0,n=eO.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=r,this._order=n}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,r,n=this._order){return this._x=e,this._y=t,this._z=r,this._order=n,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,r=!0){let n=e.elements,i=n[0],a=n[4],s=n[8],o=n[1],l=n[5],u=n[9],c=n[2],d=n[6],h=n[10];switch(t){case"XYZ":this._y=Math.asin(X(s,-1,1)),.9999999>Math.abs(s)?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-X(u,-1,1)),.9999999>Math.abs(u)?(this._y=Math.atan2(s,h),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(X(d,-1,1)),.9999999>Math.abs(d)?(this._y=Math.atan2(-c,h),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-X(c,-1,1)),.9999999>Math.abs(c)?(this._x=Math.atan2(d,h),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(X(o,-1,1)),.9999999>Math.abs(o)?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(s,h));break;case"XZY":this._z=Math.asin(-X(a,-1,1)),.9999999>Math.abs(a)?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-u,h),this._y=0);break;default:D("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===r&&this._onChangeCallback(),this}setFromQuaternion(e,t,r){return eP.makeRotationFromQuaternion(e),this.setFromRotationMatrix(eP,t,r)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return eI.setFromEuler(this),this.setFromQuaternion(eI,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],void 0!==e[3]&&(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}}eO.DEFAULT_ORDER="XYZ";class eR{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!=0}isEnabled(e){return(this.mask&1<<e)!=0}}let eL=0,eN=new Q,eD=new J,ek=new e_,eU=new Q,eF=new Q,ez=new Q,ej=new J,eB=new Q(1,0,0),eV=new Q(0,1,0),eG=new Q(0,0,1),eH={type:"added"},eW={type:"removed"},eX={type:"childadded",child:null},eq={type:"childremoved",child:null};class eY extends j{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:eL++}),this.uuid=W(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=eY.DEFAULT_UP.clone();const e=new Q,t=new eO,r=new J,n=new Q(1,1,1);t._onChange(function(){r.setFromEuler(t,!1)}),r._onChange(function(){t.setFromQuaternion(r,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new e_},normalMatrix:{value:new er}}),this.matrix=new e_,this.matrixWorld=new e_,this.matrixAutoUpdate=eY.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=eY.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new eR,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,428 bytes, line 1
1setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return eD.setFromAxisAngle(e,t),this.quaternion.multiply(eD),this}rotateOnWorldAxis(e,t){return eD.setFromAxisAngle(e,t),this.quaternion.premultiply(eD),this}rotateX(e){return this.rotateOnAxis(eB,e)}rotateY(e){return this.rotateOnAxis(eV,e)}rotateZ(e){return this.rotateOnAxis(eG,e)}translateOnAxis(e,t){return eN.copy(e).applyQuaternion(this.quaternion),this.position.add(eN.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(eB,e)}translateY(e){return this.translateOnAxis(eV,e)}translateZ(e){return this.translateOnAxis(eG,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(ek.copy(this.matrixWorld).invert())}lookAt(e,t,r){e.isVector3?eU.copy(e):eU.set(e,t,r);let n=this.parent;this.updateWorldMatrix(!0,!1),eF.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ek.lookAt(eF,eU,this.up):ek.lookAt(eU,eF,this.up),this.quaternion.setFromRotationMatrix(ek),n&&(ek.extractRotation(n.matrixWorld),eD.setFromRotationMatrix(ek),this.quaternion.premultiply(eD.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?k("Object3D.add: object can't be added as a child of itself.",e):e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(eH),eX.child=e,this.dispatchEvent(eX),eX.child=null):k("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 -1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(eW),eq.child=e,this.dispatchEvent(eq),eq.child=null),this}removeFromParent(){let e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),ek.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),ek.multiply(e.parent.matrixWorld)),e.applyMatrix4(ek),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(eH),eX.child=e,this.dispatchEvent(eX),eX.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 r=0,n=this.children.length;r<n;r++){let n=this.children[r].getObjectByProperty(e,t);if(void 0!==n)return n}}getObjectsByProperty(e,t,r=[]){this[e]===t&&r.push(this);let n=this.children;for(let i=0,a=n.length;i<a;i++)n[i].getObjectsByProperty(e,t,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(eF,e,ez),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(eF,ej,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 r=0,n=t.length;r<n;r++)t[r].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);let t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].traverseVisible(e)}traverseAncestors(e){let t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);let e=this.pivot;if(null!==e){let t=e.x,r=e.y,n=e.z,i=this.matrix.elements;i[12]+=t-i[0]*t-i[4]*r-i[8]*n,i[13]+=r-i[1]*t-i[5]*r-i[9]*n,i[14]+=n-i[2]*t-i[6]*r-i[10]*n}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].updateMatrixWorld(e)}updateWorldMatrix(e,t,r=!1){let n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||r)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix
vendor: 6,964 bytes, line 1
1):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,r=!0),!0===t){let e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0,r)}}toJSON(e){let t=void 0===e||"string"==typeof e,r={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let n={};function i(t,r){return void 0===t[r.uuid]&&(t[r.uuid]=r.toJSON(e)),r.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),!1!==this.static&&(n.static=this.static),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),null!==this.pivot&&(n.pivot=this.pivot.toArray()),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),void 0!==this.morphTargetDictionary&&(n.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),void 0!==this.morphTargetInfluences&&(n.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),n.instanceInfo=this._instanceInfo.map(e=>({...e})),n.availableInstanceIds=this._availableInstanceIds.slice(),n.availableGeometryIds=this._availableGeometryIds.slice(),n.nextIndexStart=this._nextIndexStart,n.nextVertexStart=this._nextVertexStart,n.geometryCount=this._geometryCount,n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.matricesTexture=this._matricesTexture.toJSON(e),n.indirectTexture=this._indirectTexture.toJSON(e),null!==this._colorsTexture&&(n.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(n.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(n.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){let r=t.shapes;if(Array.isArray(r))for(let t=0,n=r.length;t<n;t++){let n=r[t];i(e.shapes,n)}else i(e.shapes,r)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){let t=[];for(let r=0,n=this.material.length;r<n;r++)t.push(i(e.materials,this.material[r]));n.material=t}else n.material=i(e.materials,this.material);if(this.children.length>0){n.children=[];for(let t=0;t<this.children.length;t++)n.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let t=0;t<this.animations.length;t++){let r=this.animations[t];n.animations.push(i(e.animations,r))}}if(t){let t=a(e.geometries),n=a(e.materials),i=a(e.textures),s=a(e.images),o=a(e.shapes),l=a(e.skeletons),u=a(e.animations),c=a(e.nodes);t.length>0&&(r.geometries=t),n.length>0&&(r.materials=n),i.length>0&&(r.textures=i),s.length>0&&(r.images=s),o.length>0&&(r.shapes=o),l.length>0&&(r.skeletons=l),u.length>0&&(r.animations=u),c.length>0&&(r.nodes=c)}return r.object=n,r;function a(e){let t=[];for(let r in e){let n=e[r];delete n.metadata,t.push(n)}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=null!==e.pivot?e.pivot.clone():null,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)),!0===t)for(let t=0;t<e.children.length;t++){let r=e.children[t];this.add(r.clone())}return this}}eY.DEFAULT_UP=new Q(0,1,0),eY.DEFAULT_MATRIX_AUTO_UPDATE=!0,eY.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class e$ extends eY{constructor(){super(),this.isGroup=!0,this.type="Group"}}let eK={type:"move"};class eZ{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new e$,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new e$,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Q,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Q),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new e$,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Q,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Q,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let r of e.hand.values())this._getHandJoint(t,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,r){let n=null,i=null,a=null,s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){for(let n of(a=!0,e.hand.values())
1){let e=t.getJointPose(n,r),i=this._getHandJoint(l,n);null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=null!==e}let n=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=n.position.distanceTo(i.position);l.inputState.pinching&&s>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,r))&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,o.eventsEnabled&&o.dispatchEvent({type:"gripUpdated",data:e,target:this}));null!==s&&(null===(n=t.getPose(e.targetRaySpace,r))&&null!==i&&(n=i),null!==n&&(s.matrix.fromArray(n.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,n.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(n.linearVelocity)):s.hasLinearVelocity=!1,n.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(n.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(eK)))}return null!==s&&(s.visible=null!==n),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){let r=new e$;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[t.jointName]=r,e.add(r)}return e.joints[t.jointName]}}let eJ={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},eQ={h:0,s:0,l:0},e0={h:0,s:0,l:0};function e1(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*6*(2/3-r):e}class e2{constructor(e,t,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,r)}set(e,t,r){return void 0===t&&void 0===r?e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e):this.setRGB(e,t,r),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=_){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,es.colorSpaceToWorking(this,t),this}setRGB(e,t,r,n=es.workingColorSpace){return this.r=e,this.g=t,this.b=r,es.colorSpaceToWorking(this,n),this}setHSL(e,t,r,n=es.workingColorSpace){if(e=q(e,1),t=X(t,0,1),r=X(r,0,1),0===t)this.r=this.g=this.b=r;else{let n=r<=.5?r*(1+t):r+t-r*t,i=2*r-n;this.r=e1(i,n,e+1/3),this.g=e1(i,n,e),this.b=e1(i,n,e-1/3)}return es.colorSpaceToWorking(this,n),this}setStyle(e,t=_){let r;function n(t){void 0!==t&&1>parseFloat(t)&&D("Color: Alpha component of "+e+" will be ignored.")}if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))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(s))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(s))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:D("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);D("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=_){let r=eJ[e.toLowerCase()];return void 0!==r?this.setHex(r,t):D("Color: Unknown color "+e),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=eo(e.r),this.g=eo(e.g),this.b=eo(e.b),this}copyLinearToSRGB(e){return this.r=el(e.r),this.g=el(e.g),this.b=el(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=_){return es.workingToColorSpace(e3.copy(this),e),65536*Math.round(X(255*e3.r,0,255))+256*Math.round(X(255*e3.g,0,255))+Math.round(X(255*e3.b,0,255))}getHexString(e=_){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=es.workingColorSpace){let r,n;es.workingToColorSpace(e3.copy(this),t);let i=e3.r,a=e3.g,s=e3.b,o=Math.max(i,a,s),l=Math.min(i,a,s),u=(l+o)/2;if(l===o)r=0,n=0;else{let e=o-l;switch(n=u<=.5?e/(o+l):e/(2-o-l),o){case i:r=(a-s)/e+6*(a<s);break;case a:r=(s-i)/e+2;break;case s:r=(i-a)/e+4}r/=6}return e.h=r,e.s=n,e.l=u,e}getRGB(e,t=es.workingColorSpace){return es.workingToColorSpace(e3.copy(this),t),e.r=e3.r,e.g=e3.g,e.b
vendor: 14,174 bytes, line 1
1=e3.b,e}getStyle(e=_){es.workingToColorSpace(e3.copy(this),e);let t=e3.r,r=e3.g,n=e3.b;return e!==_?`color(${e} ${t.toFixed(3)} ${r.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*r)},${Math.round(255*n)})`}offsetHSL(e,t,r){return this.getHSL(eQ),this.setHSL(eQ.h+e,eQ.s+t,eQ.l+r)}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,r){return this.r=e.r+(t.r-e.r)*r,this.g=e.g+(t.g-e.g)*r,this.b=e.b+(t.b-e.b)*r,this}lerpHSL(e,t){this.getHSL(eQ),e.getHSL(e0);let r=Y(eQ.h,e0.h,t),n=Y(eQ.s,e0.s,t),i=Y(eQ.l,e0.l,t);return this.setHSL(r,n,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,r=this.g,n=this.b,i=e.elements;return this.r=i[0]*t+i[3]*r+i[6]*n,this.g=i[1]*t+i[4]*r+i[7]*n,this.b=i[2]*t+i[5]*r+i[8]*n,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}}let e3=new e2;e2.NAMES=eJ;class e4{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new e2(e),this.density=t}clone(){return new e4(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class e5{constructor(e,t=1,r=1e3){this.isFog=!0,this.name="",this.color=new e2(e),this.near=t,this.far=r}clone(){return new e5(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class e6 extends eY{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 eO,this.environmentIntensity=1,this.environmentRotation=new eO,this.overrideMaterial=null,"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(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),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}let e8=new Q,e9=new Q,e7=new Q,te=new Q,tt=new Q,tr=new Q,tn=new Q,ti=new Q,ta=new Q,ts=new Q,to=new eg,tl=new eg,tu=new eg;class tc{constructor(e=new Q,t=new Q,r=new Q){this.a=e,this.b=t,this.c=r}static getNormal(e,t,r,n){n.subVectors(r,t),e8.subVectors(e,t),n.cross(e8);let i=n.lengthSq();return i>0?n.multiplyScalar(1/Math.sqrt(i)):n.set(0,0,0)}static getBarycoord(e,t,r,n,i){e8.subVectors(n,t),e9.subVectors(r,t),e7.subVectors(e,t);let a=e8.dot(e8),s=e8.dot(e9),o=e8.dot(e7),l=e9.dot(e9),u=e9.dot(e7),c=a*l-s*s;if(0===c)return i.set(0,0,0),null;let d=1/c,h=(l*o-s*u)*d,f=(a*u-s*o)*d;return i.set(1-h-f,f,h)}static containsPoint(e,t,r,n){return null!==this.getBarycoord(e,t,r,n,te)&&te.x>=0&&te.y>=0&&te.x+te.y<=1}static getInterpolation(e,t,r,n,i,a,s,o){return null===this.getBarycoord(e,t,r,n,te)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(i,te.x),o.addScaledVector(a,te.y),o.addScaledVector(s,te.z),o)}static getInterpolatedAttribute(e,t,r,n,i,a){return to.setScalar(0),tl.setScalar(0),tu.setScalar(0),to.fromBufferAttribute(e,t),tl.fromBufferAttribute(e,r),tu.fromBufferAttribute(e,n),a.setScalar(0),a.addScaledVector(to,i.x),a.addScaledVector(tl,i.y),a.addScaledVector(tu,i.z),a}static isFrontFacing(e,t,r,n){return e8.subVectors(r,t),e9.subVectors(e,t),0>e8.cross(e9).dot(n)}set(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this}setFromPointsAndIndices(e,t,r,n){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,r,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,n),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 e8.subVectors(this.c,this.b),e9.subVectors(this.a,this.b),.5*e8.cross(e9).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return tc.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return tc.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,r,n,i){return tc.getInterpolation(e,this.a,this.b,this.c,t,r,n,i)}containsPoint(e){return tc.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return tc.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let r,n,i=this.a,a=this.b,s=this.c;tt.subVectors(a,i),tr.subVectors(s,i),ti.subVectors(e,i);let o=tt.dot(ti),l=tr.dot(ti);if(o<=0&&l<=0)return t.copy(i);ta.subVectors(e,a);let u=tt.dot(ta),c=tr.dot(ta);if(u>=0&&c<=u)return t.copy(a);let d=o*c-u*l;if(d<=0&&o>=0&&u<=0)return r=o/(o-u),t.copy(i).addScaledVector(tt,r);ts.subVectors(e,s);let h=tt.dot(ts),f=tr.dot(ts);if(f>=0&&h<=f)return t.copy(s);let p=h*l-o*f;if(p<=0&&l>=0&&f<=0)return n=l/(l-f),t.copy(i).addScaledVector(tr,n);let m=u*f-h*c;if(m<=0&&c-u>=0&&h-f>=0)return tn.subVectors(s,a),n=(c-u)/(c-u+(h-f)),t.copy(a).addScaledVector(tn,n);let g=1/(m+p+d);return r=p*g,n=d*g,t.copy(i).addScaledVector(tt,r).addScaledVector(tr,n)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class td{constructor(e=new Q(Infinity,Infinity,Infinity),t=new Q(-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,r=e.length;t<r;t+=3)this.expandByPoint(tf.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,r=e.count;t<r;t++)this.expandByPoint(tf.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let r=tf.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),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=Infinity,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 r=e.geometry;if(void 0!==r){let n=r.getAttribute("position");if(!0===t&&void 0!==n&&!0!==e.isInstancedMesh)for(let t=0,r=n.count;t<r;t++)!0===e.isMesh?e.getVertexPosition(t,tf):tf.fromBufferAttribute(n,t),tf.applyMatrix4(e.matrixWorld),this.expandByPoint(tf);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),tp.copy(e.boundingBox)):(null===r.boundingBox&&r.computeBoundingBox(),tp.copy(r.boundingBox)),tp.applyMatrix4(e.matrixWorld),this.union(tp)}let n=e.children;for(let e=0,r=n.length;e<r;e++)this.expandByObject(n[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,tf),tf.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(t_),tS.subVectors(this.max,t_),tm.subVectors(e.a,t_),tg.subVectors(e.b,t_),tv.subVectors(e.c,t_),ty.subVectors(tg,tm),tx.subVectors(tv,tg),tb.subVectors(tm,tv);let t=[0,-ty.z,ty.y,0,-tx.z,tx.y,0,-tb.z,tb.y,ty.z,0,-ty.x,tx.z,0,-tx.x,tb.z,0,-tb.x,-ty.y,ty.x,0,-tx.y,tx.x,0,-tb.y,tb.x,0];return!!tT(t,tm,tg,tv,tS)&&!!tT(t=[1,0,0,0,1,0,0,0,1],tm,tg,tv,tS)&&(tw.crossVectors(ty,tx),tT(t=[tw.x,tw.y,tw.z],tm,tg,tv,tS))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,tf).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(tf).length()),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()||(th[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),th[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),th[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),th[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),th[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),th[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),th[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),th[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(th)),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}}let th=[new Q,new Q,new Q,new Q,new Q,new Q,new Q,new Q],tf=new Q,tp=new td,tm=new Q,tg=new Q,tv=new Q,ty=new Q,tx=new Q,tb=new Q,t_=new Q,tS=new Q,tw=new Q,tM=new Q;function tT(e,t,r,n,i){for(let a=0,s=e.length-3;a<=s;a+=3){tM.fromArray(e,a);let s=i.x*Math.abs(tM.x)+i.y*Math.abs(tM.y)+i.z*Math.abs(tM.z),o=t.dot(tM),l=r.dot(tM),u=n.dot(tM);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}let tE=function(){let e=new ArrayBuffer(4),t=new Float32Array(e),r=new Uint32Array(e),n=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(n[e]=0,n[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,i[e]=24,i[256|e]=24):(n[e]=31744,n[256|e]=64512,i[e]=13,i[256|e]=13)}let a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,r=0;for(;(8388608&t)==0;)t<<=1,r-=8388608;t&=-8388609,r+=0x38800000,a[e]=t|r}for(let e=1024;e<2048;++e)a[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=0x47800000,s[32]=0x80000000;for(let e=33;e<63;++e)s[e]=0x80000000+(e-32<<23);s[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(o[e]=1024);return{floatView:t,uint32View:r,baseTable:n,shiftTable:i,mantissaTable:a,exponentTable:s,offsetTable:o}}();function tA(e){Math.abs(e)>65504&&D("DataUtils.toHalfFloat(): Value out of range."),e=X(e,-65504,65504),tE.floatView[0]=e;let t=tE.uint32View[0],r=t>>23&511;return tE.baseTable[r]+((8388607&t)>>tE.shiftTable[r])}function tC(e){let t=e>>10;return tE.uint32View[0]=tE.mantissaTable[tE.offsetTable[t]+(1023&e)]+tE.exponentTable[t],tE.floatView[0]}let tP=new Q,tI=new Z,tO=0;class tR extends j{constructor(e,t,r=!1){if(super(),Array.isArray(e))throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:tO++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=r,this.usage=35044,this.updateRanges=[],this.gpuType=1015,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&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,r){e*=this.itemSize,r*=t.itemSize;
vendor: 4,142 bytes, line 1
1for(let n=0,i=this.itemSize;n<i;n++)this.array[e+n]=t.array[r+n];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,r=this.count;t<r;t++)tI.fromBufferAttribute(this,t),tI.applyMatrix3(e),this.setXY(t,tI.x,tI.y);else if(3===this.itemSize)for(let t=0,r=this.count;t<r;t++)tP.fromBufferAttribute(this,t),tP.applyMatrix3(e),this.setXYZ(t,tP.x,tP.y,tP.z);return this}applyMatrix4(e){for(let t=0,r=this.count;t<r;t++)tP.fromBufferAttribute(this,t),tP.applyMatrix4(e),this.setXYZ(t,tP.x,tP.y,tP.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)tP.fromBufferAttribute(this,t),tP.applyNormalMatrix(e),this.setXYZ(t,tP.x,tP.y,tP.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)tP.fromBufferAttribute(this,t),tP.transformDirection(e),this.setXYZ(t,tP.x,tP.y,tP.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let r=this.array[e*this.itemSize+t];return this.normalized&&(r=$(r,this.array)),r}setComponent(e,t,r){return this.normalized&&(r=K(r,this.array)),this.array[e*this.itemSize+t]=r,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=$(t,this.array)),t}setX(e,t){return this.normalized&&(t=K(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=$(t,this.array)),t}setY(e,t){return this.normalized&&(t=K(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=$(t,this.array)),t}setZ(e,t){return this.normalized&&(t=K(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=$(t,this.array)),t}setW(e,t){return this.normalized&&(t=K(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=K(t,this.array),r=K(r,this.array)),this.array[e+0]=t,this.array[e+1]=r,this}setXYZ(e,t,r,n){return e*=this.itemSize,this.normalized&&(t=K(t,this.array),r=K(r,this.array),n=K(n,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this}setXYZW(e,t,r,n,i){return e*=this.itemSize,this.normalized&&(t=K(t,this.array),r=K(r,this.array),n=K(n,this.array),i=K(i,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,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),35044!==this.usage&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}}class tL extends tR{constructor(e,t,r){super(new Uint16Array(e),t,r)}}class tN extends tR{constructor(e,t,r){super(new Uint32Array(e),t,r)}}class tD extends tR{constructor(e,t,r){super(new Float32Array(e),t,r)}}let tk=new td,tU=new Q,tF=new Q;class tz{constructor(e=new Q,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 r=this.center;void 0!==t?r.copy(t):tk.setFromPoints(e).getCenter(r);let n=0;for(let t=0,i=e.length;t<i;t++)n=Math.max(n,r.distanceToSquared(e[t]));return this.radius=Math.sqrt(n),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 r=this.center.distanceToSquared(e);return t.copy(e),r>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.set(this.center,this.center),e.expandByScalar(this.radius)),e}
vendor: 12,818 bytes, line 1
1applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=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;tU.subVectors(e,this.center);let t=tU.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),r=(e-this.radius)*.5;this.center.addScaledVector(tU,r/e),this.radius+=r}return this}union(e){return e.isEmpty()||(this.isEmpty()?this.copy(e):!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(tF.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tU.copy(e.center).add(tF)),this.expandByPoint(tU.copy(e.center).sub(tF)))),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}}let tj=0,tB=new e_,tV=new eY,tG=new Q,tH=new td,tW=new td,tX=new Q;class tq extends j{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:tj++}),this.uuid=W(),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={},this._transformed=!1}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(!function(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}(e)?tL:tN)(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 void 0!==this.attributes[e]}addGroup(e,t,r=0){this.groups.push({start:e,count:t,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);let r=this.attributes.normal;if(void 0!==r){let t=new er().getNormalMatrix(e);r.applyNormalMatrix(t),r.needsUpdate=!0}let n=this.attributes.tangent;return void 0!==n&&(n.transformDirection(e),n.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this._transformed=!0,this}applyQuaternion(e){return tB.makeRotationFromQuaternion(e),this.applyMatrix4(tB),this}rotateX(e){return tB.makeRotationX(e),this.applyMatrix4(tB),this}rotateY(e){return tB.makeRotationY(e),this.applyMatrix4(tB),this}rotateZ(e){return tB.makeRotationZ(e),this.applyMatrix4(tB),this}translate(e,t,r){return tB.makeTranslation(e,t,r),this.applyMatrix4(tB),this}scale(e,t,r){return tB.makeScale(e,t,r),this.applyMatrix4(tB),this}lookAt(e){return tV.lookAt(e),tV.updateMatrix(),this.applyMatrix4(tV.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(tG).negate(),this.translate(tG.x,tG.y,tG.z),this}setFromPoints(e){let t=this.getAttribute("position");if(void 0===t){let t=[];for(let r=0,n=e.length;r<n;r++){let n=e[r];t.push(n.x,n.y,n.z||0)}this.setAttribute("position",new tD(t,3))}else{let r=Math.min(e.length,t.count);for(let n=0;n<r;n++){let r=e[n];t.setXYZ(n,r.x,r.y,r.z||0)}e.length>t.count&&D("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new td);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){k("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Q(-1/0,-1/0,-1/0),new Q(Infinity,Infinity,Infinity));return}if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,r=t.length;e<r;e++){let r=t[e];tH.setFromBufferAttribute(r),this.morphTargetsRelative?(tX.addVectors(this.boundingBox.min,tH.min),this.boundingBox.expandByPoint(tX),tX.addVectors(this.boundingBox.max,tH.max),this.boundingBox.expandByPoint(tX)):(this.boundingBox.expandByPoint(tH.min),this.boundingBox.expandByPoint(tH.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&k('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new tz);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){k("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Q,1/0);return}if(e){let r=this.boundingSphere.center;if(tH.setFromBufferAttribute(e),t)for(let e=0,r=t.length;e<r;e++){let r=t[e];tW.setFromBufferAttribute(r),this.morphTargetsRelative?(tX.addVectors(tH.min,tW.min),tH.expandByPoint(tX),tX.addVectors(tH.max,tW.max),tH.expandByPoint(tX)):(tH.expandByPoint(tW.min),tH.expandByPoint(tW.max))}tH.getCenter(r);let n=0;for(let t=0,i=e.count;t<i;t++)tX.fromBufferAttribute(e,t),n=Math.max(n,r.distanceToSquared(tX));if(t)for(let i=0,a=t.length;i<a;i++){let a=t[i],s=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)tX.fromBufferAttribute(a,t),s&&(tG.fromBufferAttribute(e,t),tX.add(tG)),n=Math.max(n,r.distanceToSquared(tX))}this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&k('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(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void k("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");let r=t.position,n=t.normal,i=t.uv,a=this.getAttribute("tangent");(void 0===a||a.count!==r.count)&&(a=new tR(new Float32Array(4*r.count),4),this.setAttribute("tangent",a));let s=[],o=[];for(let e=0;e<r.count;e++)s[e]=new Q,o[e]=new Q;let l=new Q,u=new Q,c=new Q,d=new Z,h=new Z,f=new Z,p=new Q,m=new Q,g=this.groups;0===g.length&&(g=[{start:0,count:e.count}]);for(let t=0,n=g.length;t<n;++t){let n=g[t],a=n.start,v=n.count;for(let t=a,n=a+v;t<n;t+=3)!function(e,t,n){l.fromBufferAttribute(r,e),u.fromBufferAttribute(r,t),c.fromBufferAttribute(r,n),d.fromBufferAttribute(i,e),h.fromBufferAttribute(i,t),f.fromBufferAttribute(i,n),u.sub(l),c.sub(l),h.sub(d),f.sub(d);let a=1/(h.x*f.y-f.x*h.y);isFinite(a)&&(p.copy(u).multiplyScalar(f.y).addScaledVector(c,-h.y).multiplyScalar(a),m.copy(c).multiplyScalar(h.x).addScaledVector(u,-f.x).multiplyScalar(a),s[e].add(p),s[t].add(p),s[n].add(p),o[e].add(m),o[t].add(m),o[n].add(m))}(e.getX(t+0),e.getX(t+1),e.getX(t+2))}let v=new Q,y=new Q,x=new Q,b=new Q;function _(e){x.fromBufferAttribute(n,e),b.copy(x);let t=s[e];v.copy(t),v.sub(x.multiplyScalar(x.dot(t))).normalize(),y.crossVectors(b,t);let r=y.dot(o[e]);a.setXYZW(e,v.x,v.y,v.z,r<0?-1:1)}for(let t=0,r=g.length;t<r;++t){let r=g[t],n=r.start,i=r.count;for(let t=n,r=n+i;t<r;t+=3)_(e.getX(t+0)),_(e.getX(t+1)),_(e.getX(t+2))}this._transformed=!0}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(void 0!==t){let r=this.getAttribute("normal");if(void 0===r||r.count!==t.count)r=new tR(new Float32Array(3*t.count),3),this.setAttribute("normal",r);else for(let e=0,t=r.count;e<t;e++)r.setXYZ(e,0,0,0);let n=new Q,i=new Q,a=new Q,s=new Q,o=new Q,l=new Q,u=new Q,c=new Q;if(e)for(let d=0,h=e.count;d<h;d+=3){let h=e.getX(d+0),f=e.getX(d+1),p=e.getX(d+2);n.fromBufferAttribute(t,h),i.fromBufferAttribute(t,f),a.fromBufferAttribute(t,p),u.subVectors(a,i),c.subVectors(n,i),u.cross(c),s.fromBufferAttribute(r,h),o.fromBufferAttribute(r,f),l.fromBufferAttribute(r,p),s.add(u),o.add(u),l.add(u),r.setXYZ(h,s.x,s.y,s.z),r.setXYZ(f,o.x,o.y,o.z),r.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)n.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),u.subVectors(a,i),c.subVectors(n,i),u.cross(c),r.setXYZ(e+0,u.x,u.y,u.z),r.setXYZ(e+1,u.x,u.y,u.z),r.setXYZ(e+2,u.x,u.y,u.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,r=e.count;t<r;t++)tX.fromBufferAttribute(e,t),tX.normalize(),e.setXYZ(t,tX.x,tX.y,tX.z)}toNonIndexed(){function e(e,t){let r=e.array,n=e.itemSize,i=e.normalized,a=new r.constructor(t.length*n),s=0,o=0;for(let i=0,l=t.length;i<l;i++){s=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*n;for(let e=0;e<n;e++)a[o++]=r[s++]}return new tR(a,n,i)}if(null===this.index)return D("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new tq,r=this.index.array,n=this.attributes;for(let i in n){let a=e(n[i],r);t.setAttribute(i,a)}let i=this.morphAttributes;for(let n in i){let a=[],s=i[n];for(let t=0,n=s.length;t<n;t++){let n=e(s[t],r);a.push(n)}t.morphAttributes[n]=a}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let e=0,r=a.length;e<r;e++){let r=a[e];t.addGroup(r.start,r.count,r.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=void 0!==this.parameters&&!0===this._transformed?"BufferGeometry":this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters&&!0!==this._transformed){let t=this.parameters;for(let r in t)void 0!==t[r]&&(e[r]=t[r]);return e}e.data={attributes:{}};let t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let r=this.attributes;for(let t in r){let n=r[t];e.data.attributes[t]=n.toJSON(e.data)}let n={},i=!1;for(let t in this.morphAttributes){let r=this.morphAttributes[t],a=[];for(let t=0,n=r.length;t<n;t++){let n=r[t];a.push(n.toJSON(e.data))}a.length>0&&(n[t]=a,i=!0)}i&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return null!==s&&(e.data.boundingSphere=s.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 r=e.index;null!==r&&this.setIndex(r.clone());let n=e.attributes;for(let e in n){let r=n[e];this.setAttribute(e,r.clone(t))}let i=e.morphAttributes;for(let e in i){let r=[],n=i[e];for(let e=0,i=n.length;e<i;e++)r.push(n[e].clone(t));this.morphAttributes[e]=r}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 s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());let o=e.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this._transformed=e._transformed,this}dispose(){this.dispatchEvent({type:"dispose"})}}class tY{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRanges=[],this.version=0,this.uuid=W()}onUploadCallback(){}set needsUpdate(e){!0===e&&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,r){e*=this.stride,r*=t.stride;for(let n=0,i=this.stride;n<i;n++)this.array[e+n]=t.array[r+n];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=W()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),r=new this.constructor(t,this.stride);return r.setUsage(this.usage),r}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=W()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(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}}}
1let t$=new Q;class tK{constructor(e,t,r,n=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=r,this.normalized=n}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,r=this.data.count;t<r;t++)t$.fromBufferAttribute(this,t),t$.applyMatrix4(e),this.setXYZ(t,t$.x,t$.y,t$.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)t$.fromBufferAttribute(this,t),t$.applyNormalMatrix(e),this.setXYZ(t,t$.x,t$.y,t$.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)t$.fromBufferAttribute(this,t),t$.transformDirection(e),this.setXYZ(t,t$.x,t$.y,t$.z);return this}getComponent(e,t){let r=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(r=$(r,this.array)),r}setComponent(e,t,r){return this.normalized&&(r=K(r,this.array)),this.data.array[e*this.data.stride+this.offset+t]=r,this}setX(e,t){return this.normalized&&(t=K(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=K(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=K(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=K(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=$(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=$(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=$(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=$(t,this.array)),t}setXY(e,t,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=K(t,this.array),r=K(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this}setXYZ(e,t,r,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=K(t,this.array),r=K(r,this.array),n=K(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=n,this}setXYZW(e,t,r,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=K(t,this.array),r=K(r,this.array),n=K(n,this.array),i=K(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=n,this.data.array[e+3]=i,this}clone(e){if(void 0!==e)return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new tK(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized);{L("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");let e=[];for(let t=0;t<this.count;t++){let r=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[r+t])}return new tR(new this.array.constructor(e),this.itemSize,this.normalized)}}toJSON(e){if(void 0!==e)return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized};{L("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");let e=[];for(let t=0;t<this.count;t++){let r=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[r+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}}}let tZ=0;class tJ extends j{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:tZ++}),this.uuid=W(),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 e2(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=7680,this.stencilZFail=7680,this.stencilZPass=7680,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(void 0!==e)for(let t in e){let r=e[t];if(void 0===r){D(`Material: parameter '${t}' has value of undefined.`);continue}let n=this[t];if(void 0===n){D(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(r):n&&n.isVector2&&r&&r.isVector2||n&&n.isEuler&&r&&r.isEuler||n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[t]=r}}toJSON(e){let t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});let r={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function n(e){let t=[];for(let r in e){let n=e[r];delete n.metadata,t.push(n)}return t}
vendor: 5,648 bytes, line 1
1if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),void 0!==this.sheen&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearcoat&&(r.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(r.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(r.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),void 0!==this.dispersion&&(r.dispersion=this.dispersion),void 0!==this.iridescence&&(r.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(r.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(r.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(r.combine=this.combine)),void 0!==this.envMapRotation&&(r.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(r.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(r.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(r.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(r.size=this.size),null!==this.shadowSide&&(r.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(r.blending=this.blending),0!==this.side&&(r.side=this.side),!0===this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=!0),204!==this.blendSrc&&(r.blendSrc=this.blendSrc),205!==this.blendDst&&(r.blendDst=this.blendDst),100!==this.blendEquation&&(r.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(r.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&
vendor: 4,913 bytes, line 1
1(r.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(r.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(r.depthFunc=this.depthFunc),!1===this.depthTest&&(r.depthTest=this.depthTest),!1===this.depthWrite&&(r.depthWrite=this.depthWrite),!1===this.colorWrite&&(r.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(r.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(r.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(r.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(r.stencilFuncMask=this.stencilFuncMask),7680!==this.stencilFail&&(r.stencilFail=this.stencilFail),7680!==this.stencilZFail&&(r.stencilZFail=this.stencilZFail),7680!==this.stencilZPass&&(r.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(r.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(r.rotation=this.rotation),!0===this.polygonOffset&&(r.polygonOffset=!0),0!==this.polygonOffsetFactor&&(r.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(r.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.alphaHash&&(r.alphaHash=!0),!0===this.alphaToCoverage&&(r.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=!0),!0===this.forceSinglePass&&(r.forceSinglePass=!0),!1===this.allowOverride&&(r.allowOverride=!1),!0===this.wireframe&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(r.flatShading=!0),!1===this.visible&&(r.visible=!1),!1===this.toneMapped&&(r.toneMapped=!1),!1===this.fog&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData),t){let t=n(e.textures),i=n(e.images);t.length>0&&(r.textures=t),i.length>0&&(r.images=i)}return r}fromJSON(e,t){if(void 0!==e.uuid&&(this.uuid=e.uuid),void 0!==e.name&&(this.name=e.name),void 0!==e.color&&void 0!==this.color&&this.color.setHex(e.color),void 0!==e.roughness&&(this.roughness=e.roughness),void 0!==e.metalness&&(this.metalness=e.metalness),void 0!==e.sheen&&(this.sheen=e.sheen),void 0!==e.sheenColor&&(this.sheenColor=new e2().setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(this.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==this.emissive&&this.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==this.specular&&this.specular.setHex(e.specular),void 0!==e.specularIntensity&&(this.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==this.specularColor&&this.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(this.shininess=e.shininess),void 0!==e.clearcoat&&(this.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(this.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(this.dispersion=e.dispersion),void 0!==e.iridescence&&(this.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(this.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(this.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(this.transmission=e.transmission),void 0!==e.thickness&&(this.thickness=e.thickness),void 0!==e.attenuationDistance&&(this.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==this.attenuationColor&&this.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(this.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(this.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(this.fog=e.fog),void 0!==e.flatShading&&(this.flatShading=e.flatShading),void 0!==e.blending&&(this.blending=e.blending),void 0!==e.combine&&(this.combine=e.combine),void 0!==e.side&&(this.side=e.side),void 0!==e.shadowSide&&(this.shadowSide=e.shadowSide),void 0!==e.opacity&&(this.opacity=e.opacity),void 0!==e.transparent&&(this.transparent=e.transparent),void 0!==e.alphaTest&&(this.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(this.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(this.depthFunc=e.depthFunc),void 0!==e.depthTest&&(this.depthTest=e.depthTest),void 0!==e.depthWrite&&(this.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(this.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(this.blendSrc=e.blendSrc),void 0!==e.blendDst&&(this.blendDst=e.blendDst),void 0!==e.blendEquation&&(this.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(this.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&
1(this.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(this.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==this.blendColor&&this.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(this.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(this.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(this.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(this.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(this.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(this.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(this.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(this.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(this.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(this.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(this.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(this.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(this.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(this.rotation=e.rotation),void 0!==e.linewidth&&(this.linewidth=e.linewidth),void 0!==e.dashSize&&(this.dashSize=e.dashSize),void 0!==e.gapSize&&(this.gapSize=e.gapSize),void 0!==e.scale&&(this.scale=e.scale),void 0!==e.polygonOffset&&(this.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(this.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(this.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(this.dithering=e.dithering),void 0!==e.alphaToCoverage&&(this.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(this.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(this.forceSinglePass=e.forceSinglePass),void 0!==e.allowOverride&&(this.allowOverride=e.allowOverride),void 0!==e.visible&&(this.visible=e.visible),void 0!==e.toneMapped&&(this.toneMapped=e.toneMapped),void 0!==e.userData&&(this.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?this.vertexColors=e.vertexColors>0:this.vertexColors=e.vertexColors),void 0!==e.size&&(this.size=e.size),void 0!==e.sizeAttenuation&&(this.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(this.map=t[e.map]||null),void 0!==e.matcap&&(this.matcap=t[e.matcap]||null),void 0!==e.alphaMap&&(this.alphaMap=t[e.alphaMap]||null),void 0!==e.bumpMap&&(this.bumpMap=t[e.bumpMap]||null),void 0!==e.bumpScale&&(this.bumpScale=e.bumpScale),void 0!==e.normalMap&&(this.normalMap=t[e.normalMap]||null),void 0!==e.normalMapType&&(this.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),this.normalScale=new Z().fromArray(t)}return void 0!==e.displacementMap&&(this.displacementMap=t[e.displacementMap]||null),void 0!==e.displacementScale&&(this.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(this.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(this.roughnessMap=t[e.roughnessMap]||null),void 0!==e.metalnessMap&&(this.metalnessMap=t[e.metalnessMap]||null),void 0!==e.emissiveMap&&(this.emissiveMap=t[e.emissiveMap]||null),void 0!==e.emissiveIntensity&&(this.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(this.specularMap=t[e.specularMap]||null),void 0!==e.specularIntensityMap&&(this.specularIntensityMap=t[e.specularIntensityMap]||null),void 0!==e.specularColorMap&&(this.specularColorMap=t[e.specularColorMap]||null),void 0!==e.envMap&&(this.envMap=t[e.envMap]||null),void 0!==e.envMapRotation&&this.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(this.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(this.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(this.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(this.lightMap=t[e.lightMap]||null),void 0!==e.lightMapIntensity&&(this.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(this.aoMap=t[e.aoMap]||null),void 0!==e.aoMapIntensity&&(this.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(this.gradientMap=t[e.gradientMap]||null),void 0!==e.clearcoatMap&&(this.clearcoatMap=t[e.clearcoatMap]||null),void 0!==e.clearcoatRoughnessMap&&(this.clearcoatRoughnessMap=t[e.clearcoatRoughnessMap]||null),void 0!==e.clearcoatNormalMap&&(this.clearcoatNormalMap=t[e.clearcoatNormalMap]||null),void 0!==e.clearcoatNormalScale&&(this.clearcoatNormalScale=new Z().fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(this.iridescenceMap=t[e.iridescenceMap]||null),void 0!==e.iridescenceThicknessMap&&(this.iridescenceThicknessMap=t[e.iridescenceThicknessMap]||null),void 0!==e.transmissionMap&&(this.transmissionMap=t[e.transmissionMap]||null),void 0!==e.thicknessMap&&(this.thicknessMap=t[e.thicknessMap]||null),void 0!==e.anisotropyMap&&(this.anisotropyMap=t[e.anisotropyMap]||null),void 0!==e.sheenColorMap&&(this.sheenColorMap=t[e.sheenColorMap]||null),void 0!==e.sheenRoughnessMap&&(this.sheenRoughnessMap=t[e.sheenRoughnessMap]||null),this}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,r=null;if(null!==t){let e=t.length;r=Array(e);for(let n=0;n!==e;++n)r[n]=t[n].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipSh
1adows,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){!0===e&&this.version++}}class tQ extends tJ{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new e2(0xffffff),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}}let t0=new Q,t1=new Q,t2=new Q,t3=new Z,t4=new Z,t5=new e_,t6=new Q,t8=new Q,t9=new Q,t7=new Z,re=new Z,rt=new Z;class rr extends eY{constructor(e=new tQ){if(super(),this.isSprite=!0,this.type="Sprite",void 0===r){r=new tq;const e=new tY(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);r.setIndex([0,1,2,0,2,3]),r.setAttribute("position",new tK(e,3,0,!1)),r.setAttribute("uv",new tK(e,2,3,!1))}this.geometry=r,this.material=e,this.center=new Z(.5,.5),this.count=1}raycast(e,t){let r,n;null===e.camera&&k('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),t1.setFromMatrixScale(this.matrixWorld),t5.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),t2.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&t1.multiplyScalar(-t2.z);let i=this.material.rotation;0!==i&&(n=Math.cos(i),r=Math.sin(i));let a=this.center;rn(t6.set(-.5,-.5,0),t2,a,t1,r,n),rn(t8.set(.5,-.5,0),t2,a,t1,r,n),rn(t9.set(.5,.5,0),t2,a,t1,r,n),t7.set(0,0),re.set(1,0),rt.set(1,1);let s=e.ray.intersectTriangle(t6,t8,t9,!1,t0);if(null===s&&(rn(t8.set(-.5,.5,0),t2,a,t1,r,n),re.set(0,1),null===(s=e.ray.intersectTriangle(t6,t9,t8,!1,t0))))return;let o=e.ray.origin.distanceTo(t0);o<e.near||o>e.far||t.push({distance:o,point:t0.clone(),uv:tc.getInterpolation(t0,t6,t8,t9,t7,re,rt,new Z),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function rn(e,t,r,n,i,a){t3.subVectors(e,r).addScalar(.5).multiply(n),void 0!==i?(t4.x=a*t3.x-i*t3.y,t4.y=i*t3.x+a*t3.y):t4.copy(t3),e.copy(t),e.x+=t4.x,e.y+=t4.y,e.applyMatrix4(t5)}let ri=new Q,ra=new Q;class rs extends eY{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,r=t.length;e<r;e++){let r=t[e];this.addLevel(r.object.clone(),r.distance,r.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,r=0){let n;t=Math.abs(t);let i=this.levels;for(n=0;n<i.length&&!(t<i[n].distance);n++);return i.splice(n,0,{distance:t,hysteresis:r,object:e}),this.add(e),this}removeLevel(e){let t=this.levels;for(let r=0;r<t.length;r++)if(t[r].distance===e){let e=t.splice(r,1);return this.remove(e[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){let t=this.levels;if(t.length>0){let r,n;for(r=1,n=t.length;r<n;r++){let n=t[r].distance;if(t[r].object.visible&&(n-=n*t[r].hysteresis),e<n)break}return t[r-1].object}return null}raycast(e,t){if(this.levels.length>0){ri.setFromMatrixPosition(this.matrixWorld);let r=e.ray.origin.distanceTo(ri);this.getObjectForDistance(r).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){let r,n;ri.setFromMatrixPosition(e.matrixWorld),ra.setFromMatrixPosition(this.matrixWorld);let i=ri.distanceTo(ra)/e.zoom;for(t[0].object.visible=!0,r=1,n=t.length;r<n;r++){let e=t[r].distance;if(t[r].object.visible&&(e-=e*t[r].hysteresis),i>=e)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r<n;r++)t[r].object.visible=!1}}toJSON(e){let t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];let r=this.levels;for(let e=0,n=r.length;e<n;e++){let n=r[e];t.object.levels.push({object:n.object.uuid,distance:n.distance,hysteresis:n.hysteresis})}return t}}
1let ro=new Q,rl=new Q,ru=new Q,rc=new Q,rd=new Q,rh=new Q,rf=new Q;class rp{constructor(e=new Q,t=new Q(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,ro)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ro.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ro.copy(this.origin).addScaledVector(this.direction,t),ro.distanceToSquared(e))}distanceSqToSegment(e,t,r,n){let i,a,s,o;rl.copy(e).add(t).multiplyScalar(.5),ru.copy(t).sub(e).normalize(),rc.copy(this.origin).sub(rl);let l=.5*e.distanceTo(t),u=-this.direction.dot(ru),c=rc.dot(this.direction),d=-rc.dot(ru),h=rc.lengthSq(),f=Math.abs(1-u*u);if(f>0)if(i=u*d-c,a=u*c-d,o=l*f,i>=0)if(a>=-o)if(a<=o){let e=1/f;i*=e,a*=e,s=i*(i+u*a+2*c)+a*(u*i+a+2*d)+h}else s=-(i=Math.max(0,-(u*(a=l)+c)))*i+a*(a+2*d)+h;else s=-(i=Math.max(0,-(u*(a=-l)+c)))*i+a*(a+2*d)+h;else a<=-o?(a=(i=Math.max(0,-(-u*l+c)))>0?-l:Math.min(Math.max(-l,-d),l),s=-i*i+a*(a+2*d)+h):a<=o?(i=0,s=(a=Math.min(Math.max(-l,-d),l))*(a+2*d)+h):(a=(i=Math.max(0,-(u*l+c)))>0?l:Math.min(Math.max(-l,-d),l),s=-i*i+a*(a+2*d)+h);else a=u>0?-l:l,s=-(i=Math.max(0,-(u*a+c)))*i+a*(a+2*d)+h;return r&&r.copy(this.origin).addScaledVector(this.direction,i),n&&n.copy(rl).addScaledVector(ru,a),s}intersectSphere(e,t){ro.subVectors(e.center,this.origin);let r=ro.dot(this.direction),n=ro.dot(ro)-r*r,i=e.radius*e.radius;if(n>i)return null;let a=Math.sqrt(i-n),s=r-a,o=r+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return!(e.radius<0)&&this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;let r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null}intersectPlane(e,t){let r=this.distanceToPlane(e);return null===r?null:this.at(r,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return!!(0===t||e.normal.dot(this.direction)*t<0)}intersectBox(e,t){let r,n,i,a,s,o,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,d=this.origin;return(l>=0?(r=(e.min.x-d.x)*l,n=(e.max.x-d.x)*l):(r=(e.max.x-d.x)*l,n=(e.min.x-d.x)*l),u>=0?(i=(e.min.y-d.y)*u,a=(e.max.y-d.y)*u):(i=(e.max.y-d.y)*u,a=(e.min.y-d.y)*u),r>a||i>n||((i>r||isNaN(r))&&(r=i),(a<n||isNaN(n))&&(n=a),c>=0?(s=(e.min.z-d.z)*c,o=(e.max.z-d.z)*c):(s=(e.max.z-d.z)*c,o=(e.min.z-d.z)*c),r>o||s>n||((s>r||r!=r)&&(r=s),(o<n||n!=n)&&(n=o),n<0)))?null:this.at(r>=0?r:n,t)}intersectsBox(e){return null!==this.intersectBox(e,ro)}intersectTriangle(e,t,r,n,i){let a;rd.subVectors(t,e),rh.subVectors(r,e),rf.crossVectors(rd,rh);let s=this.direction.dot(rf);if(s>0){if(n)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}rc.subVectors(this.origin,e);let o=a*this.direction.dot(rh.crossVectors(rc,rh));if(o<0)return null;let l=a*this.direction.dot(rd.cross(rc));if(l<0||o+l>s)return null;let u=-a*rc.dot(rf);return u<0?null:this.at(u/s,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)}}class rm extends tJ{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new e2(0xffffff),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 eO,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}}let rg=new e_,rv=new rp,ry=new tz,rx=new Q,rb=new Q,r_=new Q,rS=new Q,rw=new Q,rM=new Q,rT=new Q,rE=new Q;class rA extends eY{constructor(e=new tq,t=new rm){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),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(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 r=e[t[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=r.length;e<t;e++){let t=r[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){let r=this.geometry,n=r.attributes.position,i=r.morphAttributes.position,a=r.morphTargetsRelative;t.fromBufferAttribute(n,e);let s=this.morphTargetInfluences;if(i&&s){rM.set(0,0,0);for(let r=0,n=i.length;r<n;r++){let n=s[r],o=i[r];0!==n&&(rw.fromBufferAttribute(o,e),a?rM.addScaledVector(rw,n):rM.addScaledVector(rw.sub(t),n))}t.add(rM)}return t}raycast(e,t){let r=this.geometry,n=this.material,i=this.matrixWorld;void 0===n||(null===r.boundingSphere&&r.computeBoundingSphere(),ry.copy(r.boun
1dingSphere),ry.applyMatrix4(i),rv.copy(e.ray).recast(e.near),!1===ry.containsPoint(rv.origin)&&(null===rv.intersectSphere(ry,rx)||rv.origin.distanceToSquared(rx)>(e.far-e.near)**2)||(rg.copy(i).invert(),rv.copy(e.ray).applyMatrix4(rg),(null===r.boundingBox||!1!==rv.intersectsBox(r.boundingBox))&&this._computeIntersections(e,t,rv)))}_computeIntersections(e,t,r){let n,i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,u=i.attributes.uv1,c=i.attributes.normal,d=i.groups,h=i.drawRange;if(null!==s)if(Array.isArray(a))for(let i=0,o=d.length;i<o;i++){let o=d[i],f=a[o.materialIndex],p=Math.max(o.start,h.start),m=Math.min(s.count,Math.min(o.start+o.count,h.start+h.count));for(let i=p;i<m;i+=3)(n=rC(this,f,e,r,l,u,c,s.getX(i),s.getX(i+1),s.getX(i+2)))&&(n.faceIndex=Math.floor(i/3),n.face.materialIndex=o.materialIndex,t.push(n))}else{let i=Math.max(0,h.start),o=Math.min(s.count,h.start+h.count);for(let d=i;d<o;d+=3)(n=rC(this,a,e,r,l,u,c,s.getX(d),s.getX(d+1),s.getX(d+2)))&&(n.faceIndex=Math.floor(d/3),t.push(n))}else if(void 0!==o)if(Array.isArray(a))for(let i=0,s=d.length;i<s;i++){let s=d[i],f=a[s.materialIndex],p=Math.max(s.start,h.start),m=Math.min(o.count,Math.min(s.start+s.count,h.start+h.count));for(let i=p;i<m;i+=3)(n=rC(this,f,e,r,l,u,c,i,i+1,i+2))&&(n.faceIndex=Math.floor(i/3),n.face.materialIndex=s.materialIndex,t.push(n))}else{let i=Math.max(0,h.start),s=Math.min(o.count,h.start+h.count);for(let o=i;o<s;o+=3)(n=rC(this,a,e,r,l,u,c,o,o+1,o+2))&&(n.faceIndex=Math.floor(o/3),t.push(n))}}}function rC(e,t,r,n,i,a,s,o,l,u){e.getVertexPosition(o,rb),e.getVertexPosition(l,r_),e.getVertexPosition(u,rS);let c=function(e,t,r,n,i,a,s,o){if(null===(1===t.side?n.intersectTriangle(s,a,i,!0,o):n.intersectTriangle(i,a,s,0===t.side,o)))return null;rE.copy(o),rE.applyMatrix4(e.matrixWorld);let l=r.ray.origin.distanceTo(rE);return l<r.near||l>r.far?null:{distance:l,point:rE.clone(),object:e}}(e,t,r,n,rb,r_,rS,rT);if(c){let e=new Q;tc.getBarycoord(rT,rb,r_,rS,e),i&&(c.uv=tc.getInterpolatedAttribute(i,o,l,u,e,new Z)),a&&(c.uv1=tc.getInterpolatedAttribute(a,o,l,u,e,new Z)),s&&(c.normal=tc.getInterpolatedAttribute(s,o,l,u,e,new Q),c.normal.dot(n.direction)>0&&c.normal.multiplyScalar(-1));let t={a:o,b:l,c:u,normal:new Q,materialIndex:0};tc.getNormal(rb,r_,rS,t.normal),c.face=t,c.barycoord=e}return c}let rP=new eg,rI=new eg,rO=new eg,rR=new eg,rL=new e_,rN=new Q,rD=new tz,rk=new e_,rU=new rp;class rF extends rA{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=x,this.bindMatrix=new e_,this.bindMatrixInverse=new e_,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){let e=this.geometry;null===this.boundingBox&&(this.boundingBox=new td),this.boundingBox.makeEmpty();let t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,rN),this.boundingBox.expandByPoint(rN)}computeBoundingSphere(){let e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new tz),this.boundingSphere.makeEmpty();let t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,rN),this.boundingSphere.expandByPoint(rN)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){let r=this.material,n=this.matrixWorld;void 0===r||(null===this.boundingSphere&&this.computeBoundingSphere(),rD.copy(this.boundingSphere),rD.applyMatrix4(n),!1===e.ray.intersectsSphere(rD)||(rk.copy(n).invert(),rU.copy(e.ray).applyMatrix4(rk),(null===this.boundingBox||!1!==rU.intersectsBox(this.boundingBox))&&this._computeIntersections(e,t,rU)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let e=new eg,t=this.geometry.attributes.skinWeight;for(let r=0,n=t.count;r<n;r++){e.fromBufferAttribute(t,r);let n=1/e.manhattanLength();n!==1/0?e.multiplyScalar(n):e.set(1,0,0,0),t.setXYZW(r,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===x?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===b?this.bindMatrixInverse.copy(this.bindMatrix).invert():D("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}
1applyBoneTransform(e,t){let r=this.skeleton,n=this.geometry;rI.fromBufferAttribute(n.attributes.skinIndex,e),rO.fromBufferAttribute(n.attributes.skinWeight,e),t.isVector4?(rP.copy(t),t.set(0,0,0,0)):(rP.set(...t,1),t.set(0,0,0)),rP.applyMatrix4(this.bindMatrix);for(let e=0;e<4;e++){let n=rO.getComponent(e);if(0!==n){let i=rI.getComponent(e);rL.multiplyMatrices(r.bones[i].matrixWorld,r.boneInverses[i]),t.addScaledVector(rR.copy(rP).applyMatrix4(rL),n)}}return t.isVector4&&(t.w=rP.w),t.applyMatrix4(this.bindMatrixInverse)}}class rz extends eY{constructor(){super(),this.isBone=!0,this.type="Bone"}}class rj extends em{constructor(e=null,t=1,r=1,n,i,a,s,o,l=1003,u=1003,c,d){super(null,a,s,o,l,u,n,i,c,d),this.isDataTexture=!0,this.image={data:e,width:t,height:r},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}let rB=new e_,rV=new e_;class rG{constructor(e=[],t=[]){this.uuid=W(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){let e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){D("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new e_)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){let t=new e_;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){let t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){let t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){let e=this.bones,t=this.boneInverses,r=this.boneMatrices,n=this.boneTexture;for(let n=0,i=e.length;n<i;n++){let i=e[n]?e[n].matrixWorld:rV;rB.multiplyMatrices(i,t[n]),rB.toArray(r,16*n)}null!==n&&(n.needsUpdate=!0)}clone(){return new rG(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length),t=new Float32Array((e=Math.max(e=4*Math.ceil(e/4),4))*e*4);t.set(this.boneMatrices);let r=new rj(t,e,e,1023,1015);return r.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=r,this}getBoneByName(e){for(let t=0,r=this.bones.length;t<r;t++){let r=this.bones[t];if(r.name===e)return r}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let r=0,n=e.bones.length;r<n;r++){let n=e.bones[r],i=t[n];void 0===i&&(D("Skeleton: No bone found with UUID:",n),i=new rz),this.bones.push(i),this.boneInverses.push(new e_().fromArray(e.boneInverses[r]))}return this.init(),this}toJSON(){let e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;let t=this.bones,r=this.boneInverses;for(let n=0,i=t.length;n<i;n++){let i=t[n];e.bones.push(i.uuid);let a=r[n];e.boneInverses.push(a.toArray())}return e}}class rH extends tR{constructor(e,t,r,n=1){super(e,t,r),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}let rW=new e_,rX=new e_,rq=[],rY=new td,r$=new e_,rK=new rA,rZ=new tz;class rJ extends rA{constructor(e,t,r){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new rH(new Float32Array(16*r),16),this.instanceColor=null,this.morphTexture=null,this.count=r,this.boundingBox=null,this.boundingSphere=null;for(let e=0;e<r;e++)this.setMatrixAt(e,r$)}computeBoundingBox(){let e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new td),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let r=0;r<t;r++)this.getMatrixAt(r,rW),rY.copy(e.boundingBox).applyMatrix4(rW),this.boundingBox.union(rY)}computeBoundingSphere(){let e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new tz),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let r=0;r<t;r++)this.getMatrixAt(r,rW),rZ.copy(e.boundingSphere).applyMatrix4(rW),this.boundingSphere.union(rZ)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.morphTexture&&(this.morphTexture=e.morphTexture.clone()),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,null!==e.boundingBox&&
1(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return null===this.instanceColor?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,16*e)}getMorphAt(e,t){let r=t.morphTargetInfluences,n=this.morphTexture.source.data.data,i=e*(r.length+1)+1;for(let e=0;e<r.length;e++)r[e]=n[i+e]}raycast(e,t){let r=this.matrixWorld,n=this.count;if((rK.geometry=this.geometry,rK.material=this.material,void 0!==rK.material)&&(null===this.boundingSphere&&this.computeBoundingSphere(),rZ.copy(this.boundingSphere),rZ.applyMatrix4(r),!1!==e.ray.intersectsSphere(rZ)))for(let i=0;i<n;i++){this.getMatrixAt(i,rW),rX.multiplyMatrices(r,rW),rK.matrixWorld=rX,rK.raycast(e,rq);for(let e=0,r=rq.length;e<r;e++){let r=rq[e];r.instanceId=i,r.object=this,t.push(r)}rq.length=0}}setColorAt(e,t){return null===this.instanceColor&&(this.instanceColor=new rH(new Float32Array(3*this.instanceMatrix.count).fill(1),3)),t.toArray(this.instanceColor.array,3*e),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,16*e),this}setMorphAt(e,t){let r=t.morphTargetInfluences,n=r.length+1;null===this.morphTexture&&(this.morphTexture=new rj(new Float32Array(n*this.count),n,this.count,1028,1015));let i=this.morphTexture.source.data.data,a=0;for(let e=0;e<r.length;e++)a+=r[e];let s=this.geometry.morphTargetsRelative?1:1-a,o=n*e;return i[o]=s,i.set(r,o+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),null!==this.morphTexture&&(this.morphTexture.dispose(),this.morphTexture=null)}}let rQ=new Q,r0=new Q,r1=new er;class r2{constructor(e=new Q(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,r,n){return this.normal.set(e,t,r),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,r){let n=rQ.subVectors(r,t).cross(r0.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,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,r=!0){let n=e.delta(rQ),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;let a=-(e.start.dot(this.normal)+this.constant)/i;return!0===r&&(a<0||a>1)?null:t.copy(e.start).addScaledVector(n,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return t<0&&r>0||r<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 r=t||r1.getNormalMatrix(e),n=this.coplanarPoint(rQ).applyMatrix4(e),i=this.normal.applyMatrix3(r).normalize();return this.constant=-n.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)}}let r3=new tz,r4=new Z(.5,.5),r5=new Q;class r6{constructor(e=new r2,t=new r2,r=new r2,n=new r2,i=new r2,a=new r2){this.planes=[e,t,r,n,i,a]}set(e,t,r,n,i,a){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(r),s[3].copy(n),s[4].copy(i),s[5].copy(a),this}copy(e){let t=this.planes;for(let r=0;r<6;r++)t[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,t=2e3,r=!1){let n=this.planes,i=e.elements,a=i[0],s=i[1],o=i[2],l=i[3],u=i[4],c=i[5],d=i[6],h=i[7],f=i[8],p=i[9],m=i[10],g=i[11],v=i[12],y=i[13],x=i[14],b=i[15];if(n[0].setComponents(l-a,h-u,g-f,b-v).normalize(),n[1].setComponents(l+a,h+u,g+f,b+v).normalize(),n[2].setComponents(l+s,h+c,g+p,b+y).normalize(),n[3].setComponents(l-s,h-c,g-p,b-y).normalize(),r)n[4].setComponents(o,d,m,x).normalize(),n[5].setComponents(l-o,h-d,g-m,b-x).normalize();else if(n[4].setComponents(l-o,h-d,g-m,b-x).normalize(),2e3===t)n[5].setComponents(l+o,h+d,g+m,b+x).normalize();else if(2001===t)n[5].setComponents(o,d,m,x).normalize();else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),r3.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),r3.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(r3)}intersectsSprite(e){return r3.center.set(0,0,0),r3.radius=.7071067811865476+r4.distanceTo(e.center),r3.applyMatrix4(e.matrixWorld),this.intersectsSphere(r3)}intersectsSphere(e){let t=this.planes,r=e.center,n=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(r)<n)return!1;return!0}intersectsBox(e){let t=this.planes;for(let r=0;r<6;r++){let n=t[r];
1if(r5.x=n.normal.x>0?e.max.x:e.min.x,r5.y=n.normal.y>0?e.max.y:e.min.y,r5.z=n.normal.z>0?e.max.z:e.min.z,0>n.distanceToPoint(r5))return!1}return!0}containsPoint(e){let t=this.planes;for(let r=0;r<6;r++)if(0>t[r].distanceToPoint(e))return!1;return!0}clone(){return new this.constructor().copy(this)}}let r8=new e_;class r9{constructor(){this.coordinateSystem=2e3,this._frustums=[],this._count=0}setFromArrayCamera(e){let t=e.cameras,r=this._frustums;for(let e=0;e<t.length;e++){let n=t[e];r8.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),void 0===r[e]&&(r[e]=new r6),r[e].setFromProjectionMatrix(r8,n.coordinateSystem,n.reversedDepth)}return this._count=t.length,this}intersectsObject(e){let t=this._frustums;for(let r=0;r<this._count;r++)if(t[r].intersectsObject(e))return!0;return!1}intersectsSprite(e){let t=this._frustums;for(let r=0;r<this._count;r++)if(t[r].intersectsSprite(e))return!0;return!1}intersectsSphere(e){let t=this._frustums;for(let r=0;r<this._count;r++)if(t[r].intersectsSphere(e))return!0;return!1}intersectsBox(e){let t=this._frustums;for(let r=0;r<this._count;r++)if(t[r].intersectsBox(e))return!0;return!1}containsPoint(e){let t=this._frustums;for(let r=0;r<this._count;r++)if(t[r].containsPoint(e))return!0;return!1}copy(e){this.coordinateSystem=e.coordinateSystem;let t=this._frustums,r=e._frustums;for(let n=0;n<e._count;n++)void 0===t[n]&&(t[n]=new r6),t[n].copy(r[n]);return this._count=e._count,this}clone(){return new r9().copy(this)}}function r7(e,t){return e-t}function ne(e,t){return e.z-t.z}function nt(e,t){return t.z-e.z}let nr=new e_,nn=new e2(1,1,1),ni=new r6,na=new r9,ns=new td,no=new tz,nl=new Q,nu=new Q,nc=new Q,nd=new class{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,r,n){let i=this.pool,a=this.list;this.index>=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});let s=i[this.index];a.push(s),this.index++,s.start=e,s.count=t,s.z=r,s.index=n}reset(){this.list.length=0,this.index=0}},nh=new rA,nf=[];function np(e,t){if(e.constructor!==t.constructor){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)t[n]=e[n]}else{let r=Math.min(e.length,t.length);t.set(new e.constructor(e.buffer,0,r))}}class nm extends rA{constructor(e,t,r=2*t,n){super(new tq,n),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=r,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(4*this._maxInstanceCount),t=new rj(new Float32Array((e=Math.max(e=4*Math.ceil(e/4),4))*e*4),e,e,1023,1015);this._matricesTexture=t}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount),t=new rj(new Uint32Array((e=Math.ceil(e))*e),e,e,1029,1014);this._indirectTexture=t}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount),t=new rj(new Float32Array((e=Math.ceil(e))*e*4).fill(1),e,e,1023,1015);t.colorSpace=es.workingColorSpace,this._colorsTexture=t}_initializeGeometry(e){let t=this.geometry,r=this._maxVertexCount,n=this._maxIndexCount;if(!1===this._geometryInitialized){for(let n in e.attributes){let{array:i,itemSize:a,normalized:s}=e.getAttribute(n),o=new tR(new i.constructor(r*a),a,s);t.setAttribute(n,o)}if(null!==e.getIndex()){let e=r>65535?new Uint32Array(n):new Uint16Array(n);t.setIndex(new tR(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){let t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw Error('THREE.BatchedMesh: All geometries must consistently have "index".');
1for(let r in t.attributes){if(!e.hasAttribute(r))throw Error(`THREE.BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);let n=e.getAttribute(r),i=t.getAttribute(r);if(n.itemSize!==i.itemSize||n.normalized!==i.normalized)throw Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){let t=this._instanceInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){let t=this._geometryInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new td);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let r=0,n=t.length;r<n;r++){if(!1===t[r].active)continue;let n=t[r].geometryIndex;this.getMatrixAt(r,nr),this.getBoundingBoxAt(n,ns).applyMatrix4(nr),e.union(ns)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new tz);let e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let r=0,n=t.length;r<n;r++){if(!1===t[r].active)continue;let n=t[r].geometryIndex;this.getMatrixAt(r,nr),this.getBoundingSphereAt(n,no).applyMatrix4(nr),e.union(no)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw Error("THREE.BatchedMesh: Maximum item count reached.");let t={visible:!0,active:!0,geometryIndex:e},r=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(r7),r=this._availableInstanceIds.shift(),this._instanceInfo[r]=t):(r=this._instanceInfo.length,this._instanceInfo.push(t));let n=this._matricesTexture;nr.identity().toArray(n.image.data,16*r),n.needsUpdate=!0;let i=this._colorsTexture;return i&&(nn.toArray(i.image.data,4*r),i.needsUpdate=!0),this._visibilityChanged=!0,r}addGeometry(e,t=-1,r=-1){let n;this._initializeGeometry(e),this._validateGeometry(e);let i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},a=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=-1===t?e.getAttribute("position").count:t;let s=e.getIndex();if(null!==s&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=-1===r?s.count:r),-1!==i.indexStart&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(r7),a[n=this._availableGeometryIds.shift()]=i):(n=this._geometryCount,this._geometryCount++,a.push(i)),this.setGeometryAt(n,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,n}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);let r=this.geometry,n=null!==r.getIndex(),i=r.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(n&&a.count>s.reservedIndexCount||t.attributes.position.count>s.reservedVertexCount)throw Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");let o=s.vertexStart,l=s.reservedVertexCount;for(let e in s.vertexCount=t.getAttribute("position").count,r.attributes){let n=t.getAttribute(e),i=r.getAttribute(e);!function(e,t,r=0){let n=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){let i=e.count;for(let a=0;a<i;a++)for(let i=0;i<n;i++)t.setComponent(a+r,i,e.getComponent(a,i))}else t.array.set(e.array,r*n);t.needsUpdate=!0}(n,i,o);let a=n.itemSize;for(let e=n.count;e<l;e++){let t=o+e;for(let e=0;e<a;e++)i.setComponent(t,e,0)}i.needsUpdate=!0,i.addUpdateRange(o*a,l*a)}if(n){let e=s.indexStart,r=s.reservedIndexCount;s.indexCount=t.getIndex().count;for(let t=0;t<a.count;t++)i.setX(e+t,o+a.getX(t));for(let t=a.count;t<r;t++)i.setX(e+t,o);i.needsUpdate=!0,i.addUpdateRange(e,s.reservedIndexCount)}return s.start=n?s.indexStart:s.vertexStart,s.count=n?s.indexCount:s.vertexCount,s.boundingBox=null,null!==t.boundingBox&&
1(s.boundingBox=t.boundingBox.clone()),s.boundingSphere=null,null!==t.boundingSphere&&(s.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){let t=this._geometryInfo;if(e>=t.length||!1===t[e].active)return this;let r=this._instanceInfo;for(let t=0,n=r.length;t<n;t++)r[t].active&&r[t].geometryIndex===e&&this.deleteInstance(t);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0,r=this._geometryInfo,n=r.map((e,t)=>t).sort((e,t)=>r[e].vertexStart-r[t].vertexStart),i=this.geometry;for(let a=0,s=r.length;a<s;a++){let s=r[n[a]];if(!1!==s.active){if(null!==i.index){if(s.indexStart!==t){let{indexStart:r,vertexStart:n,reservedIndexCount:a}=s,o=i.index,l=o.array,u=e-n;for(let e=r;e<r+a;e++)l[e]=l[e]+u;o.array.copyWithin(t,r,r+a),o.addUpdateRange(t,a),o.needsUpdate=!0,s.indexStart=t}t+=s.reservedIndexCount}if(s.vertexStart!==e){let{vertexStart:t,reservedVertexCount:r}=s,n=i.attributes;for(let i in n){let a=n[i],{array:s,itemSize:o}=a;s.copyWithin(e*o,t*o,(t+r)*o),a.addUpdateRange(e*o,r*o),a.needsUpdate=!0}s.vertexStart=e}e+=s.reservedVertexCount,s.start=i.index?s.indexStart:s.vertexStart}}return this._nextIndexStart=t,this._nextVertexStart=e,this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let r=this.geometry,n=this._geometryInfo[e];if(null===n.boundingBox){let e=new td,t=r.index,i=r.attributes.position;for(let r=n.start,a=n.start+n.count;r<a;r++){let n=r;t&&(n=t.getX(n)),e.expandByPoint(nl.fromBufferAttribute(i,n))}n.boundingBox=e}return t.copy(n.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;let r=this.geometry,n=this._geometryInfo[e];if(null===n.boundingSphere){let t=new tz;this.getBoundingBoxAt(e,ns),ns.getCenter(t.center);let i=r.index,a=r.attributes.position,s=0;for(let e=n.start,r=n.start+n.count;e<r;e++){let r=e;i&&(r=i.getX(r)),nl.fromBufferAttribute(a,r),s=Math.max(s,t.center.distanceToSquared(nl))}t.radius=Math.sqrt(s),n.boundingSphere=t}return t.copy(n.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);let r=this._matricesTexture,n=this._matricesTexture.image.data;return t.toArray(n,16*e),r.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,16*e)}setColorAt(e,t){return this.validateInstanceId(e),null===this._colorsTexture&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,4*e),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return(this.validateInstanceId(e),null!==this._colorsTexture)?t.fromArray(this._colorsTexture.image.data,4*e):t.isVector4?t.set(1,1,1,1):t.setRGB(1,1,1)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t||(this._instanceInfo[e].visible=t,this._visibilityChanged=!0),this}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);let r=this._geometryInfo[e];return t.vertexStart=r.vertexStart,t.vertexCount=r.vertexCount,t.reservedVertexCount=r.reservedVertexCount,t.indexStart=r.indexStart,t.indexCount=r.indexCount,t.reservedIndexCount=r.reservedIndexCount,t.start=r.start,t.count=r.count,t}setInstanceCount(e){let t=this._availableInstanceIds,r=this._instanceInfo;for(t.sort(r7);t[t.length-1]===r.length-1;)r.pop(),t.pop();if(e<r.length)throw Error(`THREE.BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);let n=new Int32Array(e),i=new Int32Array(e);np(this._multiDrawCounts,n),np(this._multiDrawStarts,i),this._multiDrawCounts=n,this._multiDrawStarts=i,this._maxInstanceCount=e;let a=this._indirectTexture,s=this._matricesTexture,o=this._colorsTexture;a.dispose(),this._initIndirectTexture(),np(a.image.data,this._indirectTexture.image.data),s.dispose(),this._initMatricesTexture(),np(s.image.data,this._matricesTexture.image.data),o&&(o.dispose(),this._initColorsTexture(),np(o.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){let r=[...this._geometryInfo].filter(e=>e.active);if(Math.max(...r.map(e=>e.vertexStart+e.reservedVertexCount))>e)throw Error(`THREE.BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...r.map(e=>e.indexStart+e.reservedIndexCount))>t)throw Error(`THREE.BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);let n=this.geometry;n.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new tq,this._initializeGeometry(n));let i=this.geometry;for(let e in n.index&&np(n.index.array,i.index.array),n.attributes)np(n.attributes[e].array,i.attributes[e].array)}raycast(e,t){let r=this._instanceInfo,n=this._geometryInfo,i=this.matrixWorld,a=this.geometry;nh.material=this.material,nh.geometry.index=a.index,nh.geometry.attributes=a.attributes,null===nh.geometry.boundingBox&&
1(nh.geometry.boundingBox=new td),null===nh.geometry.boundingSphere&&(nh.geometry.boundingSphere=new tz);for(let a=0,s=r.length;a<s;a++){if(!r[a].visible||!r[a].active)continue;let s=r[a].geometryIndex,o=n[s];nh.geometry.setDrawRange(o.start,o.count),this.getMatrixAt(a,nh.matrixWorld).premultiply(i),this.getBoundingBoxAt(s,nh.geometry.boundingBox),this.getBoundingSphereAt(s,nh.geometry.boundingSphere),nh.raycast(e,nf);for(let e=0,r=nf.length;e<r;e++){let r=nf[e];r.object=this,r.batchId=a,t.push(r)}nf.length=0}nh.material=null,nh.geometry.index=null,nh.geometry.attributes={},nh.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=null!==e.boundingBox?e.boundingBox.clone():null,this.boundingSphere=null!==e.boundingSphere?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(e=>({...e,boundingBox:null!==e.boundingBox?e.boundingBox.clone():null,boundingSphere:null!==e.boundingSphere?e.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),null!==this._colorsTexture&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,r,n,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=n.getIndex(),s=null===a?1:a.array.BYTES_PER_ELEMENT,o=1;i.wireframe&&(o=2,s=n.attributes.position.count>65535?4:2);let l=this._instanceInfo,u=this._multiDrawStarts,c=this._multiDrawCounts,d=this._geometryInfo,h=this.perObjectFrustumCulled,f=this._indirectTexture,p=f.image.data,m=r.isArrayCamera?na:ni;h&&(r.isArrayCamera?m.setFromArrayCamera(r):(nr.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),m.setFromProjectionMatrix(nr,r.coordinateSystem,r.reversedDepth)));let g=0;if(this.sortObjects){nr.copy(this.matrixWorld).invert(),nl.setFromMatrixPosition(r.matrixWorld).applyMatrix4(nr),nu.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(nr);for(let e=0,t=l.length;e<t;e++)if(l[e].visible&&l[e].active){let t=l[e].geometryIndex;this.getMatrixAt(e,nr),this.getBoundingSphereAt(t,no).applyMatrix4(nr);let r=!1;if(h&&(r=!m.intersectsSphere(no)),!r){let r=d[t],n=nc.subVectors(no.center,nl).dot(nu);nd.push(r.start,r.count,n,e)}}let e=nd.list,t=this.customSort;null===t?e.sort(i.transparent?nt:ne):t.call(this,e,r);for(let t=0,r=e.length;t<r;t++){let r=e[t];u[g]=r.start*s*o,c[g]=r.count*o,p[g]=r.index,g++}nd.reset()}else for(let e=0,t=l.length;e<t;e++)if(l[e].visible&&l[e].active){let t=l[e].geometryIndex,r=!1;if(h&&(this.getMatrixAt(e,nr),this.getBoundingSphereAt(t,no).applyMatrix4(nr),r=!m.intersectsSphere(no)),!r){let r=d[t];u[g]=r.start*s*o,c[g]=r.count*o,p[g]=e,g++}}f.needsUpdate=!0,this._multiDrawCount=g,this._visibilityChanged=!1}onBeforeShadow(e,t,r,n,i,a){this.onBeforeRender(e,null,n,i,a)}}class ng extends tJ{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new e2(0xffffff),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}let nv=new Q,ny=new Q,nx=new e_,nb=new rp,n_=new tz,nS=new Q,nw=new Q;class nM extends eY{constructor(e=new tq,t=new ng){super(),this.isLine=!0,this.type="Line",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}computeLineDistances(){let e=this.geometry;if(null===e.index){let t=e.attributes.position,r=[0];for(let e=1,n=t.count;e<n;e++)nv.fromBufferAttribute(t,e-1),ny.fromBufferAttribute(t,e),r[e]=r[e-1],r[e]+=nv.distanceTo(ny);e.setAttribute("lineDistance",new tD(r,1))}else D("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){let r=this.geometry,n=this.matrixWorld,i=e.params.Line.threshold,a=r.drawRange;if(null===r.boundingSphere&&r.computeBoundingSphere(),n_.copy(r.boun
1dingSphere),n_.applyMatrix4(n),n_.radius+=i,!1===e.ray.intersectsSphere(n_))return;nx.copy(n).invert(),nb.copy(e.ray).applyMatrix4(nx);let s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=this.isLineSegments?2:1,u=r.index,c=r.attributes.position;if(null!==u){let r=Math.max(0,a.start),n=Math.min(u.count,a.start+a.count);for(let i=r,a=n-1;i<a;i+=l){let r=nT(this,e,nb,o,u.getX(i),u.getX(i+1),i);r&&t.push(r)}if(this.isLineLoop){let i=nT(this,e,nb,o,u.getX(n-1),u.getX(r),n-1);i&&t.push(i)}}else{let r=Math.max(0,a.start),n=Math.min(c.count,a.start+a.count);for(let i=r,a=n-1;i<a;i+=l){let r=nT(this,e,nb,o,i,i+1,i);r&&t.push(r)}if(this.isLineLoop){let i=nT(this,e,nb,o,n-1,r,n-1);i&&t.push(i)}}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let r=e[t[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=r.length;e<t;e++){let t=r[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function nT(e,t,r,n,i,a,s){let o=e.geometry.attributes.position;if(nv.fromBufferAttribute(o,i),ny.fromBufferAttribute(o,a),r.distanceSqToSegment(nv,ny,nS,nw)>n)return;nS.applyMatrix4(e.matrixWorld);let l=t.ray.origin.distanceTo(nS);if(!(l<t.near)&&!(l>t.far))return{distance:l,point:nw.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}let nE=new Q,nA=new Q;class nC extends nM{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(null===e.index){let t=e.attributes.position,r=[];for(let e=0,n=t.count;e<n;e+=2)nE.fromBufferAttribute(t,e),nA.fromBufferAttribute(t,e+1),r[e]=0===e?0:r[e-1],r[e+1]=r[e]+nE.distanceTo(nA);e.setAttribute("lineDistance",new tD(r,1))}else D("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class nP extends nM{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class nI extends tJ{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new e2(0xffffff),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}}let nO=new e_,nR=new rp,nL=new tz,nN=new Q;class nD extends eY{constructor(e=new tq,t=new nI){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 r=this.geometry,n=this.matrixWorld,i=e.params.Points.threshold,a=r.drawRange;if(null===r.boundingSphere&&r.computeBoundingSphere(),nL.copy(r.boundingSphere),nL.applyMatrix4(n),nL.radius+=i,!1===e.ray.intersectsSphere(nL))return;nO.copy(n).invert(),nR.copy(e.ray).applyMatrix4(nO);let s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=r.index,u=r.attributes.position;if(null!==l){let r=Math.max(0,a.start),i=Math.min(l.count,a.start+a.count);for(let a=r;a<i;a++){let r=l.getX(a);nN.fromBufferAttribute(u,r),nk(nN,r,o,n,e,t,this)}}else{let r=Math.max(0,a.start),i=Math.min(u.count,a.start+a.count);for(let a=r;a<i;a++)nN.fromBufferAttribute(u,a),nk(nN,a,o,n,e,t,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let r=e[t[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=r.length;e<t;e++){let t=r[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function nk(e,t,r,n,i,a,s){let o=nR.distanceSqToPoint(e);if(o<r){let r=new Q;nR.closestPointToPoint(e,r),r.applyMatrix4(n);let l=i.ray.origin.distanceTo(r);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:r,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class nU extends em{constructor(e,t,r,n,i=1006,a=1006,s,o,l){super(e,t,r,n,i,a,s,o,l),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const u=this;"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(function t(){u.needsUpdate=!0,u._requestVideoFrameCallbackId=e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){0!==this._requestVideoFrameCallbackId&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class nF extends em{constructor(e,t,r,n,i,a,s,o,l,u,c,d){super(null,a,s,o,l,u,n,i,c,d),this.isCompressedTexture=!0,this.image={width:t,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class nz extends em{constructor(e=[],t=301,r,n,i,a,s,o,l,u){super(e,t,r,n,i,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class nj extends em{constructor(e,t,r=1014,n,i,a,s=1003,o=1003,l,u=1026,c=1){if(1026!==u&&1027!==u)throw Error("THREE.DepthTexture: format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:c},n,i,a,s,o,u,r,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new ed(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class nB extends nj{constructor(e,t=1014,r=301,n,i,a=1003,s=1003,o,l=1026){const u={width:e,height:e,depth:1};super(e,e,t,r,n,i,a,s,o,l),this.image=[u,u,u,u,u,u],this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class nV extends em{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class nG extends tq{constructor(e=1,t=1,r=1,n=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:r,widthSegments:n,heightSegments:i,depthSegments:a};const s=this;n=Math.floor(n),i=Math.floor(i);const o=[],l=[],u=[],c=[];let d=0,h=0;function f(e,t,r,n,i,a,f,p,m,g,v){let y=a/m,x=f/g,b=a/2,_=f/2,S=p/2,w=m+1,M=g+1,T=0,E=0,A=new Q;for(let a=0;a<M;a++){let s=a*x-_;for(let o=0;o<w;o++){let d=o*y-b;A[e]=d*n,A[t]=s*i,A[r]=S,l.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[r]=p>0?1:-1,u.push(A.x,A.y,A.z),c.push(o/m),c.push(1-a/g),T+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){let r=d+t+w*e,n=d+t+w*(e+1),i=d+(t+1)+w*(e+1),a=d+(t+1)+w*e;o.push(r,n,a),o.push(n,i,a),E+=6}s.addGroup(h,E,v),h+=E,d+=T}f("z","y","x",-1,-1,r,t,e,a=Math.floor(a),i,0),f("z","y","x",1,-1,r,t,-e,a,i,1),f("x","z","y",1,1,e,r,t,n,a,2),f("x","z","y",1,-1,e,r,-t,n,a,3),f("x","y","z",1,-1,e,t,r,n,i,4),f("x","y","z",-1,-1,e,t,-r,n,i,5),this.setIndex(o),this.setAttribute("position",new tD(l,3)),this.setAttribute("normal",new tD(u,3)),this.setAttribute("uv",new tD(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nG(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}class nH extends tq{constructor(e=1,t=1,r=4,n=8,i=1){super(),this.type="CapsuleGeometry",this.parameters={radiu
1s:e,height:t,capSegments:r,radialSegments:n,heightSegments:i},t=Math.max(0,t),r=Math.max(1,Math.floor(r)),n=Math.max(3,Math.floor(n));const a=[],s=[],o=[],l=[],u=t/2,c=Math.PI/2*e,d=t,h=2*c+d,f=2*r+(i=Math.max(1,Math.floor(i))),p=n+1,m=new Q,g=new Q;for(let v=0;v<=f;v++){let y=0,x=0,b=0,_=0;if(v<=r){const t=v/r,n=t*Math.PI/2;x=-u-e*Math.cos(n),b=e*Math.sin(n),_=-e*Math.cos(n),y=t*c}else if(v<=r+i){const n=(v-r)/i;x=-u+n*t,b=e,_=0,y=c+n*d}else{const t=(v-r-i)/r,n=t*Math.PI/2;x=u+e*Math.sin(n),b=e*Math.cos(n),_=e*Math.sin(n),y=c+d+t*c}const S=Math.max(0,Math.min(1,y/h));let w=0;0===v?w=.5/n:v===f&&(w=-.5/n);for(let e=0;e<=n;e++){const t=e/n,r=t*Math.PI*2,i=Math.sin(r),a=Math.cos(r);g.x=-b*a,g.y=x,g.z=b*i,s.push(g.x,g.y,g.z),m.set(-b*a,_,b*i),m.normalize(),o.push(m.x,m.y,m.z),l.push(t+w,S)}if(v>0){const e=(v-1)*p;for(let t=0;t<n;t++){const r=e+t,n=e+t+1,i=v*p+t,s=v*p+t+1;a.push(r,n,i),a.push(n,s,i)}}}this.setIndex(a),this.setAttribute("position",new tD(s,3)),this.setAttribute("normal",new tD(o,3)),this.setAttribute("uv",new tD(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nH(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class nW extends tq{constructor(e=1,t=32,r=0,n=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:r,thetaLength:n},t=Math.max(3,t);const i=[],a=[],s=[],o=[],l=new Q,u=new Z;a.push(0,0,0),s.push(0,0,1),o.push(.5,.5);for(let i=0,c=3;i<=t;i++,c+=3){const d=r+i/t*n;l.x=e*Math.cos(d),l.y=e*Math.sin(d),a.push(l.x,l.y,l.z),s.push(0,0,1),u.x=(a[c]/e+1)/2,u.y=(a[c+1]/e+1)/2,o.push(u.x,u.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new tD(a,3)),this.setAttribute("normal",new tD(s,3)),this.setAttribute("uv",new tD(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nW(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class nX extends tq{constructor(e=1,t=1,r=1,n=32,i=1,a=!1,s=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:n,heightSegments:i,openEnded:a,thetaStart:s,thetaLength:o};const l=this;n=Math.floor(n),i=Math.floor(i);const u=[],c=[],d=[],h=[];let f=0;const p=[],m=r/2;let g=0;function v(r){let i=f,a=new Z,p=new Q,v=0,y=!0===r?e:t,x=!0===r?1:-1;for(let e=1;e<=n;e++)c.push(0,m*x,0),d.push(0,x,0),h.push(.5,.5),f++;let b=f;for(let e=0;e<=n;e++){let t=e/n*o+s,r=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*x,p.z=y*r,c.push(p.x,p.y,p.z),d.push(0,x,0),a.x=.5*r+.5,a.y=.5*i*x+.5,h.push(a.x,a.y),f++}for(let e=0;e<n;e++){let t=i+e,n=b+e;!0===r?u.push(n,n+1,t):u.push(n+1,n,t),v+=3}l.addGroup(g,v,!0===r?1:2),g+=v}(function(){let a=new Q,v=new Q,y=0,x=(t-e)/r;for(let l=0;l<=i;l++){let u=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=n;e++){let t=e/n,i=t*o+s,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*r+m,v.z=y*p,c.push(v.x,v.y,v.z),a.set(l,x,p).normalize(),d.push(a.x,a.y,a.z),h.push(t,1-g),u.push(f++)}p.push(u)}for(let r=0;r<n;r++)for(let n=0;n<i;n++){let a=p[n][r],s=p[n+1][r],o=p[n+1][r+1],l=p[n][r+1];(e>0||0!==n)&&(u.push(a,s,l),y+=3),(t>0||n!==i-1)&&(u.push(s,o,l),y+=3)}l.addGroup(g,y,0),g+=y})(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new tD(c,3)),this.setAttribute("normal",new tD(d,3)),this.setAttribute("uv",new tD(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nX(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class nq extends nX{constructor(e=1,t=1,r=32,n=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,r,n,i,a,s),this.type="C
1oneGeometry",this.parameters={radius:e,height:t,radialSegments:r,heightSegments:n,openEnded:i,thetaStart:a,thetaLength:s}}static fromJSON(e){return new nq(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class nY extends tq{constructor(e=[],t=[],r=1,n=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:n};const i=[],a=[];function s(e){i.push(e.x,e.y,e.z)}function o(t,r){let n=3*t;r.x=e[n+0],r.y=e[n+1],r.z=e[n+2]}function l(e,t,r,n){n<0&&1===e.x&&(a[t]=e.x-1),0===r.x&&0===r.z&&(a[t]=n/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}(function(e){let r=new Q,n=new Q,i=new Q;for(let a=0;a<t.length;a+=3)o(t[a+0],r),o(t[a+1],n),o(t[a+2],i),function(e,t,r,n){let i=n+1,a=[];for(let n=0;n<=i;n++){a[n]=[];let s=e.clone().lerp(r,n/i),o=t.clone().lerp(r,n/i),l=i-n;for(let e=0;e<=l;e++)0===e&&n===i?a[n][e]=s:a[n][e]=s.clone().lerp(o,e/l)}for(let e=0;e<i;e++)for(let t=0;t<2*(i-e)-1;t++){let r=Math.floor(t/2);t%2==0?(s(a[e][r+1]),s(a[e+1][r]),s(a[e][r])):(s(a[e][r+1]),s(a[e+1][r+1]),s(a[e+1][r]))}}(r,n,i,e)})(n),function(e){let t=new Q;for(let r=0;r<i.length;r+=3)t.x=i[r+0],t.y=i[r+1],t.z=i[r+2],t.normalize().multiplyScalar(e),i[r+0]=t.x,i[r+1]=t.y,i[r+2]=t.z}(r),function(){let e=new Q;for(let r=0;r<i.length;r+=3){var t;e.x=i[r+0],e.y=i[r+1],e.z=i[r+2];let n=u(e)/2/Math.PI+.5,s=Math.atan2(-(t=e).y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5;a.push(n,1-s)}(function(){let e=new Q,t=new Q,r=new Q,n=new Q,s=new Z,o=new Z,c=new Z;for(let d=0,h=0;d<i.length;d+=9,h+=6){e.set(i[d+0],i[d+1],i[d+2]),t.set(i[d+3],i[d+4],i[d+5]),r.set(i[d+6],i[d+7],i[d+8]),s.set(a[h+0],a[h+1]),o.set(a[h+2],a[h+3]),c.set(a[h+4],a[h+5]),n.copy(e).add(t).add(r).divideScalar(3);let f=u(n);l(s,h+0,e,f),l(o,h+2,t,f),l(c,h+4,r,f)}})(),function(){for(let e=0;e<a.length;e+=6){let t=a[e+0],r=a[e+2],n=a[e+4],i=Math.max(t,r,n),s=Math.min(t,r,n);i>.9&&s<.1&&(t<.2&&(a[e+0]+=1),r<.2&&(a[e+2]+=1),n<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new tD(i,3)),this.setAttribute("normal",new tD(i.slice(),3)),this.setAttribute("uv",new tD(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nY(e.vertices,e.indices,e.radius,e.detail)}}class n$ extends nY{constructor(e=1,t=0){const r=(1+Math.sqrt(5))/2,n=1/r;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-r,0,-n,r,0,n,-r,0,n,r,-n,-r,0,-n,r,0,n,-r,0,n,r,0,-r,0,-n,r,0,-n,-r,0,n,r,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
119,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new n$(e.radius,e.detail)}}let nK=new Q,nZ=new Q,nJ=new Q,nQ=new tc;class n0 extends tq{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const r=Math.cos(G*t),n=e.getIndex(),i=e.getAttribute("position"),a=n?n.count:i.count,s=[0,0,0],o=["a","b","c"],l=[,,,],u={},c=[];for(let e=0;e<a;e+=3){n?(s[0]=n.getX(e),s[1]=n.getX(e+1),s[2]=n.getX(e+2)):(s[0]=e,s[1]=e+1,s[2]=e+2);const{a:t,b:a,c:d}=nQ;if(t.fromBufferAttribute(i,s[0]),a.fromBufferAttribute(i,s[1]),d.fromBufferAttribute(i,s[2]),nQ.getNormal(nJ),l[0]=`${Math.round(1e4*t.x)},${Math.round(1e4*t.y)},${Math.round(1e4*t.z)}`,l[1]=`${Math.round(1e4*a.x)},${Math.round(1e4*a.y)},${Math.round(1e4*a.z)}`,l[2]=`${Math.round(1e4*d.x)},${Math.round(1e4*d.y)},${Math.round(1e4*d.z)}`,l[0]!==l[1]&&l[1]!==l[2]&&l[2]!==l[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=l[e],i=l[t],a=nQ[o[e]],d=nQ[o[t]],h=`${n}_${i}`,f=`${i}_${n}`;f in u&&u[f]?(nJ.dot(u[f].normal)<=r&&(c.push(a.x,a.y,a.z),c.push(d.x,d.y,d.z)),u[f]=null):h in u||(u[h]={index0:s[e],index1:s[t],normal:nJ.clone()})}}for(const e in u)if(u[e]){const{index0:t,index1:r}=u[e];nK.fromBufferAttribute(i,t),nZ.fromBufferAttribute(i,r),c.push(nK.x,nK.y,nK.z),c.push(nZ.x,nZ.y,nZ.z)}this.setAttribute("position",new tD(c,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class n1{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){D("Curve: .getPoint() not implemented.")}getPointAt(e,t){let r=this.getUtoTmapping(e);return this.getPoint(r,t)}getPoints(e=5){let t=[];for(let r=0;r<=e;r++)t.push(this.getPoint(r/e));return t}getSpacedPoints(e=5){let t=[];for(let r=0;r<=e;r++)t.push(this.getPointAt(r/e));return t}getLength(){let e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let t=[],r,n=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)t.push(i+=(r=this.getPoint(a/e)).distanceTo(n)),n=r;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){let r,n=this.getLengths(),i=0,a=n.length;r=t||e*n[a-1];let s=0,o=a-1,l;for(;s<=o;)if((l=n[i=Math.floor(s+(o-s)/2)]-r)<0)s=i+1;else if(l>0)o=i-1;else{o=i;break}if(n[i=o]===r)return i/(a-1);let u=n[i],c=n[i+1];return(i+(r-u)/(c-u))/(a-1)}getTangent(e,t){let r=e-1e-4,n=e+1e-4;r<0&&(r=0),n>1&&(n=1);let i=this.getPoint(r),a=this.getPoint(n),s=t||(i.isVector2?new Z:new Q);return s.copy(a).sub(i).normalize(),s}getTangentAt(e,t){let r=this.getUtoTmapping(e);return this.getTangent(r,t)}computeFrenetFrames(e,t=!1){let r=new Q,n=[],i=[],a=[],s=new Q,o=new e_;for(let t=0;t<=e;t++){let r=t/e;n[t]=this.getTangentAt(r,new Q)}i[0]=new Q,a[0]=new Q;let l=Number.MAX_VALUE,u=Math.abs(n[0].x),c=Math.abs(n[0].y),d=Math.abs(n[0].z);u<=l&&(l=u,r.set(1,0,0)),c<=l&&(l=c,r.set(0,1,0)),d<=l&&r.set(0,0,1),s.crossVectors(n[0],r).normalize(),i[0].crossVectors(n[0],s),a[0].crossVectors(n[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),s.crossVectors(n[t-1],n[t]),s.length()>Number.EPSILON){s.normalize();let e=Math.acos(X(n[t-1].dot(n[t]),-1,1));i[t].applyMatrix4(o.makeRotationAxis(s,e))}a[t].crossVectors(n[t],i[t])}if(!0===t){let t=Math.acos(X(i[0].dot(i[e]),-1,1));t/=e,n[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let r=1;r<=e;r++)i[r].applyMatrix4(o.makeRotationAxis(n[r],t*r)),a[r].crossVectors(n[r],i[r])}return{tangents:n,normals:i,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class n2 extends n1{constructor(e=0,t=0,r=1,n=1,i=0,a=2*Math.PI,s=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=r,this.yRadius=n,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t=new Z){let r=2*Math.PI,n=this.aEndAngle-this.aStartAngle,i=Math.abs(n)<Number.EPSILON;for(;n<0;)n+=r;for(;n>r;)n-=r;n<Number.EPSILON&&(n=i?0:r),!0!==this.aClockwise||i||(n===r?n=-r:n-=r);let a=this.aStartAngle+e*n,s=this.aX+this.xRadius*Math.cos(a),o=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){let e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),r=s-this.aX,n=o-this.aY;s=r*e-n*t+this.aX,o=r*t+n*e+this.aY}return t.set(s,o)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){let e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class n3 extends n2{constructor(e,t,r,n,i,a){super(e,t,r,r,n,i,a),this.isArcCurve=!0,this.type="ArcCurve"}}function n4(){let e=0,t=0,r=0,n=0;function i(i,a,s,o){e=i,t=s,r=-3*i+3*a-2*s-o,n=2*i-2*a+s+o}return{initCatmullRom:function(e,t,r,n,a){i(t,r,a*(r-e),a*(n-t))},initNonuniformCatmullRom:function(e,t,r,n,a,s,o){let l=(t-e)/a-(r-e)/(a+s)+(r-t)/s,u=(r-t)/s-(n-t)/(s+o)+(n-r)/o;i(t,r,l*=s,u*=s)},calc:function(i){let a=i*i;return e+t*i+r*a+a*i*n}}}let n5=new Q,n6=new Q,n8=new n4,n9=new n4,n7=new n4;class ie extends n1{constructor(e=[],t=!1,r="centripetal",n=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=r,this.tension=n}getPoint(e,t=new Q){let r,n,i=this.points,a=i.length,s=(a-!this.closed)*e,o=Math.floor(s),l=s-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/a)+1)*a:0===l&&o===a-1&&(o=a-2,l=1),this.closed||o>0?r=i[(o-1)%a]:(n6.subVectors(i[0],i[1]).add(i[0]),r=n6);let u=i[o%a],c=i[(o+1)%a];if(this.closed||o+2<a?n=i[(o+2)%a]:(n5.subVectors(i[a-1],i[a-2]).add(i[a-1]),n=n5),"centripetal"===this.curveType||"chordal"===this.curveType){let e="chordal"===this.curveType?.5:.25,t=Math.pow(r.distanceToSquared(u),e),i=Math.pow(u.distanceToSquared(c),e),a=Math.pow(c.distanceToSquared(n),e);i<1e-4&&(i=1),t<1e-4&&(t=i),a<1e-4&&(a=i),n8.initNonuniformCatmullRom(r.x,u.x,c.x,n.x,t,i,a),n9.initNonuniformCatmullRom(r.y,u.y,c.y,n.y,t,i,a),n7.initNonuniformCatmullRom(r.z,u.z,c.z,n.z,t,i,a)}else"catmullrom"===this.curveType&&(n8.initCatmullRom(r.x,u.x,c.x,n.x,this.tension),n9.initCatmullRom(r.y,u.y,c.y,n.y,this.tension),n7.initCatmullRom(r.z,u.z,c.z,n.z,this.tension));return t.set(n8.calc(l),n9.calc(l),n7.calc(l)),t}copy(e){super.copy(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){let r=e.points[t];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){let e=super.toJSON();e.points=[];for(let t=0,r=this.points.length;t<r;t++){let r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){let r=e.points[t];this.points.push(new Q().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function it(e,t,r,n,i){let a=(n-t)*.5,s=(i-r)*.5,o=e*e;return e*o*(2*r-2*n+a+s)+(-3*r+3*n-2*a-s)*o+a*e+r}function ir(e,t,r,n){let i;return(i=1-e)*i*t+2*(1-e)*e*r+e*e*n}function ii(e,t,r,n,i){let a,s;return(a=1-e)*a*a*t+3*(s=1-e)*s*e*r+3*(1-e)*e*e*n+e*e*e*i}class ia extends n1{constructor(e=new Z,t=new Z,r=new Z,n=new Z){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=r,this.v3=n}getPoint(e,t=new Z){let r=this.v0,n=this.v1,i=this.v2,a=this.v3;return t.set(ii(e,r.x,n.x,i.x,a.x),ii(e,r.y,n.y,i.y,a.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class is extends n1{constructor(e=new Q,t=new Q,r=new Q,n=new Q){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=r,this.v3=n}getPoint(e,t=new Q){let r=this.v0,n=this.v1,i=this.v2,a=this.v3;return t.set(ii(e,r.x,n.x,i.x,a.x),ii(e,r.y,n.y,i.y,a.y),ii(e,r.z,n.z,i.z,a.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class io extends n1{constructor(e=new Z,t=new Z){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Z){return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}
1getTangent(e,t=new Z){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class il extends n1{constructor(e=new Q,t=new Q){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new Q){return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Q){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class iu extends n1{constructor(e=new Z,t=new Z,r=new Z){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=r}getPoint(e,t=new Z){let r=this.v0,n=this.v1,i=this.v2;return t.set(ir(e,r.x,n.x,i.x),ir(e,r.y,n.y,i.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class ic extends n1{constructor(e=new Q,t=new Q,r=new Q){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=r}getPoint(e,t=new Q){let r=this.v0,n=this.v1,i=this.v2;return t.set(ir(e,r.x,n.x,i.x),ir(e,r.y,n.y,i.y),ir(e,r.z,n.z,i.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class id extends n1{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Z){let r=this.points,n=(r.length-1)*e,i=Math.floor(n),a=n-i,s=r[0===i?i:i-1],o=r[i],l=r[i>r.length-2?r.length-1:i+1],u=r[i>r.length-3?r.length-1:i+2];return t.set(it(a,s.x,o.x,l.x,u.x),it(a,s.y,o.y,l.y,u.y)),t}copy(e){super.copy(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){let r=e.points[t];this.points.push(r.clone())}return this}toJSON(){let e=super.toJSON();e.points=[];for(let t=0,r=this.points.length;t<r;t++){let r=this.points[t];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){let r=e.points[t];this.points.push(new Z().fromArray(r))}return this}}var ih,ip,im,ig,iv,iy=Object.freeze({__proto__:null,ArcCurve:n3,CatmullRomCurve3:ie,CubicBezierCurve:ia,CubicBezierCurve3:is,EllipseCurve:n2,LineCurve:io,LineCurve3:il,QuadraticBezierCurve:iu,QuadraticBezierCurve3:ic,SplineCurve:id});class ix extends n1{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){let e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){let r=!0===e.isVector2?"LineCurve":"LineCurve3";this.curves.push(new iy[r](t,e))}return this}getPoint(e,t){let r=e*this.getLength(),n=this.getCurveLengths(),i=0;for(;i<n.length;){if(n[i]>=r){let e=n[i]-r,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let r=0,n=this.curves.length;r<n;r++)e.push(t+=this.curves[r].getLength());return this.cacheLengths=e,e}getSpacedPoints(e=40){let t=[];for(let r=0;r<=e;r++)t.push(this.getPoint(r/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){let t,r=[];for(let n=0,i=this.curves;n<i.length;n++){let a=i[n],s=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isS
1plineCurve?e*a.points.length:e,o=a.getPoints(s);for(let e=0;e<o.length;e++){let n=o[e];t&&t.equals(n)||(r.push(n),t=n)}}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(e){super.copy(e),this.curves=[];for(let t=0,r=e.curves.length;t<r;t++){let r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){let e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,r=this.curves.length;t<r;t++){let r=this.curves[t];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,r=e.curves.length;t<r;t++){let r=e.curves[t];this.curves.push(new iy[r.type]().fromJSON(r))}return this}}class ib extends ix{constructor(e){super(),this.type="Path",this.currentPoint=new Z,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,r=e.length;t<r;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){let r=new io(this.currentPoint.clone(),new Z(e,t));return this.curves.push(r),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,r,n){let i=new iu(this.currentPoint.clone(),new Z(e,t),new Z(r,n));return this.curves.push(i),this.currentPoint.set(r,n),this}bezierCurveTo(e,t,r,n,i,a){let s=new ia(this.currentPoint.clone(),new Z(e,t),new Z(r,n),new Z(i,a));return this.curves.push(s),this.currentPoint.set(i,a),this}splineThru(e){let t=new id([this.currentPoint.clone()].concat(e));return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,r,n,i,a){let s=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(e+s,t+o,r,n,i,a),this}absarc(e,t,r,n,i,a){return this.absellipse(e,t,r,r,n,i,a),this}ellipse(e,t,r,n,i,a,s,o){let l=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+l,t+u,r,n,i,a,s,o),this}absellipse(e,t,r,n,i,a,s,o){let l=new n2(e,t,r,n,i,a,s,o);if(this.curves.length>0){let e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);let u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class i_ extends ib{constructor(e){super(e),this.uuid=W(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let r=0,n=this.holes.length;r<n;r++)t[r]=this.holes[r].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,r=e.holes.length;t<r;t++){let r=e.holes[t];this.holes.push(r.clone())}return this}toJSON(){let e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,r=this.holes.length;t<r;t++){let r=this.holes[t];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,r=e.holes.length;t<r;t++){let r=e.holes[t];this.holes.push(new ib().fromJSON(r))}return this}}function iS(e,t,r,n,i){let a;if(i===function(e,t,r,n){let i=0;for(let a=t,s=r-n;a<r;a+=n)i+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return i}(e,t,r,n)>0)for(let i=t;i<r;i+=n)a=iD(i/n|0,e[i],e[i+1],a);else for(let i=r-n;i>=t;i-=n)a=iD(i/n|0,e[i],e[i+1],a);return a&&iP(a,a.next)&&(ik(a),a=a.next),a}function iw(e,t){if(!e)return e;t||(t=e);let r=e,n;do if(n=!1,!r.steiner&&(iP(r,r.next)||0===iC(r.prev,r,r.next))){if(ik(r),(r=t=r.prev)===r.next)break;n=!0}else r=r.next;while(n||r!==t)return t}function iM(e,t){let r=e.x-t.x;return 0===r&&0==(r=e.y-t.y)&&(r=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function iT(e,t,r,n,i){return(e=((e=((e=((e=((e=(e-r)*i|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-n)*i|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function iE(e,t,r,n,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(n-o)>=(r-s)*(t-o)&&(r-s)*(a-o)>=(i-s)*(n-o)}function iA(e,t,r,n,i,a,s,o){return(e!==s||t!==o)&&iE(e,t,r,n,i,a,s,o)}function iC(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function iP(e,t){return e.x===t.x&&e.y===t.y}function iI(e,t,r,n){let i=iR(iC(e,t,r)),a=iR(iC(e,t,n)),s=iR(iC(r,n,e)),o=iR(iC(r,n,t));return!!(i!==a&&s!==o||0===i&&iO(e,r,t)||0===a&&iO(e,n,t)||0===s&&iO(r,e,n)||0===o&&iO(r,t,n))}function iO(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function iR(e){return e>0?1:e<0?-1:0}function iL(e,t){return 0>iC(e.prev,e,e.next)?iC(e,t,e.next)>=0&&iC(e,e.prev,t)>=0:0>iC(e,t,e.prev)||0>iC(e,e.next,t)}function iN(e,t){let r=iU(e.i,e.x,e.y),n=iU(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function iD(e,t,r,n){let i=iU(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ik(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function iU(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class iF{static triangulate(e,t,r=2){return function(e,t,r=2){let n,i,a,s=t&&t.length,o=s?t[0]*r:e.length,l=iS(e,0,o,r,!0),u=[];
1if(!l||l.next===l.prev)return u;if(s&&(l=function(e,t,r,n){let i=[];for(let r=0,a=t.length;r<a;r++){let s=t[r]*n,o=r<a-1?t[r+1]*n:e.length,l=iS(e,s,o,n,!1);l===l.next&&(l.steiner=!0),i.push(function(e){let t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e)return r}(l))}i.sort(iM);for(let e=0;e<i.length;e++)r=function(e,t){let r=function(e,t){let r,n=t,i=e.x,a=e.y,s=-1/0;if(iP(e,n))return n;do{if(iP(e,n.next))return n.next;if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){let e=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=i&&e>s&&(s=e,r=n.x<n.next.x?n:n.next,e===i))return r}n=n.next}while(n!==t)if(!r)return null;let o=r,l=r.x,u=r.y,c=1/0;n=r;do{if(i>=n.x&&n.x>=l&&i!==n.x&&iE(a<u?i:s,a,l,u,a<u?s:i,a,n.x,n.y)){var d,h;let t=Math.abs(a-n.y)/(i-n.x);iL(n,e)&&(t<c||t===c&&(n.x>r.x||n.x===r.x&&(d=r,h=n,0>iC(d.prev,d,h.prev)&&0>iC(h.next,d,d.next))))&&(r=n,c=t)}n=n.next}while(n!==o)return r}(e,t);if(!r)return t;let n=iN(r,e);return iw(n,n.next),iw(r,r.next)}(i[e],r);return r}(e,t,l,r)),e.length>80*r){n=e[0],i=e[1];let t=n,s=i;for(let a=r;a<o;a+=r){let r=e[a],o=e[a+1];r<n&&(n=r),o<i&&(i=o),r>t&&(t=r),o>s&&(s=o)}a=0!==(a=Math.max(t-n,s-i))?32767/a:0}return function e(t,r,n,i,a,s,o){if(!t)return;!o&&s&&function(e,t,r,n){let i=e;do 0===i.z&&(i.z=iT(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e)i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,r=1;do{let n,i=e;e=null;let a=null;for(t=0;i;){t++;let s=i,o=0;for(let e=0;e<r&&(o++,s=s.nextZ);e++);let l=r;
1for(;o>0||l>0&&s;)0!==o&&(0===l||!s||i.z<=s.z)?(n=i,i=i.nextZ,o--):(n=s,s=s.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;i=s}a.nextZ=null,r*=2}while(t>1)}(i)}(t,i,a,s);let l=t;for(;t.prev!==t.next;){let u=t.prev,c=t.next;if(s?function(e,t,r,n){let i=e.prev,a=e.next;if(iC(i,e,a)>=0)return!1;let s=i.x,o=e.x,l=a.x,u=i.y,c=e.y,d=a.y,h=Math.min(s,o,l),f=Math.min(u,c,d),p=Math.max(s,o,l),m=Math.max(u,c,d),g=iT(h,f,t,r,n),v=iT(p,m,t,r,n),y=e.prevZ,x=e.nextZ;for(;y&&y.z>=g&&x&&x.z<=v;){if(y.x>=h&&y.x<=p&&y.y>=f&&y.y<=m&&y!==i&&y!==a&&iA(s,u,o,c,l,d,y.x,y.y)&&iC(y.prev,y,y.next)>=0||(y=y.prevZ,x.x>=h&&x.x<=p&&x.y>=f&&x.y<=m&&x!==i&&x!==a&&iA(s,u,o,c,l,d,x.x,x.y)&&iC(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;y&&y.z>=g;){if(y.x>=h&&y.x<=p&&y.y>=f&&y.y<=m&&y!==i&&y!==a&&iA(s,u,o,c,l,d,y.x,y.y)&&iC(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=v;){if(x.x>=h&&x.x<=p&&x.y>=f&&x.y<=m&&x!==i&&x!==a&&iA(s,u,o,c,l,d,x.x,x.y)&&iC(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}(t,i,a,s):function(e){let t=e.prev,r=e.next;if(iC(t,e,r)>=0)return!1;let n=t.x,i=e.x,a=r.x,s=t.y,o=e.y,l=r.y,u=Math.min(n,i,a),c=Math.min(s,o,l),d=Math.max(n,i,a),h=Math.max(s,o,l),f=r.next;for(;f!==t;){if(f.x>=u&&f.x<=d&&f.y>=c&&f.y<=h&&iA(n,s,i,o,a,l,f.x,f.y)&&iC(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}(t)){r.push(u.i,t.i,c.i),ik(t),t=c.next,l=c.next;continue}if((t=c)===l){o?1===o?e(t=function(e,t){let r=e;do{let n=r.prev,i=r.next.next;!iP(n,i)&&iI(n,r,r.next,i)&&iL(n,i)&&iL(i,n)&&(t.push(n.i,r.i,i.i),ik(r),ik(r.next),r=e=i),r=r.next}while(r!==e)return iw(r)}(iw(t),r),r,n,i,a,s,2):2===o&&function(t,r,n,i,a,s){let o=t;do{let t=o.next.next;for(;t!==o.prev;){var l,u;if(o.i!==t.i&&(l=o,u=t,l.next.i!==u.i&&l.prev.i!==u.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&iI(r,r.next,e,t))return!0;r=r.next}while(r!==e)return!1}(l,u)&&(iL(l,u)&&iL(u,l)&&function(e,t){let r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>
1a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e)return n}(l,u)&&(iC(l.prev,l,u.prev)||iC(l,u.prev,u))||iP(l,u)&&iC(l.prev,l,l.next)>0&&iC(u.prev,u,u.next)>0))){let l=iN(o,t);o=iw(o,o.next),l=iw(l,l.next),e(o,r,n,i,a,s,0),e(l,r,n,i,a,s,0);return}t=t.next}o=o.next}while(o!==t)}(t,r,n,i,a,s):e(iw(t),r,n,i,a,s,1);break}}}(l,u,r,n,i,a,0),u}(e,t,r)}}class iz{static area(e){let t=e.length,r=0;for(let n=t-1,i=0;i<t;n=i++)r+=e[n].x*e[i].y-e[i].x*e[n].y;return .5*r}static isClockWise(e){return 0>iz.area(e)}static triangulateShape(e,t){let r=[],n=[],i=[];ij(e),iB(r,e);let a=e.length;t.forEach(ij);for(let e=0;e<t.length;e++)n.push(a),a+=t[e].length,iB(r,t[e]);let s=iF.triangulate(r,n);for(let e=0;e<s.length;e+=3)i.push(s.slice(e,e+3));return i}}function ij(e){let t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function iB(e,t){for(let r=0;r<t.length;r++)e.push(t[r].x),e.push(t[r].y)}class iV extends tq{constructor(e=new i_([new Z(.5,.5),new Z(-.5,.5),new Z(-.5,-.5),new Z(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const r=this,n=[],i=[];for(let a=0,s=e.length;a<s;a++)!function(e){let a,s,o,l,u,c=[],d=void 0!==t.curveSegments?t.curveSegments:12,h=void 0!==t.steps?t.steps:1,f=void 0!==t.depth?t.depth:1,p=void 0===t.bevelEnabled||t.bevelEnabled,m=void 0!==t.bevelThickness?t.bevelThickness:.2,g=void 0!==t.bevelSize?t.bevelSize:m-.1,v=void 0!==t.bevelOffset?t.bevelOffset:0,y=void 0!==t.bevelSegments?t.bevelSegments:3,x=t.extrudePath,b=void 0!==t.UVGenerator?t.UVGenerator:iG,_,S=!1;if(x){_=x.getSpacedPoints(h),S=!0,p=!1;let e=!!x.isCatmullRomCurve3&&x.closed;a=x.computeFrenetFrames(h,e),s=new Q,o=new Q,l=new Q}p||(y=0,m=0,g=0,v=0);let w=e.extractPoints(d),M=w.shape,T=w.holes;if(!iz.isClockWise(M)){M=M.reverse();for(let e=0,t=T.length;e<t;e++){let t=T[e];iz.isClockWise(t)&&(T[e]=t.reverse())}}function E(e){let t=1e-10*1e-10,r=e[0];for(let n=1;n<=e.length;n++){let i=n%e.length,a=e[i],s=a.x-r.x,o=a.y-r.y,l=s*s+o*o,u=Math.max(Math.abs(a.x),Math.abs(a.y),Math.abs(r.x),Math.abs(r.y));if(l<=t*u*u){e.splice(i,1),n--;continue}r=a}}E(M),T.forEach(E);let A=T.length,C=M;for(let e=0;e<A;e++){let t=T[e];M=M.concat(t)}function P(e,t,r){return t||k("ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,r)}let I=M.length;function O(e,t,r){let n,i,a,s=e.x-t.x,o=e.y-t.y,l=r.x-e.x,u=r.y-e.y,c=s*s+o*o;if(Math.abs(s*u-o*l)>Number.EPSILON){let d=Math.sqrt(c),h=Math.sqrt(l*l+u*u),f=t.x-o/d,p=t.y+s/d,m=((r.x-u/h-f)*u-(r.y+l/h-p)*l)/(s*u-o*l),g=(n=f+s*m-e.x)*n+(i=p+o*m-e.y)*i;if(g<=2)return new Z(n,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(u)&&(e=!0),e?(n=-o,i=s,a=Math.sqrt(c)):(n=s,i=o,a=Math.sqrt(c/2))}return new Z(n/a,i/a)}let R=[];for(let e=0,t=C.length,r=t-1,n=e+1;e<t;e++,r++,n++)r===t&&(r=0),n===t&&(n=0),R[e]=O(C[e],C[r],C[n]);let L=[],N,D=R.concat();for(let e=0;e<A;e++){let t=T[e];N=[];for(let e=0,r=t.length,n=r-1,i=e+1;e<r;e++,n++,i++)n===r&&(n=0),i===r&&(i=0),N[e]=O(t[e],t[n],t[i]);L.push(N),D=D.concat(N)}if(0===y)u=iz.triangulateShape(C,T);else{let e=[],t=[];for(let r=0;r<y;r++){let n=r/y,i=m*Math.cos(n*Math.PI/2),a=g*Math.sin(n*Math.PI/2)+v;for(let t=0,r=C.length;t<r;t++){let r=P(C[t],R[t],a);j(r.x,r.y,-i),0===n&&e.push(r)}for(let e=0;e<A;e++){let r=T[e];N=L[e];let s=[];for(let e=0,t=r.length;e<t;e++){let t=P(r[e],N[e],a);j(t.x,t.y,-i),0===n&&s.push(t)}0===n&&t.push(s)}}u=iz.triangulateShape(e,t)}let U=u.length,F=g+v;for(let e=0;e<I;e++){let t=p?P(M[e],D[e],F):M[e];S?(o.copy(a.normals[0]).multiplyScalar(t.x),s.copy(a.binormals[0]).multiplyScalar(t.y),l.copy(_[0]).add(o).add(s),j(l.x,l.y,l.z)):j(t.x,t.y,0)}for(let e=1;e<=h;e++)for(let t=0;t<I;t++){let r=p?P(M[t],D[t],F):M[t];S?(o.copy(a.normals[e]).multiplyScalar(r.x),s.copy(a.binormals[e]).multiplyScalar(r.y),l.copy(_[e]).add(o).add(s),j(l.x,l.y,l.z)):j(r.x,r.y,f/h*e)}for(let e=y-1;e>=0;e--){let t=e/y,r=m*Math.cos(t*Math.PI/2),n=g*Math.sin(t*Math.PI/2)+v;for(let e=0,t=C.length;e<t;e++){let t=P(C[e],R[e],n);j(t.x,t.y,f+r)}for(let e=0,t=T.length;e<t;e++){let t=T[e];N=L[e];for(let e=0,i=t.length;e<i;e++){let i=P(t[e],N[e],n);S?j(i.x,i.y+_[h-1].y,_[h-1].x+r):j(i.x,i.y,f+r)}}}function z(e,t){let i=e.length;for(;--i>=0;){let a=i,s=i-1;s<0&&(s=e.length-1);for(let e=0,i=h+2*y;e<i;e++){let i=I*e,o=I*(e+1);!function(e,t,i,a){V(e),V(t),V(a),V(t),V(i),V(a);let s=n.length/3,o=b.generateSideWallUV(r,n,s-6,s-3,s-2,s-1);G(o[0]),G(o[1]),G(o[3]),G(o[1]),G(o[2]),G(o[3])}(t+a+i,t+s+i,t+s+o,t+a+o)}}}function j(e,t,r){c.push(e),c.push(t),c.push(r)}function B(e,t,i){V(e),V(t),V(i);let a=n.length/3,s=b.generateTopUV(r,n,a-3,a-2,a-1);G(s[0]),G(s[1]),G(s[2])}function V(e){n.push(c[3*e+0]),n.push(c[3*e+1]),n.push(c[3*e+2])}function G(e){i.push(e.x),i.push(e.y)}(function(){let e=n.length/3;if(p){let e=0*I;for(let t=0;t<U;t++){let r=u[t];B(r[2]+e,r[1]+e,r[0]+e)}e=I*(h+2*y);for(let t=0;t<U;t++){let r=u[t];B(r[0]+e,r[1]+e,r[2]+e)}}else{for(let e=0;e<U;e++){let t=u[e];B(t[2],t[1],t[0])}for(let e=0;e<U;e++){let t=u[e];B(t[0]+I*h,t[1]+I*h,t[2]+I*h)}}r.addGroup(e,n.length/3-e,0)})(),function(){let e=n.length/3,t=0;z(C,0),t+=C.length;for(let e=0,r=T.length;e<r;e++){let r=T[e];z(r,t),t+=r.length}r.addGroup(e,n.length/3-e,1)}()}(e[a]);this.setAttribute("position",new tD(n,3)),this.setAttribute("uv",new tD(i,2)),this.computeVertexNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){let e=super.toJSON();return function(e,t,r){if(r.shapes=[],Array.isArray(e))for(let t=0,n=e.length;t<n;t++){let n=e[t];r.shapes.push(n.uuid)}else r.shapes.push(e.uuid);return r.options=Object.assign({},t),void 0!==t.extrudePath&&(r.options.extrudePath=t.extrudePath.toJSON()),r}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){let r=[];for(let n=0,i=e.shapes.length;n<i;n++){let i=t[e.shapes[n]];r.push(i)}let n=e.options.extrudePath;return void 0!==n&&(e.options.extrudePath=new iy[n.type]().fromJSON(n)),new iV(r,e.options)}}let iG={generateTopUV:function(e,t,r,n,i){let a=t[3*r],s=t[3*r+1],o=t[3*n],l=t[3*n+1],u=t[3*i],c=t[3*i+1];return[new Z(a,s),new Z(o,l),new Z(u,c)]},generateSideWallUV:function(e,t,r,n,i,a){let s=t[3*r],o=t[3*r+1],l=t[3*r+2],u=t[3*n],c=t[3*n+1],d=t[3*n+2],h=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*a],g=t[3*a+1],v=t[3*a+2];return Math.abs(o-c)<Math.abs(s-u)?[new Z(s,1-l),new Z(u,1-d),new Z(h,1-p),new Z(m,1-v)]:[new Z(o,1-l),new Z(c,1-d),new Z(f,1-p
vendor: 10,781 bytes, line 1
1),new Z(g,1-v)]}};class iH extends nY{constructor(e=1,t=0){const r=(1+Math.sqrt(5))/2;super([-1,r,0,1,r,0,-1,-r,0,1,-r,0,0,-1,r,0,1,r,0,-1,-r,0,1,-r,r,0,-1,r,0,1,-r,0,-1,-r,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new iH(e.radius,e.detail)}}class iW extends tq{constructor(e=[new Z(0,-.5),new Z(.5,0),new Z(0,.5)],t=12,r=0,n=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:r,phiLength:n},t=Math.floor(t),n=X(n,0,2*Math.PI);const i=[],a=[],s=[],o=[],l=[],u=1/t,c=new Q,d=new Z,h=new Q,f=new Q,p=new Q;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,h.x=+(g=e[t+1].y-e[t].y),h.y=-m,h.z=0*g,p.copy(h),h.normalize(),o.push(h.x,h.y,h.z);break;case e.length-1:o.push(p.x,p.y,p.z);break;default:m=e[t+1].x-e[t].x,h.x=+(g=e[t+1].y-e[t].y),h.y=-m,h.z=0*g,f.copy(h),h.x+=p.x,h.y+=p.y,h.z+=p.z,h.normalize(),o.push(h.x,h.y,h.z),p.copy(f)}for(let i=0;i<=t;i++){const h=r+i*u*n,f=Math.sin(h),p=Math.cos(h);for(let r=0;r<=e.length-1;r++){c.x=e[r].x*f,c.y=e[r].y,c.z=e[r].x*p,a.push(c.x,c.y,c.z),d.x=i/t,d.y=r/(e.length-1),s.push(d.x,d.y);const n=o[3*r+0]*f,u=o[3*r+1],h=o[3*r+0]*p;l.push(n,u,h)}}for(let r=0;r<t;r++)for(let t=0;t<e.length-1;t++){const n=t+r*e.length,a=n+e.length,s=n+e.length+1,o=n+1;i.push(n,a,o),i.push(s,o,a)}this.setIndex(i),this.setAttribute("position",new tD(a,3)),this.setAttribute("uv",new tD(s,2)),this.setAttribute("normal",new tD(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iW(e.points,e.segments,e.phiStart,e.phiLength)}}class iX extends nY{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new iX(e.radius,e.detail)}}class iq extends tq{constructor(e=1,t=1,r=1,n=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:r,heightSegments:n};const i=e/2,a=t/2,s=Math.floor(r),o=Math.floor(n),l=s+1,u=o+1,c=e/s,d=t/o,h=[],f=[],p=[],m=[];for(let e=0;e<u;e++){const t=e*d-a;for(let r=0;r<l;r++){const n=r*c-i;f.push(n,-t,0),p.push(0,0,1),m.push(r/s),m.push(1-e/o)}}for(let e=0;e<o;e++)for(let t=0;t<s;t++){const r=t+l*e,n=t+l*(e+1),i=t+1+l*(e+1),a=t+1+l*e;h.push(r,n,a),h.push(n,i,a)}this.setIndex(h),this.setAttribute("position",new tD(f,3)),this.setAttribute("normal",new tD(p,3)),this.setAttribute("uv",new tD(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iq(e.width,e.height,e.widthSegments,e.heightSegments)}}class iY extends tq{constructor(e=.5,t=1,r=32,n=1,i=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:r,phiSegments:n,thetaStart:i,thetaLength:a},r=Math.max(3,r);const s=[],o=[],l=[],u=[];let c=e;const d=(t-e)/(n=Math.max(1,n)),h=new Q,f=new Z;for(let e=0;e<=n;e++){for(let e=0;e<=r;e++){const n=i+e/r*a;h.x=c*Math.cos(n),h.y=c*Math.sin(n),o.push(h.x,h.y,h.z),l.push(0,0,1),f.x=(h.x/t+1)/2,f.y=(h.y/t+1)/2,u.push(f.x,f.y)}c+=d}for(let e=0;e<n;e++){const t=e*(r+1);for(let e=0;e<r;e++){const n=e+t,i=n+r+1,a=n+r+2,o=n+1;s.push(n,i,o),s.push(i,a,o)}}this.setIndex(s),this.setAttribute("position",new tD(o,3)),this.setAttribute("normal",new tD(l,3)),this.setAttribute("uv",new tD(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iY(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class i$ extends tq{constructor(e=new i_([new Z(0,.5),new Z(-.5,-.5),new Z(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const r=[],n=[],i=[],a=[];let s=0,o=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t<e.length;t++)l(e[t]),this.addGroup(s,o,t),s+=o,o=0;function l(e){let s=n.length/3,l=e.extractPoints(t),u=l.shape,c=l.holes;!1===iz.isClockWise(u)&&(u=u.reverse());for(let e=0,t=c.length;e<t;e++){let t=c[e];!0===iz.isClockWise(t)&&(c[e]=t.reverse())}let d=iz.triangulateShape(u,c);for(let e=0,t=c.length;e<t;e++){let t=c[e];u=u.concat(t)}for(let e=0,t=u.length;e<t;e++){let t=u[e];n.push(t.x,t.y,0),i.push(0,0,1),a.push(t.x,t.y)}for(let e=0,t=d.length;e<t;e++){let t=d[e],n=t[0]+s,i=t[1]+s,a=t[2]+s;r.push(n,i,a),o+=3}}this.setIndex(r),this.setAttribute("position",new tD(n,3)),this.setAttribute("normal",new tD(i,3)),this.setAttribute("uv",new tD(a,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){let e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let r=0,n=e.length;r<n;r++){let n=e[r];t.shapes.push(n.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){let r=[];for(let n=0,i=e.shapes.length;n<i;n++){let i=t[e.shapes[n]];r.push(i)}return new i$(r,e.curveSegments)}}class iK extends tq{constructor(e=1,t=32,r=16,n=0,i=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:r,phiStart:n,phiLength:i,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),r=Math.max(2,Math.floor(r));const o=Math.min(a+s,Math.PI);let l=0;const u=[],c=new Q,d=new Q,h=[],f=[],p=[],m=[];for(let h=0;h<=r;h++){const g=[],v=h/r,y=e*Math.cos(a+v*s),x=Math.sqrt(e*e-y*y);let b=0;0===h&&0===a?b=.5/t:h===r&&o===Math.PI&&(b=-.5/t);for(let e=0;e<=t;e++){const r=e/t,a=n+r*i;c.x=-x*Math.cos(a),c.y=y,c.z=x*Math.sin(a),f.push(c.x,c.y,c.z),d.copy(c).normalize(),p.push(d.x,d.y,d.z),m.push(r+b,1-v),g.push(l++)}u.push(g)}for(let e=0;e<r;e++)for(let n=0;n<t;n++){const t=u[e][n+1],i=u[e][n],s=u[e+1][n],l=u[e+1][n+1];(0!==e||a>0)&&h.push(t,i,l),(e!==r-1||o<Math.PI)&&h.push(i,s,l)}this.setIndex(h),this.setAttribute("position",new tD(f,3)),this.setAttribute("normal",new tD(p,3)),this.setAttribute("uv",new tD(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iK(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class iZ extends nY{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new iZ(e.radius,e.detail)}}class iJ extends tq{constructor(e=1,t=.4,r=12,n=48,i=2*Math.PI,a=0,s=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:r,tubularSegments:n,arc:i,thetaStart:a,thetaLength:s},r=Math.floor(r),n=Math.floor(n);const o=[],l=[],u=[],c=[],d=new Q,h=new Q,f=new Q;for(let o=0;o<=r;o++){const p=a+o/r*s;for(let a=0;a<=n;a++){const s=a/n*i;h.x=(e+t*Math.cos(p))*Math.cos(s),h.y=(e+t*Math.cos(p))*Math.sin(s),h.z=t*Math.sin(p),l.push(h.x,h.y,h.z),d.x=e*Math.cos(s),d.y=e*Math.sin(s),f.subVectors(h,d).normalize(),u.push(f.x,f.y,f.z),c.push(a/n),c.push(o/r)}}for(let e=1;e<=r;e++)for(let t=1;t<=n;t++){const r=(n+1)*e+t-1,i=(n+1)*(e-1)+t-1,a=(n+1)*(e-1)+t,s=(n+1)*e+t;o.push(r,i,s),o.push(i,a,s)}this.setIndex(o),this.setAttribute("position",new tD(l,3)),this.setAttribute("normal",new tD(u,3)),this.setAttribute("uv",new tD(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iJ(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class iQ extends tq{constructor(e=1,t=.4,r=64,n=8,i=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:r,radialSegments:n,p:i,q:a},r=Math.floor(r),n=Math.floor(n);const s=[],o=[],l=[],u=[],c=new Q,d=new Q,h=new Q,f=new Q,p=new Q,m=new Q,g=new Q;for(let s=0;s<=r;++s){const y=s/r*i*Math.PI*2;v(y,i,a,e,h),v(y+.01,i,a,e,f),m.subVectors(f,h),g.addVectors(f,h),p.crossVectors(m,g),g.crossVectors(p,m),p.normalize(),g.normalize();for(let e=0;e<=n;++e){const i=e/n*Math.PI*2,a=-t*Math.cos(i),f=t*Math.sin(i);c.x=h.x+(a*g.x+f*p.x),c.y=h.y+(a*g.y+f*p.y),c.z=h.z+(a*g.z+f*p.z),o.push(c.x,c.y,c.z),d.subVectors(c,h).normalize(),l.push(d.x,d.y,d.z),u.push(s/r),u.push(e/n)}}for(let e=1;e<=r;e++)for(let t=1;t<=n;t++){const r=(n+1)*(e-1)+(t-1),i=(n+1)*e+(t-1),a=(n+1)*e+t,o=(n+1)*(e-1)+t;s.push(r,i,o),s.push(i,a,o)}function v(e,t,r,n,i){let a=Math.cos(e),s=Math.sin(e),o=r/t*e,l=Math.cos(o);i.x=n*(2+l)*.5*a,i.y=n*(2+l)*s*.5,i.z=n*Math.sin(o)*.5}this.setIndex(s),this.setAttribute("position",new tD(o,3)),this.setAttribute("normal",new tD(l,3)),this.setAttribute("uv",new tD(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iQ(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class i0 extends tq{constructor(e=new ic(new Q(-1,-1,0),new Q(-1,1,0),new Q(1,1,0)),t=64,r=1,n=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:r,radialSegments:n,closed:i};const a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const s=new Q,o=new Q,l=new Z;let u=new Q;const c=[],d=[],h=[],f=[];function p(i){u=e.getPointAt(i/t,u);let l=a.normals[i],h=a.binormals[i];for(let e=0;e<=n;e++){let t=e/n*Math.PI*2,i=Math.sin(t),a=-Math.cos(t);o.x=a*l.x+i*h.x,o.y=a*l.y+i*h.y,o.z=a*l.z+i*h.z,o.normalize(),d.push(o.x,o.y,o.z),s.x=u.x+r*o.x,s.y=u.y+r*o.y,s.z=u.z+r*o.z,c.push(s.x,s.y,s.z)}}(function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let r=0;r<=n;r++)l.x=e/t,l.y=r/n,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=n;t++){let r=(n+1)*(e-1)+(t-1),i=(n+1)*e+(t-1),a=(n+1)*e+t,s=(n+1)*(e-1)+t;f.push(r,i,s),f.push(i,a,s)}}()})(),this.setIndex(f),this.setAttribute("position",new tD(c,3)),this.setAttribute("normal",new tD(d,3)),this.setAttribute("uv",new tD(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){let e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new i0(new iy[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class i1 extends tq{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],r=new Set,n=new Q,i=new Q;if(null!==e.index){const a=e.attributes.position,s=e.index;let o=e.groups;0===o.length&&(o=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=o.length;e<l;++e){const l=o[e],u=l.start,c=l.count;for(let e=u,o=u+c;e<o;e+=3)for(let o=0;o<3;o++){const l=s.getX(e+o),u=s.getX(e+(o+1)%3);n.fromBufferAttribute(a,l),i.fromBufferAttribute(a,u),!0===i2(n,i,r)&&(t.push(n.x,n.y,n.z),t.pu
1sh(i.x,i.y,i.z))}}}else{const a=e.attributes.position;for(let e=0,s=a.count/3;e<s;e++)for(let s=0;s<3;s++){const o=3*e+s,l=3*e+(s+1)%3;n.fromBufferAttribute(a,o),i.fromBufferAttribute(a,l),!0===i2(n,i,r)&&(t.push(n.x,n.y,n.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new tD(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function i2(e,t,r){let n=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==r.has(n)&&!0!==r.has(i)&&(r.add(n),r.add(i),!0)}var i3=Object.freeze({__proto__:null,BoxGeometry:nG,CapsuleGeometry:nH,CircleGeometry:nW,ConeGeometry:nq,CylinderGeometry:nX,DodecahedronGeometry:n$,EdgesGeometry:n0,ExtrudeGeometry:iV,IcosahedronGeometry:iH,LatheGeometry:iW,OctahedronGeometry:iX,PlaneGeometry:iq,PolyhedronGeometry:nY,RingGeometry:iY,ShapeGeometry:i$,SphereGeometry:iK,TetrahedronGeometry:iZ,TorusGeometry:iJ,TorusKnotGeometry:iQ,TubeGeometry:i0,WireframeGeometry:i1});class i4 extends tJ{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new e2(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}function i5(e){let t={};for(let r in e)for(let n in t[r]={},e[r]){let i=e[r][n];if(i8(i))i.isRenderTargetTexture?(D("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[r][n]=null):t[r][n]=i.clone();else if(Array.isArray(i))if(i8(i[0])){let e=[];for(let t=0,r=i.length;t<r;t++)e[t]=i[t].clone();t[r][n]=e}else t[r][n]=i.slice();else t[r][n]=i}return t}function i6(e){let t={};for(let r=0;r<e.length;r++){let n=i5(e[r]);for(let e in n)t[e]=n[e]}return t}function i8(e){return e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture||e.isQuaternion)}function i9(e){let t=e.getRenderTarget();return null===t?e.outputColorSpace:!0===t.isXRRenderTarget?t.texture.colorSpace:es.workingColorSpace}let i7={clone:i5,merge:i6};class ae extends tJ{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",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,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=i5(e.uniforms),this.uniformsGroups=function(e){let t=[];for(let r=0;r<e.length;r++)t.push(e[r].clone());return t}(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);for(let r in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){let n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}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 r={};for(let e in this.extensions)!0===this.extensions[e]&&(r[e]=!0);return Object.keys(r).length>0&&(t.extensions=r),t}fromJSON(e,t){if(super.fromJSON(e,t),void 0!==e.uniforms)for(let r in e.uniforms){let n=e.uniforms[r];switch(this.uniforms[r]={},n.type){case"t":this.uniforms[r].value=t[n.value]||null;break;case"c":this.uniforms[r].value=new e2().setHex(n.value);break;case"v2":this.uniforms[r].value=new Z().fromArray(n.value);break;case"v3":this.uniforms[r].value=new Q().fromArray(n.value);break;case"v4":this.uniforms[r].value=new eg().fromArray(n.value);break;case"m3":this.uniforms[r].value=new er().fromArray(n.value);break;
vendor: 12,629 bytes, line 1
1case"m4":this.uniforms[r].value=new e_().fromArray(n.value);break;default:this.uniforms[r].value=n.value}}if(void 0!==e.defines&&(this.defines=e.defines),void 0!==e.vertexShader&&(this.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(this.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(this.glslVersion=e.glslVersion),void 0!==e.extensions)for(let t in e.extensions)this.extensions[t]=e.extensions[t];return void 0!==e.lights&&(this.lights=e.lights),void 0!==e.clipping&&(this.clipping=e.clipping),this}}class at extends ae{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class ar extends tJ{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new e2(0xffffff),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new e2(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new eO,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class an extends ar{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Z(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return X(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new e2(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new e2(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new e2(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class ai extends tJ{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new e2(0xffffff),this.specular=new e2(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new e2(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new eO,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,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.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class aa extends tJ{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new e2(0xffffff),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new e2(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class as extends tJ{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class ao extends tJ{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new e2(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new e2(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new eO,this.combine=0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,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.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,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.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class al extends tJ{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,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}}class au extends tJ{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}}
1class ac extends tJ{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new e2(0xffffff),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ad extends ng{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function ah(e,t){return e&&e.constructor!==t?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function af(e){let t=e.length,r=Array(t);for(let e=0;e!==t;++e)r[e]=e;return r.sort(function(t,r){return e[t]-e[r]}),r}function ap(e,t,r){let n=e.length,i=new e.constructor(n);for(let a=0,s=0;s!==n;++a){let n=r[a]*t;for(let r=0;r!==t;++r)i[s++]=e[n+r]}return i}function am(e,t,r,n){let i=1,a=e[0];for(;void 0!==a&&void 0===a[n];)a=e[i++];if(void 0===a)return;let s=a[n];if(void 0!==s)if(Array.isArray(s))do void 0!==(s=a[n])&&(t.push(a.time),r.push(...s)),a=e[i++];while(void 0!==a)else if(void 0!==s.toArray)do void 0!==(s=a[n])&&(t.push(a.time),s.toArray(r,r.length)),a=e[i++];while(void 0!==a)else do void 0!==(s=a[n])&&(t.push(a.time),r.push(s)),a=e[i++];while(void 0!==a)}class ag{constructor(e,t,r,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(r),this.sampleValues=t,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,r=this._cachedIndex,n=t[r],i=t[r-1];n:{i:{let a;a:{s:if(!(e<n)){for(let a=r+2;;){if(void 0===n){if(e<i)break s;return r=t.length,this._cachedIndex=r,this.copySampleValue_(r-1)}if(r===a)break;if(i=n,e<(n=t[++r]))break i}a=t.length;break a}if(!(e>=i)){let s=t[1];e<s&&(r=2,i=s);for(let a=r-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(r===a)break;if(n=i,e>=(i=t[--r-1]))break i}a=r,r=0;break a}break n}for(;r<a;){let n=r+a>>>1;e<t[n]?a=n:r=n+1}if(n=t[r],void 0===(i=t[r-1]))return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===n)return r=t.length,this._cachedIndex=r,this.copySampleValue_(r-1)}this._cachedIndex=r,this.intervalChanged_(r,i,n)}return this.interpolate_(r,i,e,n)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,r=this.sampleValues,n=this.valueSize,i=e*n;for(let e=0;e!==n;++e)t[e]=r[i+e];return t}interpolate_(){throw Error("THREE.Interpolant: Call to abstract method.")}intervalChanged_(){}}class av extends ag{constructor(e,t,r,n){super(e,t,r,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,r){let n=this.parameterPositions,i=e-2,a=e+1,s=n[i],o=n[a];if(void 0===s)switch(this.getSettings_().endingStart){case 2401:i=e,s=2*t-r;break;case 2402:i=n.length-2,s=t+n[i]-n[i+1];break;default:i=e,s=r}if(void 0===o)switch(this.getSettings_().endingEnd){case 2401:a=e,o=2*r-t;break;case 2402:a=1,o=r+n[1]-n[0];break;default:a=e-1,o=t}let l=(r-t)*.5,u=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-r),this._offsetPrev=i*u,this._offsetNext=a*u}interpolate_(e,t,r,n){let i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this._offsetPrev,c=this._offsetNext,d=this._weightPrev,h=this._weightNext,f=(r-t)/(n-t),p=f*f,m=p*f,g=-d*m+2*d*p-d*f,v=(1+d)*m+(-1.5-2*d)*p+(-.5+d)*f+1,y=(-1-h)*m+(1.5+h)*p+.5*f,x=h*m-h*p;for(let e=0;e!==s;++e)i[e]=g*a[u+e]+v*a[l+e]+y*a[o+e]+x*a[c+e];return i}}class ay extends ag{constructor(e,t,r,n){super(e,t,r,n)}interpolate_(e,t,r,n){let i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=(r-t)/(n-t),c=1-u;for(let e=0;e!==s;++e)i[e]=a[l+e]*c+a[o+e]*u;return i}}class ax extends ag{constructor(e,t,r,n){super(e,t,r,n)}interpolate_(e){return this.copySampleValue_(e-1)}}class ab extends ag{interpolate_(e,t,r,n){let i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this.inTangents,c=this.outTangents;if(!u||!c){let e=(r-t)/(n-t),u=1-e;for(let t=0;t!==s;++t)i[t]=a[l+t]*u+a[o+t]*e;return i}let d=2*s,h=e-1;for(let f=0;f!==s;++f){let s,p,m,g,v,y=a[l+f],x=a[o+f],b=h*d+2*f,_=c[b],S=c[b+1],w=e*d+2*f,M=u[w],T=u[w+1],E=(r-t)/(n-t);for(let e=0;e<8;e++){p=(s=E*E)*E;let e=(v=(g=(m=1-E)*m)*m)*t+3*g*E*_+3*m*s*M+p*n-r;if(1e-10>Math.abs(e))break;let i=3*g*(_-t)+6*m*E*(M-_)+3*s*(n-M);if(1e-10>Math.abs(i))break;E-=e/i,E=Math.max(0,Math.min(1,E))}i[f]=v*y+3*g*E*S+3*m*s*T+p*x}return i}}class a_{constructor(e,t,r,n){if(void 0===e)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ah(t,this.TimeBufferType),this.values=ah(r,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}static toJSON(e){let t,r=e.constructor;if(r.toJSON!==this.toJSON)t=r.toJSON(e);else{t={name:e.name,times:ah(e.times,Array),values:ah(e.values,Array)};let r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t}InterpolantFactoryMethodDiscrete(e){return new ax(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new ay(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new av(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){let t=new ab(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.inTangents=this.settings.inTangents,t.outTangents=this.settings.outTangents),t}setInterpolation(e){let t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth;break;case 2303:t=this.InterpolantFactoryMethodBezier}if(void 0===t){let t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(t);return D("KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302;case this.InterpolantFactoryMethodBezier:return 2303}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){let t=this.times;for(let r=0,n=t.length;r!==n;++r)t[r]+=e}return this}scale(e){if(1!==e){let t=this.times;for(let r=0,n=t.length;r!==n;++r)t[r]*=e}return this}trim(e,t){let r=this.times,n=r.length,i=0,a=n-1;for(;i!==n&&r[i]<e;)++i;for(;-1!==a&&r[a]>t;)--a;if(++a,0!==i||a!==n){i>=a&&(i=(a=Math.max(a,1))-1);let e=this.getValueSize();this.times=r.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&&(k("KeyframeTrack: Invalid value size in track.",this),e=!1);let r=this.times,n=this.values,i=r.length;0===i&&(k("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){let n=r[t];if("number"==typeof n&&isNaN(n)){k("KeyframeTrack: Time is not a valid number.",this,t,n),e=!1;break}if(null!==a&&a>n){k("KeyframeTrack: Out of order keys.",this,t,n,a),e=!1;break}a=n}if(void 0!==n&&C(n))for(let t=0,r=n.length;t!==r;++t){let r=n[t];if(isNaN(r)){k("KeyframeTrack: Value is not a valid number.",this,t,r),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),r=this.getValueSize(),n=2302===this.getInterpolation(),i=e.length-1,a=1;for(let s=1;s<i;++s){let i=!1,o=e[s];if(o!==e[s+1]&&(1!==s||o!==e[0]))if(n)i=!0;else{let e=s*r,n=e-r,a=e+r;for(let s=0;s!==r;++s){let r=t[e+s];if(r!==t[n+s]||r!==t[a+s]){i=!0;break}}}if(i){if(s!==a){e[a]=e[s];let n=s*r,i=a*r;for(let e=0;e!==r;++e)t[i+e]=t[n+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*r,n=a*r,s=0;s!==r;++s)t[n+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*r)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),r=new this.constructor(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}a_.prototype.ValueTypeName="",a_.prototype.TimeBufferType=Float32Array,a_.prototype.ValueBufferType=Float32Array,a_.prototype.DefaultInterpolation=2301;class aS extends a_{constructor(e,t,r){super(e,t,r)}}aS.prototype.ValueTypeName="bool",aS.prototype.ValueBufferType=Array,aS.prototype.DefaultInterpolation=2300,aS.prototype.InterpolantFactoryMethodLinear=void 0,aS.prototype.InterpolantFactoryMethodSmooth=void 0;class aw extends a_{constructor(e,t,r,n){super(e,t,r,n)}}aw.prototype.ValueTypeName="color";class aM extends a_{constructor(e,t,r,n){super(e,t,r,n)}}aM.prototype.ValueTypeName="number";class aT extends ag{constructor(e,t,r,n){super(e,t,r,n)}interpolate_(e,t,r,n){let i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(r-t)/(n-t),l=e*s;for(let e=l+s;
1l!==e;l+=4)J.slerpFlat(i,0,a,l-s,a,l,o);return i}}class aE extends a_{constructor(e,t,r,n){super(e,t,r,n)}InterpolantFactoryMethodLinear(e){return new aT(this.times,this.values,this.getValueSize(),e)}}aE.prototype.ValueTypeName="quaternion",aE.prototype.InterpolantFactoryMethodSmooth=void 0;class aA extends a_{constructor(e,t,r){super(e,t,r)}}aA.prototype.ValueTypeName="string",aA.prototype.ValueBufferType=Array,aA.prototype.DefaultInterpolation=2300,aA.prototype.InterpolantFactoryMethodLinear=void 0,aA.prototype.InterpolantFactoryMethodSmooth=void 0;class aC extends a_{constructor(e,t,r,n){super(e,t,r,n)}}aC.prototype.ValueTypeName="vector";class aP{constructor(e="",t=-1,r=[],n=2500){this.name=e,this.tracks=r,this.duration=t,this.blendMode=n,this.uuid=W(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){let t=[],r=e.tracks,n=1/(e.fps||1);for(let e=0,i=r.length;e!==i;++e)t.push((function(e){if(void 0===e.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return aM;case"vector":case"vector2":case"vector3":case"vector4":return aC;case"color":return aw;case"quaternion":return aE;case"bool":case"boolean":return aS;case"string":return aA}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){let t=[],r=[];am(e.keys,t,r,"value"),e.times=t,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)})(r[e]).scale(n));let i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i.userData=JSON.parse(e.userData||"{}"),i}static toJSON(e){let t=[],r=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let e=0,n=r.length;e!==n;++e)t.push(a_.toJSON(r[e]));return n}static CreateFromMorphTargetSequence(e,t,r,n){let i=t.length,a=[];for(let e=0;e<i;e++){let s=[],o=[];s.push((e+i-1)%i,e,(e+1)%i),o.push(0,1,0);let l=af(s);s=ap(s,1,l),o=ap(o,1,l),n||0!==s[0]||(s.push(i),o.push(o[0])),a.push(new aM(".morphTargetInfluences["+t[e].name+"]",s,o).scale(1/r))}return new this(e,-1,a)}static findByName(e,t){let r=e;Array.isArray(e)||(r=e.geometry&&e.geometry.animations||e.animations);for(let e=0;e<r.length;e++)if(r[e].name===t)return r[e];return null}static CreateClipsFromMorphTargetSequences(e,t,r){let n={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,r=e.length;t<r;t++){let r=e[t],a=r.name.match(i);if(a&&a.length>1){let e=a[1],t=n[e];t||(n[e]=t=[]),t.push(r)}}let a=[];for(let e in n)a.push(this.CreateFromMorphTargetSequence(e,n[e],t,r));return a}resetDuration(){let e=this.tracks,t=0;for(let r=0,n=e.length;r!==n;++r){let e=this.tracks[r];t=Math.max(t,e.times[e.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){let e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());let t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}}let aI={enabled:!1,files:{},add:function(e,t){!1===this.enabled||aO(e)||(this.files[e]=t)},get:function(e){if(!1!==this.enabled&&!aO(e))return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function aO(e){try{let t=e.slice(e.indexOf(":")+1),r=new URL(t);return"blob:"===r.protocol}catch(e){return!1}}class aR{constructor(e,t,r){let n;const i=this;let a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=r,this._abortController=null,this.itemStart=function(e){o++,!1===a&&void 0!==i.onStart&&i.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==i.onProgress&&i.onProgress(e,s,o),s===o&&(a=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return(e=e.normalize("NFC"),n)?n(e):e},this.setURLModifier=function(e){return n=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){let t=l.indexOf(e);return -1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,r=l.length;t<r;t+=2){let r=l[t],n=l[t+1];if(r.global&&(r.lastIndex=0),r.test(e))return n}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}let aL=new aR;class aN{constructor(e){this.manager=void 0!==e?e:aL,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(e,t){let r=this;return new Promise(function(n,i){r.load(e,n,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}}aN.DEFAULT_MATERIAL_NAME="__DEFAULT";let aD={};
1class ak extends Error{constructor(e,t){super(e),this.response=t}}class aU extends aN{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,r,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let i=aI.get(`file:${e}`);if(void 0!==i){this.manager.itemStart(e),setTimeout(()=>{t&&t(i),this.manager.itemEnd(e)},0);return}if(void 0!==aD[e])return void aD[e].push({onLoad:t,onProgress:r,onError:n});aD[e]=[],aD[e].push({onLoad:t,onProgress:r,onError:n});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&D("FileLoader: HTTP Status 0 received."),"u"<typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;let r=aD[e],n=t.body.getReader(),i=t.headers.get("X-File-Size")||t.headers.get("Content-Length"),a=i?parseInt(i):0,s=0!==a,o=0;return new Response(new ReadableStream({start(e){!function t(){n.read().then(({done:n,value:i})=>{if(n)e.close();else{let n=new ProgressEvent("progress",{lengthComputable:s,loaded:o+=i.byteLength,total:a});for(let e=0,t=r.length;e<t;e++){let t=r[e];t.onProgress&&t.onProgress(n)}e.enqueue(i),t()}},t=>{e.error(t)})}()}}))}throw new ak(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>new DOMParser().parseFromString(e,s));case"json":return e.json();default:if(""===s)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(s),r=new TextDecoder(t&&t[1]?t[1].toLowerCase():void 0);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{aI.add(`file:${e}`,t);let r=aD[e];delete aD[e];for(let e=0,n=r.length;e<n;e++){let n=r[e];n.onLoad&&n.onLoad(t)}}).catch(t=>{let r=aD[e];if(void 0===r)throw this.manager.itemError(e),t;delete aD[e];for(let e=0,n=r.length;e<n;e++){let n=r[e];n.onError&&n.onError(t)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let aF=new WeakMap;class az extends aN{constructor(e){super(e)}load(e,t,r,n){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let i=this,a=aI.get(`image:${e}`);if(void 0!==a){if(!0===a.complete)i.manager.itemStart(e),setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0);else{let e=aF.get(a);void 0===e&&(e=[],aF.set(a,e)),e.push({onLoad:t,onError:n})}return a}let s=P("img");function o(){u(),t&&t(this);let r=aF.get(this)||[];for(let e=0;e<r.length;e++){let t=r[e];t.onLoad&&t.onLoad(this)}aF.delete(this),i.manager.itemEnd(e)}function l(t){u(),n&&n(t),aI.remove(`image:${e}`);let r=aF.get(this)||[];for(let e=0;e<r.length;e++){let n=r[e];n.onError&&n.onError(t)}aF.delete(this),i.manager.itemError(e),i.manager.itemEnd(e)}function u(){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",o,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),aI.add(`image:${e}`,s),i.manager.itemStart(e),s.src=e,s}}class aj extends eY{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new e2(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}}class aB extends aj{constructor(e,t,r){super(e,r),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(eY.DEFAULT_UP),this.updateMatrix(),this.groundColor=new e2(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}toJSON(e){let t=super.toJSON(e);return t.object.groundColor=this.groundColor.getHex(),t}}let aV=new e_,aG=new Q,aH=new Q;class aW{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Z(512,512),this.mapType=1009,this.map=null,this.mapPass=null,this.matrix=new e_,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new r6,this._frameExtents=new Z(1,1),this._viewportCount=1,this._viewports=[new eg(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,r=this.matrix;aG.setFromMatrixPosition(e.matrixWorld),t.position.copy(aG),aH.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(aH),t.updateMatrixWorld(),aV.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(aV,t.coordinateSystem,t.reversedDepth),2001===t.coordinateSystem||t.reversedDepth?r.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(aV)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.n
vendor: 11,883 bytes, line 1
1ormalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return 1!==this.intensity&&(e.intensity=this.intensity),0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}let aX=new Q,aq=new J,aY=new Q;class a$ extends eY{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new e_,this.projectionMatrix=new e_,this.projectionMatrixInverse=new e_,this.coordinateSystem=2e3,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(aX,aq,aY),1===aY.x&&1===aY.y&&1===aY.z?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(aX,aq,aY.set(1,1,1)).invert()}updateWorldMatrix(e,t,r=!1){super.updateWorldMatrix(e,t,r),this.matrixWorld.decompose(aX,aq,aY),1===aY.x&&1===aY.y&&1===aY.z?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(aX,aq,aY.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}}let aK=new Q,aZ=new Z,aJ=new Z;class aQ extends a${constructor(e=50,t=1,r=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=n,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=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=2*H*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(.5*G*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*H*Math.atan(Math.tan(.5*G*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,r){aK.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(aK.x,aK.y).multiplyScalar(-e/aK.z),aK.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(aK.x,aK.y).multiplyScalar(-e/aK.z)}getViewSize(e,t){return this.getViewBounds(e,aZ,aJ),t.subVectors(aJ,aZ)}setViewOffset(e,t,r,n,i,a){this.aspect=e/t,null===this.view&&(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=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(.5*G*this.fov)/this.zoom,r=2*t,n=this.aspect*r,i=-.5*n,a=this.view;if(null!==this.view&&this.view.enabled){let e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*n/e,t-=a.offsetY*r/s,n*=a.width/e,r*=a.height/s}let s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+n,t,t-r,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,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class a0 extends aW{constructor(){super(new aQ(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){let t=this.camera,r=2*H*e.angle*this.focus,n=this.mapSize.width/this.mapSize.height*this.aspect,i=e.distance||t.far;(r!==t.fov||n!==t.aspect||i!==t.far)&&(t.fov=r,t.aspect=n,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class a1 extends aj{constructor(e,t,r=0,n=Math.PI/3,i=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(eY.DEFAULT_UP),this.updateMatrix(),this.target=new eY,this.distance=r,this.angle=n,this.penumbra=i,this.decay=a,this.map=null,this.shadow=new a0}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}}class a2 extends aW{constructor(){super(new aQ(90,1,.5,500)),this.isPointLightShadow=!0}}class a3 extends aj{constructor(e,t,r=0,n=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=n,this.shadow=new a2}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}}class a4 extends a${constructor(e=-1,t=1,r=1,n=-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=r,this.bottom=n,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=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,r,n,i,a){null===this.view&&(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=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,n=(this.top+this.bottom)/2,i=r-e,a=r+e,s=n+t,o=n-t;if(null!==this.view&&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,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,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,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}class a5 extends aW{constructor(){super(new a4(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class a6 extends aj{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(eY.DEFAULT_UP),this.updateMatrix(),this.target=new eY,this.shadow=new a5}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}}class a8 extends aj{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class a9 extends aj{constructor(e,t,r=10,n=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=r,this.height=n}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){let t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class a7{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Q)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){let r=e.x,n=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*n),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*r),t.addScaledVector(a[4],r*n*1.092548),t.addScaledVector(a[5],n*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],r*i*1.092548),t.addScaledVector(a[8],.546274*(r*r-n*n)),t}getIrradianceAt(e,t){let r=e.x,n=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*n),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*r),t.addScaledVector(a[4],.858086*r*n),t.addScaledVector(a[5],.858086*n*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*r*i),t.addScaledVector(a[8],.429043*(r*r-n*n)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let r=0;r<9;r++)this.coefficients[r].addScaledVector(e.coefficients[r],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let r=0;r<9;r++)this.coefficients[r].lerp(e.coefficients[r],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){let r=this.coefficients;for(let n=0;n<9;n++)r[n].fromArray(e,t+3*n);return this}toArray(e=[],t=0){let r=this.coefficients;for(let n=0;n<9;n++)r[n].toArray(e,t+3*n);return e}static getBasisAt(e,t){let r=e.x,n=e.y,i=e.z;t[0]=.282095,t[1]=.488603*n,t[2]=.488603*i,t[3]=.488603*r,t[4]=1.092548*r*n,t[5]=1.092548*n*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*r*i,t[8]=.546274*(r*r-n*n)}}class se extends aj{constructor(e=new a7,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){let t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}let st={};class sr extends aN{constructor(e){super(e),this.textures={}}load(e,t,r,n){let i=this,a=new aU(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(r){try{t(i.parse(JSON.parse(r)))}catch(t){n?n(t):k(t),i.manager.itemError(e)}},r,n)}parse(e){let t=this.createMaterialFromType(e.type);return t.fromJSON(e,this.textures),t}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return sr.createMaterialFromType(e)}static createMaterialFromType(e){let t,r={ShadowMaterial:i4,SpriteMaterial:tQ,RawShaderMaterial:at,ShaderMaterial:ae,PointsMaterial:nI,MeshPhysicalMaterial:an,MeshStandardMaterial:ar,MeshPhongMaterial:ai,MeshToonMaterial:aa,MeshNormalMaterial:as,MeshLambertMaterial:ao,MeshDepthMaterial:al,MeshDistanceMaterial:au,Me
1shBasicMaterial:rm,MeshMatcapMaterial:ac,LineDashedMaterial:ad,LineBasicMaterial:ng,Material:tJ,...st}[e];return void 0===r?(U(`MaterialLoader: Unknown material type "${e}". Use .registerMaterial() before starting the deserialization process.`),t=new tJ):t=new r,t}static registerMaterial(e,t){st[e]=t}}class sn{static extractUrlBase(e){let t=e.lastIndexOf("/");return -1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e))?e:t+e}}class si extends tq{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class sa extends aN{constructor(e){super(e)}load(e,t,r,n){let i=this,a=new aU(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(r){try{t(i.parse(JSON.parse(r)))}catch(t){n?n(t):k(t),i.manager.itemError(e)}},r,n)}parse(e){let t={},r={};function n(e,n){if(void 0!==t[n])return t[n];let i=e.interleavedBuffers[n],a=function(e,t){if(void 0!==r[t])return r[t];let n=new Uint32Array(e.arrayBuffers[t]).buffer;return r[t]=n,n}(e,i.buffer),s=new tY(A(i.type,a),i.stride);return s.uuid=i.uuid,t[n]=s,s}let i=e.isInstancedBufferGeometry?new si:new tq,a=e.data.index;if(void 0!==a){let e=A(a.type,a.array);i.setIndex(new tR(e,1))}let s=e.data.attributes;for(let t in s){let r,a=s[t];if(a.isInterleavedBufferAttribute)r=new tK(n(e.data,a.data),a.itemSize,a.offset,a.normalized);else{let e=A(a.type,a.array);r=new(a.isInstancedBufferAttribute?rH:tR)(e,a.itemSize,a.normalized)}void 0!==a.name&&(r.name=a.name),void 0!==a.usage&&r.setUsage(a.usage),i.setAttribute(t,r)}let o=e.data.morphAttributes;if(o)for(let t in o){let r=o[t],a=[];for(let t=0,i=r.length;t<i;t++){let i,s=r[t];i=s.isInterleavedBufferAttribute?new tK(n(e.data,s.data),s.itemSize,s.offset,s.normalized):new tR(A(s.type,s.array),s.itemSize,s.normalized),void 0!==s.name&&(i.name=s.name),a.push(i)}i.morphAttributes[t]=a}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);let l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){let t=l[e];i.addGroup(t.start,t.count,t.materialIndex)}let u=e.data.boundingSphere;return void 0!==u&&(i.boundingSphere=new tz().fromJSON(u)),e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}let ss={},so={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306},sl={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},su={NearestFilter:1003,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:1005,LinearFilter:1006,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:1008},sc=new WeakMap;class sd{static getContext(){return void 0===n&&(n=new(window.AudioContext||window.webkitAudioContext)),n}static setContext(e){n=e}}let sh=new e_,sf=new e_,sp=new e_;class sm extends eY{constructor(e,t,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const n=new aQ(-90,1,e,t);n.layers=this.layers,this.add(n);const i=new aQ(-90,1,e,t);i.layers=this.layers,this.add(i);const a=new aQ(-90,1,e,t);a.layers=this.layers,this.add(a);const s=new aQ(-90,1,e,t);s.layers=this.layers,this.add(s);const o=new aQ(-90,1,e,t);o.layers=this.layers,this.add(o);const l=new aQ(-90,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[r,n,i,a,s,o]=t;for(let e of t)this.remove(e);if(2e3===e)r.up.set(0,1,0),r.lookAt(1,0,0),n.up.set(0,1,0),n.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),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else if(2001===e)r.up.set(0,-1,0),r.lookAt(-1,0,0),n.up.set(0,-1,0),n.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),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.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){null===this.parent&&this.updateMatrixWorld();let{renderTarget:r,activeMipmapLevel:n}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,s,o,l,u]=this.children,c=e.getRenderTarget(),d=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),f=e.xr.enabled;e.xr.enabled=!1;let p=r.texture.generateMipmaps;r.texture.generateMipmaps=!1;let m=!1;m=!0===e.isWebGLRenderer?e.state.buffers.depth.getReversed():e.reversedDepthBuffer,e.setRenderTarget(r,0,n),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,i),e.setRenderTarget(r,1,n),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,a),e.setRenderTarget(r,2,n),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,s),e.setRenderTarget(r,3,n),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,o),e.setRenderTarget(r,4,n),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,l),r.texture.generateMipmaps=p,e.setRenderTarget(r,5,n),m&&!1===e.autoClear&&e.clearDepth(),e.render(t,u),e.setRenderTarget(c,d,h),e.xr.enabled=f,r.texture.needsPMREMUpdate=!0}}class sg extends aQ{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class sv{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,void 0!==e.hidden&&(this._pageVisibilityHandler=sy.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){null!==this._pageVisibilityHandler&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return null!==this._pageVisibilityHandler&&!0===this._document.hidden?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(void 0!==e?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function sy(){!1===this._document.hidden&&this.reset()}let sx=new Q,sb=new J,s_=new Q,sS=new Q,sw=new Q;class sM extends eY{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl
1=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void D("Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void D("Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){return!1===this.hasPlaybackControl?void D("Audio: this Audio has no playback control."):(!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this)}stop(e=0){return!1===this.hasPlaybackControl?void D("Audio: this Audio has no playback control."):(this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this)}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(!1!==this._connected){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,!0===this.isPlaying&&void 0!==this.source.detune&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){return!1===this.hasPlaybackControl?void D("Audio: this Audio has no playback control."):(this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this)}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return!1===this.hasPlaybackControl?(D("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){return!1===this.hasPlaybackControl?void D("Audio: this Audio has no playback control."):(this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this)}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return(super.copy(e,t),"buffer"!==e.sourceType)?D("Audio: Audio source type cannot be copied."):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice()),this}clone(e){return new this.constructor(this.listener).copy(this,e)}}let sT=new Q,sE=new J,sA=new Q,sC=new Q;class sP{constructor(e,t,r){let n,i,a;switch(this.binding=e,this.valueSize=r,t){case"quaternion":n=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*r),this._workIndex=5;break;case"string":case"bool":n=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=Array(5*r);break;default:n=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*r)}this._mixBufferRegion=n,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){let r=this.buffer,n=this.valueSize,i=e*n+n,a=this.cumulativeWeight;if(0===a){for(let e=0;e!==n;++e)r[i+e]=r[e];a=t}else{a+=t;let e=t/a;this._mixBufferRegion(r,i,0,e,n)}this.cumulativeWeight=a}accumulateAdditive(e){let t=this.buffer,r=this.valueSize,n=r*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,n,0,e,r),this.cumulativeWeightAdditive+=e}apply(e){let t=this.valueSize,r=this.buffer,n=e*t+t,i=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){let e=t*this._origIndex;this._mixBufferRegion(r,n,e,1-i,t)}a>0&&this._mixBufferRegionAdditive(r,n,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(r[e]!==r[e+t]){s.setValue(r,n);break}}saveOriginalState(){let e=this.binding,t=this.buffer,r=this.valueSize,n=r*this._origIndex;e.getValue(t,n);for(let e=r;e!==n;++e)t[e]=t[n+e%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;
1for(let r=e;r<t;r++)this.buffer[r]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let r=0;r<this.valueSize;r++)this.buffer[t+r]=this.buffer[e+r]}_select(e,t,r,n,i){if(n>=.5)for(let n=0;n!==i;++n)e[t+n]=e[r+n]}_slerp(e,t,r,n){J.slerpFlat(e,t,e,t,e,r,n)}_slerpAdditive(e,t,r,n,i){let a=this._workIndex*i;J.multiplyQuaternionsFlat(e,a,e,t,e,r),J.slerpFlat(e,t,e,t,e,a,n)}_lerp(e,t,r,n,i){let a=1-n;for(let s=0;s!==i;++s){let i=t+s;e[i]=e[i]*a+e[r+s]*n}}_lerpAdditive(e,t,r,n,i){for(let a=0;a!==i;++a){let i=t+a;e[i]=e[i]+e[r+a]*n}}}let sI="\\[\\]\\.:\\/",sO=RegExp("["+sI+"]","g"),sR="[^"+sI+"]",sL="[^"+sI.replace("\\.","")+"]",sN=RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",sR)+/(WCOD+)?/.source.replace("WCOD",sL)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sR)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sR)+"$"),sD=["material","materials","bones","map"];class sk{constructor(e,t,r){this.path=t,this.parsedPath=r||sk.parseTrackName(t),this.node=sk.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,r){return e&&e.isAnimationObjectGroup?new sk.Composite(e,t,r):new sk(e,t,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(sO,"")}static parseTrackName(e){let t=sN.exec(e);if(null===t)throw Error("THREE.PropertyBinding: Cannot parse trackName: "+e);let r={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){let e=r.nodeName.substring(n+1);-1!==sD.indexOf(e)&&(r.nodeName=r.nodeName.substring(0,n),r.objectName=e)}if(null===r.propertyName||0===r.propertyName.length)throw Error("THREE.PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){let r=e.skeleton.getBoneByName(t);if(void 0!==r)return r}if(e.children){let r=function(e){for(let n=0;n<e.length;n++){let i=e[n];if(i.name===t||i.uuid===t)return i;let a=r(i.children);if(a)return a}return null},n=r(e.children);if(n)return n}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let r=this.resolvedProperty;for(let n=0,i=r.length;n!==i;++n)e[t++]=r[n]}_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 r=this.resolvedProperty;for(let n=0,i=r.length;n!==i;++n)r[n]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let r=this.resolvedProperty;for(let n=0,i=r.length;n!==i;++n)r[n]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){let r=this.resolvedProperty;for(let n=0,i=r.length;n!==i;++n)r[n]=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 e=this.node,t=this.parsedPath,r=t.objectName,n=t.propertyName,i=t.propertyIndex;if(e||(e=sk.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void D("PropertyBinding: No target node found for track: "+this.path+".");if(r){let n=t.objectIndex;switch(r){case"materials":if(!e.material)return void k("PropertyBinding: Can not bind to material as no
1de does not have a material.",this);if(!e.material.materials)return void k("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void k("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===n){n=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void k("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void k("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[r])return void k("PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[r]}if(void 0!==n){if(void 0===e[n])return void k("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[n]}}let a=e[n];if(void 0===a)return void k("PropertyBinding: Trying to update property for track: "+t.nodeName+"."+n+" but it wasn't found.",e);let s=this.Versioning.None;this.targetObject=e,!0===e.isMaterial?s=this.Versioning.NeedsUpdate:!0===e.isObject3D&&(s=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===n){if(!e.geometry)return void k("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void k("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}o=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(o=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(o=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=n;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}sk.Composite=class{constructor(e,t,r){const n=r||sk.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,n)}getValue(e,t){this.bind();let r=this._targetGroup.nCachedObjects_,n=this._bindings[r];void 0!==n&&n.getValue(e,t)}setValue(e,t){let r=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=r.length;n!==i;++n)r[n].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].unbind()}},sk.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},sk.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},sk.prototype.GetterByBindingType=[sk.prototype._getValue_direct,sk.prototype._getValue_array,sk.prototype._getValue_arrayElement,sk.prototype._getValue_toArray],sk.prototype.SetterByBindingTypeAndVersioning=[[sk.prototype._setValue_direct,sk.prototype._setValue_direct_setNeedsUpdate,sk.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[sk.prototype._setValue_array,sk.prototype._setValue_array_setNeedsUpdate,sk.prototype._setValue_array_setMatrixWorldNeedsUpdate],[sk.prototype._setValue_arrayElement,sk.prototype._setValue_arrayElement_setNeedsUpdate,sk.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[sk.prototype._setValue_fromArray,sk.prototype._setValue_fromArray_setNeedsUpdate,sk.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class sU{constructor(e,t,r=null,n=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=r,this.blendMode=n;const i=t.tracks,a=i.length,s=Array(a),o={endingStart:2400,endingEnd:2400};for(let e=0;e!==a;++e){const t=i[e].createInterpolant(null);s[e]=t,t.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._restoreTimeScale=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}
1fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,r=!1){if(e.fadeOut(t),this.fadeIn(t),!0===r){let r=this._clip.duration,n=e._clip.duration;e._restoreTimeScale=e.timeScale,this._restoreTimeScale=this.timeScale,e.warp(1,n/r,t),this.warp(r/n,1,t)}return this}crossFadeTo(e,t,r=!1){return e.crossFadeFrom(this,t,r)}stopFading(){let e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,r){let n=this._mixer,i=n.time,a=this.timeScale,s=this._timeScaleInterpolant;null===s&&(s=n._lendControlInterpolant(),this._timeScaleInterpolant=s);let o=s.parameterPositions,l=s.sampleValues;return o[0]=i,o[1]=i+r,l[0]=e/a,l[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this._restoreTimeScale=null,this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,r,n){if(!this.enabled)return void this._updateWeight(e);let i=this._startTime;if(null!==i){let n=(e-i)*r;n<0||0===r?t=0:(this._startTime=null,t=r*n)}t*=this._updateTimeScale(e);let a=this._updateTime(t),s=this._updateWeight(e);if(s>0){let e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let r=0,n=e.length;r!==n;++r)e[r].evaluate(a),t[r].accumulateAdditive(s);else for(let r=0,i=e.length;r!==i;++r)e[r].evaluate(a),t[r].accumulate(n,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let r=this._weightInterpolant;if(null!==r){let n=r.evaluate(e)[0];t*=n,e>r.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let r=this._timeScaleInterpolant;null!==r&&(t*=r.evaluate(e)[0],e>r.parameterPositions[1]&&(0===t?this.paused=!0:(null!==this._restoreTimeScale&&(t=this._restoreTimeScale),this.timeScale=t),this.stopWarping()))}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,r=this.loop,n=this.time+e,i=this._loopCount,a=2202===r;if(0===e)return -1===i?n:a&&(1&i)==1?t-n:n;if(2200===r){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));o:{if(n>=t)n=t;else if(n<0)n=0;else{this.time=n;break o}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),n>=t||n<0){let r=Math.floor(n/t);n-=t*r,i+=Math.abs(r);let s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=e>0?t:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){let t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:r})}}else this._loopCount=i,this.time=n;if(a&&(1&i)==1)return t-n}return n}_setEndings(e,t,r){let n=this._interpolantSettings;r?(n.endingStart=2401,n.endingEnd=2401):(e?n.endingStart=this.zeroSlopeAtStart?2401:2400:n.endingStart=2402,t?n.endingEnd=this.zeroSlopeAtEnd?2401:2400:n.endingEnd=2402)}_scheduleFading(e,t,r){let n=this._mixer,i=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,o=a.sampleValues;return s[0]=i,o[0]=t,s[1]=i+e,o[1]=r,this}}let sF=new Float32Array(1),sz=0,sj=new e_;class sB{constructor(e,t,r=0,n=1/0){this.ray=new rp(e,t),this.near=r,this.far=n,this.camera=null,this.layers=new eR,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.projectionMatrix.elements[14]).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):k("Raycaster:
1Unsupported camera type: "+t.type)}setFromXRController(e){return sj.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(sj),this}intersectObject(e,t=!0,r=[]){return sG(e,this,r,t),r.sort(sV),r}intersectObjects(e,t=!0,r=[]){for(let n=0,i=e.length;n<i;n++)sG(e[n],this,r,t);return r.sort(sV),r}}function sV(e,t){return e.distance-t.distance}function sG(e,t,r,n){let i=!0;if(e.layers.test(t.layers)&&!1===e.raycast(t,r)&&(i=!1),!0===i&&!0===n){let n=e.children;for(let e=0,i=n.length;e<i;e++)sG(n[e],t,r,!0)}}class sH{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1,D("Clock: This module has been deprecated. Please use THREE.Timer instead.")}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}class sW{static{sW.prototype.isMatrix2=!0}constructor(e,t,r,n){this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,r,n)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let r=0;r<4;r++)this.elements[r]=e[r+t];return this}set(e,t,r,n){let i=this.elements;return i[0]=e,i[2]=t,i[1]=r,i[3]=n,this}}let sX=new Z;class sq{constructor(e=new Z(Infinity,Infinity),t=new Z(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let r=sX.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}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=Infinity,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(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}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}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}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))}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}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,sX).distanceTo(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}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)}}let sY=new Q,s$=new Q,sK=new Q,sZ=new Q,sJ=new Q,sQ=new Q,s0=new Q,s1=new Q,s2=new Q,s3=new e_,s4=new e_,s5=new Q,s6=new e2,s8=new e2,s9=new Q,s7=new Q,oe=new Q,ot=new Q,or=new a$;function on(e,t,r,n,i,a,s){ot.set(i,a,s).unproject(n);let o=t[e];if(void 0!==o){let e=r.getAttribute("position");for(let t=0,r=o.length;t<r;t++)e.setXYZ(o[t],ot.x,ot.y,ot.z)}}let oi=new td,oa=new Q;function os(e,t,r,n){let i=function(e){switch(e){case 1009:case 1010:return{byteLength:1,components:1};case 1012:case 1011:case 1016:return{byteLength:2,components:1};case 1017:case 1018:return{byteLength:2,components:4};case 1014:case 1013:case 1015:return{byteLength:4,components:1};case 35902:case 35899:return{byteLength:4,components:3}}throw Error(`THREE.TextureUtils: Unknown texture type ${e}.`)}(n);switch(r){case 1021:return e*t;
1case 1028:case 1029:return e*t/i.components*i.byteLength;case 1030:case 1031:return e*t*2/i.components*i.byteLength;case 1022:return e*t*3/i.components*i.byteLength;case 1023:case 1033:return e*t*4/i.components*i.byteLength;case 33776:case 33777:case 36196:case 37492:case 37488:case 37489:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case 33778:case 33779:case 37496:case 37490:case 37491:case 37808:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case 35841:case 35843:return Math.max(e,16)*Math.max(t,8)/4;case 35840:case 35842:return Math.max(e,8)*Math.max(t,8)/2;case 37809:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case 37810:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case 37811:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case 37812:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case 37813:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case 37814:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case 37815:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case 37816:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case 37817:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case 37818:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case 37819:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case 37820:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case 37821:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case 36492:case 36494:case 36495:case 36285:case 36286:return Math.ceil(e/4)*Math.ceil(t/4)*16;case 36283:case 36284:return Math.ceil(e/4)*Math.ceil(t/4)*8}throw Error(`Unable to determine texture byte length for ${r} format.`)}"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"185"}})),"u">typeof window&&(window.__THREE__?D("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="185"),e.s(["ACESFilmicToneMapping",0,4,"AddEquation",0,100,"AddOperation",0,2,"AdditiveAnimationBlendMode",0,2501,"AdditiveBlending",0,2,"AgXToneMapping",0,6,"AlphaFormat",0,1021,"AlwaysCompare",0,519,"AlwaysDepth",0,1,"AlwaysStencilFunc",0,519,"AmbientLight",0,a8,"AnimationAction",0,sU,"AnimationClip",0,aP,"AnimationLoader",0,class extends aN{constructor(e){super(e)}load(e,t,r,n){let i=this,a=new aU(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(r){try{t(i.parse(JSON.parse(r)))}catch(t){n?n(t):k(t),i.manager.itemError(e)}},r,n)}parse(e){let t=[];for(let r=0;r<e.length;r++){let n=aP.parse(e[r]);t.push(n)}return t}},"AnimationMixer",0,class extends j{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1,"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}_bindAction(e,t){let r=e._localRoot||this._root,n=e._clip.tracks,i=n.length,a=e._propertyBindings,s=e._interpolants,o=r.uuid,l=this._bindingsByRootAndName,u=l[o];void 0===u&&(u={},l[o]=u);for(let e=0;e!==i;++e){let i=n[e],l=i.name,c=u[l];
1if(void 0!==c)++c.referenceCount,a[e]=c;else{if(void 0!==(c=a[e])){null===c._cacheIndex&&(++c.referenceCount,this._addInactiveBinding(c,o,l));continue}let n=t&&t._propertyBindings[e].binding.parsedPath;c=new sP(sk.create(r,l,n),i.ValueTypeName,i.getValueSize()),++c.referenceCount,this._addInactiveBinding(c,o,l),a[e]=c}s[e].resultBuffer=c.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){let t=(e._localRoot||this._root).uuid,r=e._clip.uuid,n=this._actionsByClip[r];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,r,t)}let t=e._propertyBindings;for(let e=0,r=t.length;e!==r;++e){let r=t[e];0==r.useCount++&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,r=t.length;e!==r;++e){let r=t[e];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,r){let n=this._actions,i=this._actionsByClip,a=i[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a;else{let t=a.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=n.length,n.push(e),a.actionByRoot[r]=e}_removeInactiveAction(e){let t=this._actions,r=t[t.length-1],n=e._cacheIndex;r._cacheIndex=n,t[n]=r,t.pop(),e._cacheIndex=null;let i=e._clip.uuid,a=this._actionsByClip,s=a[i],o=s.knownActions,l=o[o.length-1],u=e._byClipCacheIndex;l._byClipCacheIndex=u,o[u]=l,o.pop(),e._byClipCacheIndex=null;let c=s.actionByRoot,d=(e._localRoot||this._root).uuid;delete c[d],0===o.length&&delete a[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){let t=e._propertyBindings;for(let e=0,r=t.length;e!==r;++e){let r=t[e];0==--r.referenceCount&&this._removeInactiveBinding(r)}}_lendAction(e){let t=this._actions,r=e._cacheIndex,n=this._nActiveActions++,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i}_takeBackAction(e){let t=this._actions,r=e._cacheIndex,n=--this._nActiveActions,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i}_addInactiveBinding(e,t,r){let n=this._bindingsByRootAndName,i=this._bindings,a=n[t];void 0===a&&(a={},n[t]=a),a[r]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){let t=this._bindings,r=e.binding,n=r.rootNode.uuid,i=r.path,a=this._bindingsByRootAndName,s=a[n],o=t[t.length-1],l=e._cacheIndex;o._cacheIndex=l,t[l]=o,t.pop(),delete s[i],0===Object.keys(s).length&&delete a[n]}_lendBinding(e){let t=this._bindings,r=e._cacheIndex,n=this._nActiveBindings++,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i}_takeBackBinding(e){let t=this._bindings,r=e._cacheIndex,n=--this._nActiveBindings,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i}_lendControlInterpolant(){let e=this._controlInterpolants,t=this._nActiveControlInterpolants++,r=e[t];return void 0===r&&((r=new ay(new Float32Array(2),new Float32Array(2),1,sF)).__cacheIndex=t,e[t]=r),r}_takeBackControlInterpolant(e){let t=this._controlInterpolants,r=e.__cacheIndex,n=--this._nActiveControlInterpolants,i=t[n];e.__cacheIndex=n,t[n]=e,i.__cacheIndex=r,t[r]=i}clipAction(e,t,r){let n=t||this._root,i=n.uuid,a="string"==typeof e?aP.findByName(n,e):e,s=null!==a?a.uuid:e,o=this._actionsByClip[s],l=null;if(void 0===r&&(r=null!==a?a.blendMode:2500),void 0!==o){let e=o.actionByRoot[i];if(void 0!==e&&e.blendMode===r)return e;l=o.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;let u=new sU(this,a,t,r);return this._bindAction(u,l),this._addInactiveAction(u,s,i),u}existingAction(e,t){let r=t||this._root,n=r.uuid,i="string"==typeof e?aP.findByName(r,e):e,a=i?i.uuid:e,s=this._actionsByClip[a];return void 0!==s&&s.actionByRoot[n]||null}stopAllAction(){let e=this._actions,t=this._nActiveActions;for(let r=t-1;r>=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;let t=this._actions,r=this._nActiveActions,n=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let s=0;s!==r;++s)t[s]._update(n,e,i,a);let s=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)s[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){let t=this._actions,r=e.uuid,n=this._actionsByClip,i=n[r];if(void 0!==i){let e=i.knownActions;for(let r=0,n=e.length;r!==n;++r){let n=e[r];this._deactivateAction(n);let i=n._cacheIndex,a=t[t.length-1];n._cacheIndex=null,n._byClipCacheIndex=null,a._cacheIndex=i,t[i]=a,t.pop(),this._removeInactiveBindingsForAction(n)}delete n[r]}}uncacheRoot(e){let t=e.uuid,r=this._actionsByClip;for(let e in r){let n=r[e].actionByRoot[t];void 0!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}let n=this._bindingsByRootAndName[t];if(void 0!==n)for(let e in n){let t=n[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){let r=this.existingAction(e,t);null!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}},"AnimationObjectGroup",0,class{constructor(){this.isAnimationObjectGroup=!0,this.uuid=W(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,r=arguments.length;t!==r;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){let e=this._objects,t=this._indicesByUUID,r=this._paths,n=this._parsedPaths,i=this._bindings,a=i.length,s,o=e.length,l=this.nCachedObjects_;for(let u=0,c=arguments.length;u!==c;++u){let c=arguments[u],d=c.uuid,h=t[d];if(void 0===h){h=o++,t[d]=h,e.push(c);for(let e=0;e!==a;++e)i[e].push(new sk(c,r[e],n[e]))}else if(h<l){s=e[h];let o=--l,u=e[o];t[u.uuid]=h,e[h]=u,t[d]=o,e[o]=c;for(let e=0;e!==a;++e){let t=i[e],a=t[o],s=t[h];t[h]=a,void 0===s&&(s=new sk(c,r[e],n[e])),t[o]=s}}else e[h]!==s&&k("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastru
1cture when reloading scenes.")}this.nCachedObjects_=l}remove(){let e=this._objects,t=this._indicesByUUID,r=this._bindings,n=r.length,i=this.nCachedObjects_;for(let a=0,s=arguments.length;a!==s;++a){let s=arguments[a],o=s.uuid,l=t[o];if(void 0!==l&&l>=i){let a=i++,u=e[a];t[u.uuid]=l,e[l]=u,t[o]=a,e[a]=s;for(let e=0;e!==n;++e){let t=r[e],n=t[a],i=t[l];t[l]=n,t[a]=i}}}this.nCachedObjects_=i}uncache(){let e=this._objects,t=this._indicesByUUID,r=this._bindings,n=r.length,i=this.nCachedObjects_,a=e.length;for(let s=0,o=arguments.length;s!==o;++s){let o=arguments[s],l=o.uuid,u=t[l];if(void 0!==u)if(delete t[l],u<i){let s=--i,o=e[s],l=--a,c=e[l];t[o.uuid]=u,e[u]=o,t[c.uuid]=s,e[s]=c,e.pop();for(let e=0;e!==n;++e){let t=r[e],n=t[s],i=t[l];t[u]=n,t[s]=i,t.pop()}}else{let i=--a,s=e[i];i>0&&(t[s.uuid]=u),e[u]=s,e.pop();for(let e=0;e!==n;++e){let t=r[e];t[u]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){let r=this._bindingsIndicesByPath,n=r[e],i=this._bindings;if(void 0!==n)return i[n];let a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,u=this.nCachedObjects_,c=Array(l);n=i.length,r[e]=n,a.push(e),s.push(t),i.push(c);for(let r=u,n=o.length;r!==n;++r){let n=o[r];c[r]=new sk(n,e,t)}return c}unsubscribe_(e){let t=this._bindingsIndicesByPath,r=t[e];if(void 0!==r){let n=this._paths,i=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];t[e[s]]=r,a[r]=o,a.pop(),i[r]=i[s],i.pop(),n[r]=n[s],n.pop()}}},"AnimationUtils",0,class{static convertArray(e,t){return ah(e,t)}static isTypedArray(e){return C(e)}static getKeyframeOrder(e){return af(e)}static sortedArray(e,t,r){return ap(e,t,r)}static flattenJSON(e,t,r,n){am(e,t,r,n)}static subclip(e,t,r,n,i=30){return function(e,t,r,n,i=30){let a=e.clone();a.name=t;let s=[];for(let e=0;e<a.tracks.length;++e){let t=a.tracks[e],o=t.getValueSize(),l=[],u=[];for(let e=0;e<t.times.length;++e){let a=t.times[e]*i;if(!(a<r)&&!(a>=n)){l.push(t.times[e]);for(let r=0;r<o;++r)u.push(t.values[e*o+r])}}0!==l.length&&(t.times=ah(l,t.times.constructor),t.values=ah(u,t.values.constructor),s.push(t))}a.tracks=s;let o=1/0;for(let e=0;e<a.tracks.length;++e)o>a.tracks[e].times[0]&&(o=a.tracks[e].times[0]);for(let e=0;e<a.tracks.length;++e)a.tracks[e].shift(-1*o);return a.resetDuration(),a}(e,t,r,n,i)}static makeClipAdditive(e,t=0,r=e,n=30){return function(e,t=0,r=e,n=30){n<=0&&(n=30);let i=r.tracks.length,a=t/n;for(let t=0;t<i;++t){let n,i=r.tracks[t],s=i.ValueTypeName;if("bool"===s||"string"===s)continue;let o=e.tracks.find(function(e){return e.name===i.name&&e.ValueTypeName===s});if(void 0===o)continue;let l=0,u=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(l=u/3);let c=0,d=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=d/3);let h=i.times.length-1;if(a<=i.times[0]){let e=l,t=u-l;n=i.values.slice(e,t)}else if(a>=i.times[h]){let e=h*u+l,t=e+u-l;n=i.values.slice(e,t)}else{let e=i.createInterpolant(),t=l,r=u-l;e.evaluate(a),n=e.resultBuffer.slice(t,r)}"quaternion"===s&&new J().fromArray(n).normalize().conjugate().toArray(n);let f=o.times.length;for(let e=0;e<f;++e){let t=e*d+c;if("quaternion"===s)J.multiplyQuaternionsFlat(o.values,t,n,0,o.values,t);else{let e=d-2*c;for(let r=0;r<e;++r)o.values[t+r]-=n[r]}}}return e.blendMode=2501,e}(e,t,r,n)}},"ArcCurve",0,n3,"ArrayCamera",0,sg,"ArrowHelper",0,class extends eY{constructor(e=new Q(0,0,1),t=new Q(0,0,0),r=1,n=0xffff00,s=.2*r,o=.2*s){super(),this.type="ArrowHelper",void 0===i&&((i=new tq).setAttribute("position",new tD([0,0,0,0,1,0],3)),(a=new nq(.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new nM(i,new ng({color:n,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new rA(a,new rm({color:n,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(r,s,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{oa.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(oa,t)}}setLength(e,t=.2*e,r=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(r,t,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},"AttachedBindMode",0,x,"Audio",0,sM,"AudioAnalyser",0,class{constructor(e,t=2
1048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0,t=this.getFrequencyData();for(let r=0;r<t.length;r++)e+=t[r];return e/t.length}},"AudioContext",0,sd,"AudioListener",0,class extends eY{constructor(){super(),this.type="AudioListener",this.context=sd.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._timer=new sv}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e),this._timer.update(
1);let t=this.context.listener;if(this.timeDelta=this._timer.getDelta(),this.matrixWorld.decompose(sx,sb,s_),sS.set(0,0,-1).applyQuaternion(sb),sw.set(0,1,0).applyQuaternion(sb),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(sx.x,e),t.positionY.linearRampToValueAtTime(sx.y,e),t.positionZ.linearRampToValueAtTime(sx.z,e),t.forwardX.linearRampToValueAtTime(sS.x,e),t.forwardY.linearRampToValueAtTime(sS.y,e),t.forwardZ.linearRampToValueAtTime(sS.z,e),t.upX.linearRampToValueAtTime(sw.x,e),t.upY.linearRampToValueAtTime(sw.y,e),t.upZ.linearRampToValueAtTime(sw.z,e)}else t.setPosition(sx.x,sx.y,sx.z),t.setOrientation(sS.x,sS.y,sS.z,sw.x,sw.y,sw.z)}},"AudioLoader",0,class extends aN{constructor(e){super(e)}load(e,t,r,n){let i=this,a=new aU(this.manager);function s(t){n?n(t):k(t),i.manager.itemError(e)}a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(r){try{let n=r.slice(0),a=sd.getContext(),o=e+"#decode";i.manager.itemStart(o),a.decodeAudioData(n,function(e){t(e),i.manager.itemEnd(o)}).catch(function(e){s(e),i.manager.itemEnd(o)})}catch(e){s(e)}},r,n)}},"AxesHelper",0,class extends nC{constructor(e=1){const t=new tq;t.setAttribute("position",new tD([0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],3)),t.setAttribute("color",new tD([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(t,new ng({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,r){let n=new e2,i=this.geometry.attributes.color.array;return n.set(e),n.toArray(i,0),n.toArray(i,3),n.set(t),n.toArray(i,6),n.toArray(i,9),n.set(r),n.toArray(i,12),n.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},"BackSide",0,1,"BasicDepthPacking",0,3200,"BasicShadowMap",0,0,"BatchedMesh",0,nm,"BezierInterpolant",0,ab,"Bone",0,rz,"BooleanKeyframeTrack",0,aS,"Box2",0,sq,"Box3",0,td,"Box3Helper",0,class extends nC{constructor(e,t=0xffff00){const r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new tq;n.setIndex(new tR(r,1)),n.setAttribute("position",new tD([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(n,new ng({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){let t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}},"BoxGeometry",0,nG,"BoxHelper",0,class extends nC{constructor(e,t=0xffff00){const r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),i=new tq;i.setIndex(new tR(r,1)),i.setAttribute("position",new tR(n,3)),super(i,new ng({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(void 0!==this.object&&oi.setFromObject(this.object),oi.isEmpty())return;let e=oi.min,t=oi.max,r=this.geometry.attributes.position,n=r.array;n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=e.x,n[4]=t.y,n[5]=t.z,n[6]=e.x,n[7]=e.y,n[8]=t.z,n[9]=t.x,n[10]=e.y,n[11]=t.z,n[12]=t.x,n[13]=t.y,n[14]=e.z,n[15]=e.x,n[16]=t.y,n[17]=e.z,n[18]=e.x,n[19]=e.y,n[20]=e.z,n[21]=t.x,n[22]=e.y,n[23]=e.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}},"BufferAttribute",0,tR,"BufferGeometry",0,tq,"BufferGeometryLoader",0,sa,"ByteType",0,1010,"Cache",0,aI,"Camera",0,a$,"CameraHelper",0,class extends nC{constructor(e){const t=new tq,r=new ng({color:0xffffff,vertexColors:!0,toneMapped:!1}),n=[],i=[],a={};function s(e,t){o(e),o(t)}function o(e){n.push(0,0,0),i.push(0,0,0),void 0===a[e]&&(a[e]=[]),a[e].push(n.length/3-1)}s("n1","n2"),s("n2","n4"),s("n4","n3"),s("n3","n1"),s("f1","f2"),s("f2","f4"),s("f4","f3"),s("f3","f1"),s("n1","f1"),s("n2","f2"),s("n3","f3"),s("n4","f4"),s("p","n1"),s("p","n2"),s("p","n3"),s("p","n4"),s("u1","u2"),s("u2","u3"),s("u3","u1"),s("c","t"),s("p","c"),s("cn1","cn2"),s("cn3","cn4"),s("cf1","cf2"),s("cf3","cf4"),t.setAttribute("position",new tD(n,3)),t.setAttribute("color",new tD(i,3)),super(t,r),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update();const l=new e2(0xffaa00),u=new e2(0xff0000),c=new e2(43775),d=new e2(0xffffff),h=new e2(3355443);this.setColors(l,u,c,d,h)}setColors(e,t,r,n,i){let a=this.geometry.getAttribute("color");return a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,r.r,r.g,r.b),a.setXYZ(33,r.r,r.g,r.b),a.setXYZ(34,r.r,r.g,r.b),a.setXYZ(35,r.r,r.g,r.b),a.setXYZ(36,r.r,r.g,r.b),a.setXYZ(37,r.r,r.g,r.b),a.setXYZ(38,n.r,n.g,n.b),a.setXYZ(39,n.r,n.g,n.b),a.setXYZ(40,i.r,i.g,i.b),a.setXYZ(41,i.r,i.g,i.b),a.setXYZ(42,i.r,i.g,i.b),a.setXYZ(43,i.r,i.g,i.b),a.setXYZ(44,i.r,i.g,i.b),a.setXYZ(45,i.r,i.g,i.b),a.setXYZ(46,i.r,i.g,i.b),a.setXYZ(47,i.r,i.g,i.b),a.setXYZ(48,i.r,i.g,i.b),a.setXYZ(49,i.r,i.g,i.b),a.needsUpdate=!0,this}update(){let e,t,r=this.geometry,n=this.pointMap;if(or.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),!0===this.camera.reversedDepth)e=1,t=0;else if(2e3===this.camera.coordinateSystem)e=-1,t=1;else if(2001===this.camera.coordinateSystem)e=0,t=1;
1else throw Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);on("c",n,r,or,0,0,e),on("t",n,r,or,0,0,t),on("n1",n,r,or,-1,-1,e),on("n2",n,r,or,1,-1,e),on("n3",n,r,or,-1,1,e),on("n4",n,r,or,1,1,e),on("f1",n,r,or,-1,-1,t),on("f2",n,r,or,1,-1,t),on("f3",n,r,or,-1,1,t),on("f4",n,r,or,1,1,t),on("u1",n,r,or,.7,1.1,e),on("u2",n,r,or,-.7,1.1,e),on("u3",n,r,or,0,2,e),on("cf1",n,r,or,-1,0,t),on("cf2",n,r,or,1,0,t),on("cf3",n,r,or,0,-1,t),on("cf4",n,r,or,0,1,t),on("cn1",n,r,or,-1,0,e),on("cn2",n,r,or,1,0,e),on("cn3",n,r,or,0,-1,e),on("cn4",n,r,or,0,1,e),r.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},"CanvasTexture",0,class extends em{constructor(e,t,r,n,i,a,s,o,l){super(e,t,r,n,i,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}},"CapsuleGeometry",0,nH,"CatmullRomCurve3",0,ie,"CineonToneMapping",0,3,"CircleGeometry",0,nW,"ClampToEdgeWrapping",0,1001,"Clock",0,sH,"Color",0,e2,"ColorKeyframeTrack",0,aw,"ColorManagement",0,es,"Compatibility",0,{TEXTURE_COMPARE:"depthTextureCompare"},"CompressedArrayTexture",0,class extends nF{constructor(e,t,r,n,i,a){super(e,t,r,i,a),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=1001,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},"CompressedCubeTexture",0,class extends nF{constructor(e,t,r){super(void 0,e[0].width,e[0].height,t,r,301),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}},"CompressedTexture",0,nF,"CompressedTextureLoader",0,class extends aN{constructor(e){super(e)}load(e,t,r,n){let i=this,a=[],s=new nF,o=new aU(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials);let l=0;if(Array.isArray(e))for(let u=0,c=e.length;u<c;++u)!function(u){o.load(e[u],function(e){let r=i.parse(e,!0);a[u]={width:r.width,height:r.height,format:r.format,mipmaps:r.mipmaps},6===(l+=1)&&(1===r.mipmapCount&&(s.minFilter=1006),s.image=a,s.format=r.format,s.needsUpdate=!0,t&&t(s))},r,n)}(u);else o.load(e,function(e){let r=i.parse(e,!0);if(r.isCubemap){let e=r.mipmaps.length/r.mipmapCount;for(let t=0;t<e;t++){a[t]={mipmaps:[]};for(let e=0;e<r.mipmapCount;e++)a[t].mipmaps.push(r.mipmaps[t*r.mipmapCount+e]),a[t].format=r.format,a[t].width=r.width,a[t].height=r.height}s.image=a}else s.image.width=r.width,s.image.height=r.height,s.mipmaps=r.mipmaps;1===r.mipmapCount&&(s.minFilter=1006),s.format=r.format,s.needsUpdate=!0,t&&t(s)},r,n);return s}},"ConeGeometry",0,nq,"ConstantAlphaFactor",0,213,"ConstantColorFactor",0,211,"Controls",0,class extends j{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){void 0===e?D("Controls: connect() now requires an element."):(null!==this.domElement&&this.disconnect(),this.domElement=e)}disconnect(){}dispose(){}update(){}},"CubeCamera",0,sm,"CubeDepthTexture",0,nB,"CubeReflectionMapping",0,301,"CubeRefractionMapping",0,302,"CubeTexture",0,nz,"CubeTextureLoader",0,class extends aN{constructor(e){super(e)}load(e,t,r,n){let i=new nz;
1i.colorSpace=_;let a=new az(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;for(let r=0;r<e.length;++r)!function(r){a.load(e[r],function(e){i.images[r]=e,6==++s&&(i.needsUpdate=!0,t&&t(i))},void 0,n)}(r);return i}},"CubeUVReflectionMapping",0,306,"CubicBezierCurve",0,ia,"CubicBezierCurve3",0,is,"CubicInterpolant",0,av,"CullFaceBack",0,1,"CullFaceFront",0,2,"CullFaceFrontBack",0,3,"CullFaceNone",0,0,"Curve",0,n1,"CurvePath",0,ix,"CustomBlending",0,5,"CustomToneMapping",0,5,"CylinderGeometry",0,nX,"Cylindrical",0,class{constructor(e=1,t=0,r=0){this.radius=e,this.theta=t,this.y=r}set(e,t,r){return this.radius=e,this.theta=t,this.y=r,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,r){return this.radius=Math.sqrt(e*e+r*r),this.theta=Math.atan2(e,r),this.y=t,this}clone(){return new this.constructor().copy(this)}},"Data3DTexture",0,eb,"DataArrayTexture",0,ex,"DataTexture",0,rj,"DataTextureLoader",0,class extends aN{constructor(e){super(e)}load(e,t,r,n){let i=this,a=new rj,s=new aU(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(i.withCredentials),s.load(e,function(e){let r;try{r=i.parse(e)}catch(e){void 0!==n?n(e):k(e);return}i._applyTexData(a,r),t&&t(a,r)},r,n),a}createDataTexture(e){let t=new rj;return this._applyTexData(t,this.parse(e)),t}_applyTexData(e,t){void 0!==t.image?e.image=t.image:void 0!==t.data&&(e.image.width=t.width,e.image.height=t.height,e.image.data=t.data),e.wrapS=void 0!==t.wrapS?t.wrapS:1001,e.wrapT=void 0!==t.wrapT?t.wrapT:1001,e.magFilter=void 0!==t.magFilter?t.magFilter:1006,e.minFilter=void 0!==t.minFilter?t.minFilter:1006,e.anisotropy=void 0!==t.anisotropy?t.anisotropy:1,void 0!==t.colorSpace&&(e.colorSpace=t.colorSpace),void 0!==t.flipY&&(e.flipY=t.flipY),void 0!==t.format&&(e.format=t.format),void 0!==t.type&&(e.type=t.type),void 0!==t.mipmaps&&(e.mipmaps=t.mipmaps,e.minFilter=1008),1===t.mipmapCount&&(e.minFilter=1006),void 0!==t.generateMipmaps&&(e.generateMipmaps=t.generateMipmaps),e.needsUpdate=!0}},"DataUtils",0,class{static toHalfFloat(e){return tA(e)}static fromHalfFloat(e){return tC(e)}},"DecrementStencilOp",0,7683,"DecrementWrapStencilOp",0,34056,"DefaultLoadingManager",0,aL,"DepthFormat",0,1026,"DepthStencilFormat",0,1027,"DepthTexture",0,nj,"DetachedBindMode",0,b,"DirectionalLight",0,a6,"DirectionalLightHelper",0,class extends eY{constructor(e,t,r){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r,this.type="DirectionalLightHelper",void 0===t&&(t=1);let n=new tq;n.setAttribute("position",new tD([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new ng({fog:!1,toneMapped:!1});this.lightPlane=new nM(n,i),this.add(this.lightPlane),(n=new tq).setAttribute("position",new tD([0,0,0,0,0,1],3)),this.targetLine=new nM(n,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),s9.setFromMatrixPosition(this.light.matrixWorld),s7.setFromMatrixPosition(this.light.target.matrixWorld),oe.subVectors(s7,s9),this.lightPlane.lookAt(s7),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(s7),this.targetLine.scale.z=oe.length()}},"DiscreteInterpolant",0,ax,"DodecahedronGeometry",0,n$,"DoubleSide",0,2,"DstAlphaFactor",0,206,"DstColorFactor",0,208,"DynamicCopyUsage",0,35050,"DynamicDrawUsage",0,35048,"DynamicReadUsage",0,35049,"EdgesGeometry",0,n0,"EllipseCurve",0,n2,"EqualCompare",0,514,"EqualDepth",0,4,"EqualStencilFunc",0,514,"EquirectangularReflectionMapping",0,303,"EquirectangularRefractionMapping",0,304,"Euler",0,eO,"EventDispatcher",0,j,"ExternalTexture",0,nV,"ExtrudeGeometry",0,iV,"FileLoader",0,aU,"Float16BufferAttribute",0,class extends tR{constructor(e,t,r){super(new Uint16Array(e),t,r),this.isFloat16BufferAttribute=!0}getX(e){let t=tC(this.array[e*this.itemSize]);return this.normalized&&(t=$(t,this.array)),t}setX(e,t){return this.normalized&&(t=K(t,this.array)),this.array[e*this.itemSize]=tA(t),this}getY(e){let t=tC(this.array[e*this.itemSize+1]);return this.normalized&&(t=$(t,this.array)),t}setY(e,t){return this.normalized&&(t=K(t,this.array)),this.array[e*this.itemSize+1]=tA(t),this}getZ(e){let t=tC(this.array[e*this.itemSize+2]);return this.normalized&&(t=$(t,this.array)),t}setZ(e,t){return this.normalized&&(t=K(t,this.array)),this.array[e*this.itemSize+2]=tA(t),this}getW(e){let t=tC(this.array[e*this.itemSize+3]);return this.normalized&&(t=$(t,this.array)),t}setW(e,t){return this.normalized&&(t=K(t,this.array)),this.array[e*this.itemSize+3]=tA(t),this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=K(t,this.array),r=K(r,this.array)),this.array[e+0]=tA(t),this.array[e+1]=tA(r),this}setXYZ(e,t,r,n){return e*=this.itemSize,this.normalized&&(t=K(t,this.array),r=K(r,this.array),n=K(n,this.array)),this.array[e+0]=tA(t),this.array[e+1]=tA(r),this.array[e+2]=tA(n),this}setXYZW(e,t,r,n,i){return e*=this.itemSize,this.normalized&&(t=K(t,this.array),r=K(r,this.array),n=K(n,this.array),i=K(i,this.array)),this.array[e+0]=tA(t),this.array[e+1]=tA(r),this.array[e+2]=tA(n),this.array[e+3]=tA(i),this}},"Float32BufferAttribute",0,tD,"FloatType",0,1015,"Fog",0,e5,"FogExp2",0,e4,"FramebufferTexture",0,class extends em{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=1003,this.minFilter=1003,this.generateMipmaps=!1,this.needsUpdate=!0}},"FrontSide",0,0,"Frustum",0,r6,"FrustumArray",0,r9,"GLBufferAttribute",0,class{constructor(e,t,r,n,i,a=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=r,this.elementSize=n,this.count=i,this.normalized=a,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}},"GLSL1",0,"100","GLSL3",0,T,"GreaterCompare",0,516,"GreaterDepth",0,6,"GreaterEqualCompare",0,518,"GreaterEqualDepth",0,5,"GreaterEqualStencilFunc",0,518,"GreaterStencilFunc",0,516,"GridHelper",0,class extends nC{constructor(e=10,t=10,r=4473924,n=8947848){r=new e2(r),n=new e2(n);const i=t/2,a=e/t,s=e/2,o=[],l=[];for(let e=0,u=0,c=-s;e<=t;e++,c+=a){o.push(-s,0,c,s,0,c),o.push(c,0,-s,c,0,s);const t=e===i?r:n;t.toArray(l,u),u+=3,t.toArray(l,u),u+=3,t.toArray(l,u),u+=3,t.toArray(l,u),u+=3}const u=new tq;u.setAttribute("position",new tD(o,3)),u.setAttribute("color",new tD(l,3)),super(u,new ng({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},"Group",0,e$,"HTMLTexture",0,class extends em{constructor(e,t,r,n,i,a,s,o,l){super(e,t,r,n,i,a,s,o,l),this.isHTMLTexture=!0,this.generateMipmaps=!1,this.needsUpdate=!0;const u=e?e.parentNode:null;null!==u&&"requestPaint"in u&&(u.onpaint=()=>{this.needsUpdate=!0},u.requestPaint())}dispose(){let e=this.image?this.image.parentNode:null;null!==e&&"onpaint"in e&&(e.onpaint=null),super.dispose()}},"HalfFloatType",0,1016,"HemisphereLight",0,aB,"HemisphereLightHelper",0,class extends eY{constructor(e,t,r){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r,this.type="HemisphereLightHelper";const n=new iX(t);n.rotateY(.5*Math.PI),this.material=new rm({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=new Float32Array(3*n.getAttribute("position").count);n.setAttribute("color",new tR(i,3)),this.add(new rA(n,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){let e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{let t=e.geometry.getAttribute("color");s6.copy(this.light.color),s8.copy(this.light.groundColor);for(let e=0,r=t.count;e<r;e++){let n=e<r/2?s6:s8;t.setXYZ(e,n.r,n.g,n.b)}t.needsUpdate=!0}this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),e.lookAt(s5.setFromMatrixPosition(this.light.matrixWorld).negate())}},"IcosahedronGeometry",0,iH,"ImageBitmapLoader",0,class extends aN{constructor(e){super(e),this.isImageBitmapLoader=!0,"u"<typeof createImageBitmap&&D("ImageBitmapLoader: createImageBitmap() not supported."),"u"<typeof fetch&&D("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,r,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let i=this,a=aI.get(`image-bitmap:${e}`);if(void 0!==a)return(i.manager.itemStart(e),a.then)?void a.then(r=>{!0===sc.has(a)?(n&&n(sc.get(a)),i.manager.itemError(e)):t&&t(r),i.manager.itemEnd(e)}):void setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0);let s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,s.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let o=fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))}).then(function(r){aI.add(`image-bitmap:${e}`,r),t&&t(r),i.manager.itemEnd(e)}).catch(function(t){n&&n(t),sc.set(o,t),aI.remove(`image-bitmap:${e}`),i.manager.itemError(e),i.manager.itemEnd(e)});aI.add(`image-bitmap:${e}`,o),i.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},"ImageLoader",0,az,"ImageUtils",0,eu,"IncrementStencilOp",0,7682,"IncrementWrapStencilOp",0,34055,"InstancedBufferAttribute",0,rH,"InstancedBufferGeometry",0,si,"InstancedInterleavedBuffer",0,class extends tY{constructor(e,t,r=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){let t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){let t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}},"InstancedMesh",0,rJ,"Int16BufferAttribute",0,class extends tR{constructor(e,t,r){super(new Int16Array(e),t,r)}},"Int32BufferAttribute",0,class extends tR{constructor(e,t,r){super(new Int32Array(e),t,r)}},"Int8BufferAttribute",0,class extends tR{constructor(e,t,r){super(new Int8Array(e),t,r)}},"IntType",0,1013,"InterleavedBuffer",0,tY,"InterleavedBufferAttribute",0,tK,"Interpolant",0,ag,"InterpolateBezier",0,2303,"InterpolateDiscrete",0,2300,"InterpolateLinear",0,2301,"InterpolateSmooth",0,2302,"InterpolationSamplingMode",0,{NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"},"InterpolationSamplingType",0,{PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},"InvertStencilOp",0,5386,"KeepStencilOp",0,7680,"KeyframeTrack",0,a_,"LOD",0,rs,"LatheGeometry",0,iW,"Layers",0,eR,"LessCompare",0,513,"LessDepth",0,2,"LessEqualCompare",0,51
15,"LessEqualDepth",0,3,"LessEqualStencilFunc",0,515,"LessStencilFunc",0,513,"Light",0,aj,"LightProbe",0,se,"Line",0,nM,"Line3",0,class{constructor(e=new Q,t=new Q){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){sY.subVectors(e,this.start),s$.subVectors(this.end,this.start);let r=s$.dot(s$);if(0===r)return 0;let n=s$.dot(sY)/r;return t&&(n=X(n,0,1)),n}closestPointToPoint(e,t,r){let n=this.closestPointToPointParameter(e,t);return this.delta(r).multiplyScalar(n).add(this.start)}distanceSqToLine3(e,t=sQ,r=s0){let n,i,a=1e-8*1e-8,s=this.start,o=e.start,l=this.end,u=e.end;sK.subVectors(l,s),sZ.subVectors(u,o),sJ.subVectors(s,o);let c=sK.dot(sK),d=sZ.dot(sZ),h=sZ.dot(sJ);if(c<=a&&d<=a)return t.copy(s),r.copy(o),t.sub(r),t.dot(t);if(c<=a)n=0,i=X(i=h/d,0,1);else{let e=sK.dot(sJ);if(d<=a)i=0,n=X(-e/c,0,1);else{let t=sK.dot(sZ),r=c*d-t*t;n=0!==r?X((t*h-e*d)/r,0,1):0,(i=(t*n+h)/d)<0?(i=0,n=X(-e/c,0,1)):i>1&&(i=1,n=X((t-e)/c,0,1))}}return t.copy(s).addScaledVector(sK,n),r.copy(o).addScaledVector(sZ,i),t.distanceToSquared(r)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},"LineBasicMaterial",0,ng,"LineCurve",0,io,"LineCurve3",0,il,"LineDashedMaterial",0,ad,"LineLoop",0,nP,"LineSegments",0,nC,"LinearFilter",0,1006,"LinearInterpolant",0,ay,"LinearMipMapLinearFilter",0,1008,"LinearMipMapNearestFilter",0,1007,"LinearMipmapLinearFilter",0,1008,"LinearMipmapNearestFilter",0,1007,"LinearSRGBColorSpace",0,S,"LinearToneMapping",0,1,"LinearTransfer",0,w,"Loader",0,aN,"LoaderUtils",0,sn,"LoadingManager",0,aR,"LoopOnce",0,2200,"LoopPingPong",0,2202,"LoopRepeat",0,2201,"MOUSE",0,{LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},"Material",0,tJ,"MaterialBlending",0,6,"MaterialLoader",0,sr,"MathUtils",0,{DEG2RAD:G,RAD2DEG:H,generateUUID:W,clamp:X,euclideanModulo:q,mapLinear:function(e,t,r,n,i){return n+(e-t)*(i-n)/(r-t)},inverseLerp:function(e,t,r){return e!==t?(r-e)/(t-e):0},lerp:Y,damp:function(e,t,r,n){return Y(e,t,1-Math.exp(-r*n))},pingpong:function(e,t=1){return t-Math.abs(q(e,2*t)-t)},smoothstep:function(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t))*e*(3-2*e)},smootherstep:function(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(V=e);let t=V+=0x6d2b79f5;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/0x100000000},degToRad:function(e){return e*G},radToDeg:function(e){return e*H},isPowerOfTwo:function(e){return(e&e-1)==0&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,r,n,i){let a=Math.cos,s=Math.sin,o=a(r/2),l=s(r/2),u=a((t+n)/2),c=s((t+n)/2),d=a((t-n)/2),h=s((t-n)/2),f=a((n-t)/2),p=s((n-t)/2);switch(i){case"XYX":e.set(o*c,l*d,l*h,o*u);break;case"YZY":e.set(l*h,o*c,l*d,o*u);break;case"ZXZ":e.set(l*d,l*h,o*c,o*u);break;case"XZX":e.set(o*c,l*p,l*f,o*u);break;case"YXY":e.set(l*f,o*c,l*p,o*u);break;case"ZYZ":e.set(l*p,l*f,o*c,o*u);break;default:D("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:K,denormalize:$},"Matrix2",0,sW,"Matrix3",0,er,"Matrix4",0,e_,"MaxEquation",0,104,"Mesh",0,rA,"MeshBasicMaterial",0,rm,"MeshDepthMaterial",0,al,"MeshDistanceMaterial",0,au,"MeshLambertMaterial",0,ao,"MeshMatcapMaterial",0,ac,"MeshNormalMaterial",0,as,"MeshPhongMaterial",0,ai,"MeshPhysicalMaterial",0,an,"MeshStandardMaterial",0,ar,"MeshToonMaterial",0,aa,"MinEquation",0,103,"MirroredRepeatWrapping",0,1002,"MixOperation",0,1,"MultiplyBlending",0,4,"MultiplyOperation",0,0,"NearestFilter",0,1003,"NearestMipMapLinearFilter",0,1005,"NearestMipMapNearestFilter",0,1004,"NearestMipmapLinearFilter",0,1005,"NearestMipmapNearestFilter",0,1004,"NeutralToneMapping",0,7,"NeverCompare",0,512,"NeverDepth",0,0,"NeverStencilFunc",0,512,"NoBlending",0,0,"NoColorSpace",0,"","NoNormalPacking",0,"","NoToneMapping",0,0,"NormalAnimationBlendMode",0,2500,"NormalBlending",0,1,"NormalGAPacking",0,"ga","NormalRGPacking",0,"rg","NotEqualCompare",0,517,"NotEqualDepth",0,7,"NotEqualStencilFunc",0,517,"NumberKeyframeTrack",0,aM,"Object3D",0,eY,"ObjectLoader",0,class extends aN{constructor(e){super(e)}load(e,t,r,n){let i=this,a=""===this.path?sn.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;let s=new aU(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(r){let a=null;try{a=JSON.parse(r)}catch(t){void 0!==n&&n(t),k("ObjectLoader: Can't parse "+e+".",t.message);return}let s=a.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase()){void 0!==n&&n(Error("THREE.ObjectLoader: Can't load "+e)),k("ObjectLoader: Can't load "+e);return}i.parse(a,t)},r,n)}async loadAsync(e,t){let r,n=""===this.path?sn.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;let i=new aU(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);let a=await i.loadAsync(e,t);try{r=JSON.parse(a)}catch(t){throw Error("THREE.ObjectLoader: Can't parse "+e+". "+t.message)}let s=r.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())throw Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(r)}parse(e,t){let r=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),a=this.parseImages(e.images,function(){void 0!==t&&t(l)}),s=this.parseTextures(e.textures,a),o=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,i,o,s,r),u=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,u),this.bindLightTargets(l),void 0!==t){let e=!1;for(let t in a)if(a[t].data instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){let t=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),n=this.parseGeometries(e.geometries,r),i=await this.parseImagesAsync(e.images),a=this.parseTextures(e.textures,i),s=this.parseMaterials(e.materials,a),o=this.parseObject(e.object,n,s,a,t),l=this.parseSkeletons(e.skeletons,o);return this.bindSkeletons(o,l),this.bindLightTargets(o),o}static registerGeometry(e,t){ss[e]=t}parseShapes(e){let t={};if(void 0!==e)for(let r=0,n=e.length;r<n;r++){let n=new i_().fromJSON(e[r]);t[n.uuid]=n}return t}parseSkeletons(e,t){let r={},n={};if(t.traverse(function(e){e.isBone&&(n[e.uuid]=e)}),void 0!==e)for(let t=0,i=e.length;t<i;t++){let i=new rG().fromJSON(e[t],n);r[i.uuid]=i}return r}parseGeometries(e,t){let r={};if(void 0!==e){let n=new sa;for(let i=0,a=e.length;i<a;i++){let a,s=e[i];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":a=n.parse(s);break;default:s.type in i3?a=i3[s.type].fromJSON(s,t):s.type in ss?a=ss[s.type].fromJSON(s,t):D(`ObjectLoader: Unknown geometry type "${s.type}". Use .registerGeometry() before starting the deserialization process.`)}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),void 0!==s.userData&&(a.userData=s.userData),r[s.uuid]=a}}return r}parseMaterials(e,t){let r={},n={};if(void 0!==e){let i=new sr;i.setTextures(t);for(let t=0,a=e.length;t<a;t++){let a=e[t];void 0===r[a.uuid]&&(r[a.uuid]=i.parse(a)),n[a.uuid]=r[a.uuid]}}return n}parseAnimations(e){let t={};if(void 0!==e)for(let r=0;r<e.length;r++){let n=e[r],i=aP.parse(n);t[i.uuid]=i}return t}parseImages(e,t){let r,n=this,i={};function a(e){if("string"==typeof e){var t;return t=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:n.resourcePath+e,t=n.manager.resolveURL(t),n.manager.itemStart(t),r.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemError(t),n.manager.itemEnd(t)})}return e.data?{data:A(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){(r=new az(new aR(t))).setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t<r;t++){let r=e[t],n=r.url;if(Array.isArray(n)){let e=[];for(let t=0,r=n.length;t<r;t++){let r=a(n[t]);null!==r&&(r instanceof HTMLImageElement?e.push(r):e.push(new rj(r.data,r.width,r.height)))}i[r.uuid]=new ed(e)}else{let e=a(r.url);i[r.uuid]=new ed(e)}}}return i}async parseImagesAsync(e){let t,r=this,n={};async function i(e){if("string"==typeof e){let n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:r.resourcePath+e;return await t.loadAsync(n)}return e.data?{data:A(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){(t=new az(this.manager)).setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t<r;t++){let r=e[t],a=r.url;if(Array.isArray(a)){let e=[];for(let t=0,r=a.length;t<r;t++){let r=a[t],n=await i(r);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new rj(n.data,n.width,n.height)))}n[r.uuid]=new ed(e)}else{let e=await i(r.url);n[r.uuid]=new ed(e)}}}return n}parseTextures(e,t){function r(e,t){return"number"==typeof e?e:(D("ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}let n={};if(void 0!==e)for(let i=0,a=e.length;i<a;i++){let a,s=e[i];void 0===s.image&&D('ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&D("ObjectLoader: Undefined image",s.image);let o=t[s.image],l=o.data;Array.isArray(l)?(a=new nz,6===l.length&&(a.needsUpdate=!0)):(a=l&&l.data?new rj:new em,l&&(a.needsUpdate=!0)),a.source=o,a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),void 0!==s.mapping&&(a.mapping=r(s.mapping,so)),void 0!==s.channel&&(a.channel=s.channel),void 0!==s.offset&&a.offset.fromArray(s.offset),void 0!==s.repeat&&a.repeat.fromArray(s.repeat),void 0!==s.center&&a.center.fromArray(s.center),void 0!==s.rotation&&(a.rotation=s.rotation),void 0!==s.wrap&&(a.wrapS=r(s.wrap[0],sl),a.wrapT=r(s.wrap[1],sl)),void 0!==s.format&&(a.format=s.format),void 0!==s.internalFormat&&(a.internalFormat=s.internalFormat),void 0!==s.type&&(a.type=s.type),void 0!==s.colorSpace&&(a.colorSpace
1=s.colorSpace),void 0!==s.minFilter&&(a.minFilter=r(s.minFilter,su)),void 0!==s.magFilter&&(a.magFilter=r(s.magFilter,su)),void 0!==s.anisotropy&&(a.anisotropy=s.anisotropy),void 0!==s.flipY&&(a.flipY=s.flipY),void 0!==s.generateMipmaps&&(a.generateMipmaps=s.generateMipmaps),void 0!==s.premultiplyAlpha&&(a.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(a.unpackAlignment=s.unpackAlignment),void 0!==s.compareFunction&&(a.compareFunction=s.compareFunction),void 0!==s.normalized&&(a.normalized=s.normalized),void 0!==s.userData&&(a.userData=s.userData),n[s.uuid]=a}return n}parseObject(e,t,r,n,i){let a,s,o;function l(e){return void 0===t[e]&&D("ObjectLoader: Undefined geometry",e),t[e]}function u(e){if(void 0!==e){if(Array.isArray(e)){let t=[];for(let n=0,i=e.length;n<i;n++){let i=e[n];void 0===r[i]&&D("ObjectLoader: Undefined material",i),t.push(r[i])}return t}return void 0===r[e]&&D("ObjectLoader: Undefined material",e),r[e]}}function c(e){return void 0===n[e]&&D("ObjectLoader: Undefined texture",e),n[e]}switch(e.type){case"Scene":a=new e6,void 0!==e.background&&(Number.isInteger(e.background)?a.background=new e2(e.background):a.background=c(e.background)),void 0!==e.environment&&(a.environment=c(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new e5(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new e4(e.fog.color,e.fog.density)),""!==e.fog.name&&(a.fog.name=e.fog.name)),void 0!==e.backgroundBlurriness&&(a.backgroundBlurriness=e.backgroundBlurriness),void 0!==e.backgroundIntensity&&(a.backgroundIntensity=e.backgroundIntensity),void 0!==e.backgroundRotation&&a.backgroundRotation.fromArray(e.backgroundRotation),void 0!==e.environmentIntensity&&(a.environmentIntensity=e.environmentIntensity),void 0!==e.environmentRotation&&a.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":a=new aQ(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new a4(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"AmbientLight":a=new a8(e.color,e.intensity);break;case"DirectionalLight":(a=new a6(e.color,e.intensity)).target=e.target||"";break;case"PointLight":a=new a3(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new a9(e.color,e.intensity,e.width,e.height);break;case"SpotLight":(a=new a1(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay)).target=e.target||"";break;case"HemisphereLight":a=new aB(e.color,e.groundColor,e.intensity);break;case"LightProbe":a=new se(new a7().fromArray(e.sh),e.intensity);break;case"SkinnedMesh":a=new rF(s=l(e.geometry),o=u(e.material)),void 0!==e.bindMode&&(a.bindMode=e.bindMode),void 0!==e.bindMatrix&&a.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(a.skeleton=e.skeleton);break;case"Mesh":a=new rA(s=l(e.geometry),o=u(e.material));break;case"InstancedMesh":s=l(e.geometry),o=u(e.material);let d=e.count,h=e.instanceMatrix,f=e.instanceColor;(a=new rJ(s,o,d)).instanceMatrix=new rH(new Float32Array(h.array),16),void 0!==f&&(a.instanceColor=new rH(new Float32Array(f.array),f.itemSize));break;case"BatchedMesh":s=l(e.geometry),o=u(e.material),(a=new nm(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,o)).geometry=s,a.perObjectFrustumCulled=e.perObjectFrustumCulled,a.sortObjects=e.sortObjects,a._drawRanges=e.drawRanges,a._reservedRanges=e.reservedRanges,a._geometryInfo=e.geometryInfo.map(e=>{let t=null,r=null;return void 0!==e.boundingBox&&(t=new td().fromJSON(e.boundingBox)),void 0!==e.boundingSphere&&(r=new tz().fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:r}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),void 0!==e.colorsTexture&&(a._colorsTexture=c(e.colorsTexture.uuid)),void 0!==e.boundingSphere&&(a.boundingSphere=new tz().fromJSON(e.boundingSphere)),void 0!==e.boundingBox&&
1(a.boundingBox=new td().fromJSON(e.boundingBox));break;case"LOD":a=new rs;break;case"Line":a=new nM(l(e.geometry),u(e.material));break;case"LineLoop":a=new nP(l(e.geometry),u(e.material));break;case"LineSegments":a=new nC(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":a=new nD(l(e.geometry),u(e.material));break;case"Sprite":a=new rr(u(e.material));break;case"Group":a=new e$;break;case"Bone":a=new rz;break;default:a=new eY}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.up&&a.up.fromArray(e.up),void 0!==e.pivot&&(a.pivot=new Q().fromArray(e.pivot)),void 0!==e.morphTargetDictionary&&(a.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),void 0!==e.morphTargetInfluences&&(a.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.intensity&&(a.shadow.intensity=e.shadow.intensity),void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(a.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.static&&(a.static=e.static),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children){let s=e.children;for(let e=0;e<s.length;e++)a.add(this.parseObject(s[e],t,r,n,i))}if(void 0!==e.animations){let t=e.animations;for(let e=0;e<t.length;e++){let r=t[e];a.animations.push(i[r])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(a.autoUpdate=e.autoUpdate);let t=e.levels;for(let e=0;e<t.length;e++){let r=t[e],n=a.getObjectByProperty("uuid",r.object);void 0!==n&&a.addLevel(n,r.distance,r.hysteresis)}}return a}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse(function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){let r=t[e.skeleton];void 0===r?D("ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(r,e.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){let r=t.target,n=e.getObjectByProperty("uuid",r);void 0!==n?t.target=n:t.target=new eY}})}},"ObjectSpaceNormalMap",0,1,"OctahedronGeometry",0,iX,"OneFactor",0,201,"OneMinusConstantAlphaFactor",0,214,"OneMinusConstantColorFactor",0,212,"OneMinusDstAlphaFactor",0,207,"OneMinusDstColorFactor",0,209,"OneMinusSrcAlphaFactor",0,205,"OneMinusSrcColorFactor",0,203,"OrthographicCamera",0,a4,"PCFShadowMap",0,1,"PCFSoftShadowMap",0,2,"Path",0,ib,"PerspectiveCamera",0,aQ,"Plane",0,r2,"PlaneGeometry",0,iq,"PlaneHelper",0,class extends nM{constructor(e,t=1,r=0xffff00){const n=new tq;n.setAttribute("position",new tD([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),n.computeBoundingSphere(),super(n,new ng({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const i=new tq;i.setAttribute("position",new tD([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),i.computeBoundingSphere(),this.add(new rA(i,new rm({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}},"PointLight",0,a3,"PointLightHelper",0,class extends rA{constructor(e,t,r){super(new iK(t,4,2),new rm({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.color=r,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},"Points",0,nD,"PointsMaterial",0,nI,"PolarGridHelper",0,class extends nC{constructor(e=10,t=16,r=8,n=64,i=4473924,a=8947848){i=new e2(i),a=new e2(a);const s=[],o=[];if(t>1)for(let r=0;r<t;r++){const n=r/t*(2*Math.PI),l=Math.sin(n)*e,u=Math.cos(n)*e;s.push(0,0,0),s.push(l,0,u);const c=1&r?i:a;o.push(c.r,c.g,c.b),o.push(c.r,c.g,c.b)}for(let t=0;t<r;t++){const l=1&t?i:a,u=e-e/r*t;for(let e=0;e<n;e++){let t=e/n*(2*Math.PI),r=Math.sin(t)*u,i=Math.cos(t)*u;s.push(r,0,i),o.push(l.r,l.g,l.b),r=Math.sin(t=(e+1)/n*(2*Math.PI))*u,i=Math.cos(t)*u,s.push(r,0,i),o.push(l.r,l.g,l.b)}}const l=new tq;l.setAttribute("position",new tD(s,3)),l.setAttribute("color",new tD(o,3)),super(l,new ng({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},"PolyhedronGeometry",0,nY,"PositionalAudio",0,class extends sM{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,r){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=r,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(sT,sE,sA),sC.set(0,0,1).applyQuaternion(sE);let t=this.panner;if(t.positionX){let e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(sT.x,e),t.positionY.linearRampToValueAtTime(sT.y,e),t.positionZ.linearRampToValueAtTime(sT.z,e),t.orientationX.linearRampToValueAtTime(sC.x,e),t.orientationY.linearRampToValueAtTime(sC.y,e),t.orientationZ.linearRampToValueAtTime(sC.z,e)}else t.setPosition(sT.x,sT.y,sT.z),t.setOrientation(sC.x,sC.y,sC.z)}},"PropertyBinding",0,sk,"PropertyMixer",0,sP,"QuadraticBezierCurve",0,iu,"QuadraticBezierCurve3",0,ic,"Quaternion",0,J,"QuaternionKeyframeTrack",0,aE,"QuaternionLinearInterpolant",0,aT,"R11_EAC_Format",0,37488,"RAD2DEG",0,H,"RED_GREEN_RGTC2_Format",0,36285,"RED_RGT
1C1_Format",0,36283,"REVISION",0,"185","RG11_EAC_Format",0,37490,"RGBADepthPacking",0,3201,"RGBAFormat",0,1023,"RGBAIntegerFormat",0,1033,"RGBA_ASTC_10x10_Format",0,37819,"RGBA_ASTC_10x5_Format",0,37816,"RGBA_ASTC_10x6_Format",0,37817,"RGBA_ASTC_10x8_Format",0,37818,"RGBA_ASTC_12x10_Format",0,37820,"RGBA_ASTC_12x12_Format",0,37821,"RGBA_ASTC_4x4_Format",0,37808,"RGBA_ASTC_5x4_Format",0,37809,"RGBA_ASTC_5x5_Format",0,37810,"RGBA_ASTC_6x5_Format",0,37811,"RGBA_ASTC_6x6_Format",0,37812,"RGBA_ASTC_8x5_Format",0,37813,"RGBA_ASTC_8x6_Format",0,37814,"RGBA_ASTC_8x8_Format",0,37815,"RGBA_BPTC_Format",0,36492,"RGBA_ETC2_EAC_Format",0,37496,"RGBA_PVRTC_2BPPV1_Format",0,35843,"RGBA_PVRTC_4BPPV1_Format",0,35842,"RGBA_S3TC_DXT1_Format",0,33777,"RGBA_S3TC_DXT3_Format",0,33778,"RGBA_S3TC_DXT5_Format",0,33779,"RGBDepthPacking",0,3202,"RGBFormat",0,1022,"RGBIntegerFormat",0,1032,"RGB_BPTC_SIGNED_Format",0,36494,"RGB_BPTC_UNSIGNED_Format",0,36495,"RGB_ETC1_Format",0,36196,"RGB_ETC2_Format",0,37492,"RGB_PVRTC_2BPPV1_Format",0,35841,"RGB_PVRTC_4BPPV1_Format",0,35840,"RGB_S3TC_DXT1_Format",0,33776,"RGDepthPacking",0,3203,"RGFormat",0,1030,"RGIntegerFormat",0,1031,"RawShaderMaterial",0,at,"Ray",0,rp,"Raycaster",0,sB,"RectAreaLight",0,a9,"RedFormat",0,1028,"RedIntegerFormat",0,1029,"ReinhardToneMapping",0,2,"RenderTarget",0,ev,"RenderTarget3D",0,class extends ev{constructor(e=1,t=1,r=1,n={}){super(e,t,n),this.isRenderTarget3D=!0,this.depth=r,this.texture=new eb(null,e,t,r),this._setTextureOptions(n),this.texture.isRenderTargetTexture=!0}},"RepeatWrapping",0,1e3,"ReplaceStencilOp",0,7681,"ReverseSubtractEquation",0,102,"ReversedDepthFuncs",0,z,"RingGeometry",0,iY,"SIGNED_R11_EAC_Format",0,37489,"SIGNED_RED_GREEN_RGTC2_Format",0,36286,"SIGNED_RED_RGTC1_Format",0,36284,"SIGNED_RG11_EAC_Format",0,37491,"SRGBColorSpace",0,_,"SRGBTransfer",0,M,"Scene",0,e6,"ShaderMaterial",0,ae,"ShadowMaterial",0,i4,"Shape",0,i_,"ShapeGeometry",0,i$,"ShapePath",0,class{constructor(){this.type="ShapePath",this.color=new e2,this.subPaths=[],this.currentPath=null,this.userData={}}moveTo(e,t){return this.currentPath=new ib,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,r,n){return this.currentPath.quadraticCurveTo(e,t,r,n),this}bezierCurveTo(e,t,r,n,i,a){return this.currentPath.bezierCurveTo(e,t,r,n,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(){function e(e,t){let r=!1,n=t.length;for(let i=0,a=n-1;i<n;a=i++){let n=t[i],s=t[a];n.y>e.y!=s.y>e.y&&e.x<(s.x-n.x)*(e.y-n.y)/(s.y-n.y)+n.x&&(r=!r)}return r}let t=this.userData.style&&this.userData.style.fillRule||"nonzero";"nonzero"!==t&&"evenodd"!==t&&(D('Fill-rule "'+t+'" is not supported, falling back to "nonzero".'),t="nonzero");let r="nonzero"===t?e=>0!==e:e=>(1&e)!=0,n=[];for(let t of this.subPaths){let r=t.getPoints();if(r.length<3)continue;let i=iz.area(r);if(0===i)continue;let a=new sq;for(let e=0;e<r.length;e++)a.expandByPoint(r[e]);n.push({subPath:t,points:r,boundingBox:a,interiorPoint:function(t,r){let n=r.getCenter(new Z);if(e(n,t))return n;let i=n.y,a=[],s=t.length;for(let e=0;e<s;e++){let r=t[e],n=t[(e+1)%s];if(r.y>i!=n.y>i){let e=r.x+(i-r.y)*(n.x-r.x)/(n.y-r.y);a.push(e)}}return a.length>1&&(a.sort((e,t)=>e-t),n.x=(a[0]+a[1])/2),n}(r,a),absArea:Math.abs(i),winding:i<0?-1:1,container:null,exclude:!1,role:null})}n.sort((e,t)=>t.absArea-e.absArea);for(let t=0;t<n.length;t++){let i=n[t],a=0;for(let r=t-1;r>=0;r--){let t=n[r];if(t.boundingBox.containsBox(i.boundingBox)&&e(i.interiorPoint,t.points)){i.container=t.exclude?t.container:t,a=t.winding,i.winding+=a;break}}r(i.winding)===r(a)&&(i.exclude=!0)}for(let e of n)e.exclude||(e.role=null===e.container||"hole"===e.container.role?"outer":"hole");let i=[],a=new Map;for(let e of n){if(e.exclude||"outer"!==e.role)continue;let t=new i_;t.curves=e.subPath.curves,i.push(t),a.set(e,t)}for(let e of n){if(e.exclude||"hole"!==e.role)continue;let t=a.get(e.container);if(!t)continue;let r=new ib;r.curves=e.subPath.curves,t.holes.push(r)}return i}},"ShapeUtils",0,iz,"ShortType",0,1011,"Skeleton",0,rG,"SkeletonHelper",0,class extends nC{constructor(e){const t=function e(t){let r=[];!0===t.isBone&&r.push(t);for(let n=0;n<t.children.length;n++)r.push(...e(t.children[n]));return r}(e),r=new tq,n=[],i=[];for(let e=0;e<t.length;e++){const r=t[e];r.parent&&r.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),i.push(0,0,0),i.push(0,0,0))}r.setAttribute("position",new tD(n,3)),r.setAttribute("color",new tD(i,3)),super(r,new ng({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const a=new e2(255),s=new e2(65280);this.setColors(a,s)}updateMatrixWorld(e){let t=this.bones,r=this.geometry,n=r.getAttribute("position");s4.copy(this.root.matrixWorld).invert();for(let e=0,r=0;e<t.length;e++){let i=t[e];i.parent&&i.parent.isBone&&(s3.multiplyMatrices(s4,i.matrixWorld),s2.setFromMatrixPosition(s3),n.setXYZ(r,s2.x,s2.y,s2.z),s3.multiplyMatrices(s4,i.parent.matrixWorld),s2.setFromMatrixPosition(s3),n.setXYZ(r+1,s2.x,s2.y,s2.z),r+=2)}r.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){let r=this.geometry.getAttribute("color");for(let n=0;n<r.count;n+=2)r.setXYZ(n,e.r,e.g,e.b),r.setXYZ(n+1,t.r,t.g,t.b);return r.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},"SkinnedMesh",0,rF,"Source",0,ed,"Sphere",0,tz,"SphereGeometry",0,iK,"Spherical",0,class{constructor(e=1,t=0,r=0){this.radius=e,this.phi=t,this.theta=r}set(e,t,r){return this.radius=e,this.phi=t,this.theta=r,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=X(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,r){return this.radius=Math.sqrt(e*e+t*t+r*r),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,r),this.phi=Math.acos(X(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}},"SphericalHarmonics3",0,a7,"SplineCurve",0,id,"SpotLight",0,a1,"SpotLightHelper",0,class extends eY{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const r=new tq,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1;e<32;e++,t++){const r=e/32*Math.PI*2,i=t/32*Math.PI*2;n.push(Math.cos(r),Math.sin(r),1,Math.cos(i),Math.sin(i),1)}r.setAttribute("position",new tD(n,3));const i=new ng({fog:!1,toneMapped:!1});this.cone=new nC(r,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorldNeedsUpdate=!0;let e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),s1.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(s1),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}
1,"Sprite",0,rr,"SpriteMaterial",0,tQ,"SrcAlphaFactor",0,204,"SrcAlphaSaturateFactor",0,210,"SrcColorFactor",0,202,"StaticCopyUsage",0,35046,"StaticDrawUsage",0,35044,"StaticReadUsage",0,35045,"StereoCamera",0,class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new aQ,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new aQ,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){let r,n;t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,sp.copy(e.projectionMatrix);let i=t.eyeSep/2,a=i*t.near/t.focus,s=t.near*Math.tan(G*t.fov*.5)/t.zoom;sf.elements[12]=-i,sh.elements[12]=i,r=-s*t.aspect+a,n=s*t.aspect+a,sp.elements[0]=2*t.near/(n-r),sp.elements[8]=(n+r)/(n-r),this.cameraL.projectionMatrix.copy(sp),r=-s*t.aspect-a,n=s*t.aspect-a,sp.elements[0]=2*t.near/(n-r),sp.elements[8]=(n+r)/(n-r),this.cameraR.projectionMatrix.copy(sp)}this.cameraL.matrix.copy(e.matrixWorld).multiply(sf),this.cameraL.matrixWorldNeedsUpdate=!0,this.cameraR.matrix.copy(e.matrixWorld).multiply(sh),this.cameraR.matrixWorldNeedsUpdate=!0}},"StreamCopyUsage",0,35042,"StreamDrawUsage",0,35040,"StreamReadUsage",0,35041,"StringKeyframeTrack",0,aA,"SubtractEquation",0,101,"SubtractiveBlending",0,3,"TOUCH",0,{ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},"TangentSpaceNormalMap",0,0,"TetrahedronGeometry",0,iZ,"Texture",0,em,"TextureLoader",0,class extends aN{constructor(e){super(e)}load(e,t,r,n){let i=new em,a=new az(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)},r,n),i}},"TextureUtils",0,class{static contain(e,t){let r;return(r=e.image&&e.image.width?e.image.width/e.image.height:1)>t?(e.repeat.x=1,e.repeat.y=r/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/r,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}static cover(e,t){let r;return(r=e.image&&e.image.width?e.image.width/e.image.height:1)>t?(e.repeat.x=t/r,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=r/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}static fill(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}static getByteLength(e,t,r,n){return os(e,t,r,n)}},"Timer",0,sv,"TimestampQuery",0,{COMPUTE:"compute",RENDER:"render"},"TorusGeometry",0,iJ,"TorusKnotGeometry",0,iQ,"Triangle",0,tc,"TriangleFanDrawMode",0,2,"TriangleStripDrawMode",0,1,"TrianglesDrawMode",0,0,"TubeGeometry",0,i0,"UVMapping",0,300,"Uint16BufferAttribute",0,tL,"Uint32BufferAttribute",0,tN,"Uint8BufferAttribute",0,class extends tR{constructor(e,t,r){super(new Uint8Array(e),t,r)}},"Uint8ClampedBufferAttribute",0,class extends tR{constructor(e,t,r){super(new Uint8ClampedArray(e),t,r)}},"Uniform",0,class e{constructor(e){this.value=e}clone(){return new e(void 0===this.value.clone?this.value:this.value.clone())}},"UniformsGroup",0,class extends j{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:sz++}),this.name="",this.usage=35044,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){let t=this.uniforms.indexOf(e);return -1!==t&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;let t=e.uniforms;this.uniforms.length=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;e<r.length;e++)this.uniforms.push(r[e].clone())}return this}clone(){return new this.constructor().copy(this)}},"UniformsUtils",0,i7,"UnsignedByteType",0,1009,"UnsignedInt101111Type",0,35899,"UnsignedInt248Type",0,1020,"UnsignedInt5999Type",0,35902,"UnsignedIntType",0,1014,"UnsignedShort4444Type",0,1017,"UnsignedShort5551Type",0,1018,"UnsignedShortType",0,1012,"VSMShadowMap",0,3,"Vector2",0,Z,"Vector3",0,Q,"Vector4",0,eg,"VectorKeyframeTrack",0,aC,"VideoFrameTexture",0,class extends nU{constructor(e,t,r,n,i,a,s,o){super({},e,t,r,n,i,a,s,o),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}},"VideoTexture",0,nU,"WebGL3DRenderTarget",0,class extends ey{constructor(e=1,t=1,r=1,n={}
1){super(e,t,n),this.isWebGL3DRenderTarget=!0,this.depth=r,this.texture=new eb(null,e,t,r),this._setTextureOptions(n),this.texture.isRenderTargetTexture=!0}},"WebGLArrayRenderTarget",0,class extends ey{constructor(e=1,t=1,r=1,n={}){super(e,t,n),this.isWebGLArrayRenderTarget=!0,this.depth=r,this.texture=new ex(null,e,t,r),this._setTextureOptions(n),this.texture.isRenderTargetTexture=!0}},"WebGLCoordinateSystem",0,2e3,"WebGLRenderTarget",0,ey,"WebGPUCoordinateSystem",0,2001,"WebXRController",0,eZ,"WireframeGeometry",0,i1,"WrapAroundEnding",0,2402,"ZeroCurvatureEnding",0,2400,"ZeroFactor",0,200,"ZeroSlopeEnding",0,2401,"ZeroStencilOp",0,0,"cloneUniforms",0,i5,"createCanvasElement",0,I,"createElementNS",0,P,"error",0,k,"getByteLength",0,os,"getConsoleFunction",0,function(){return R},"getUnlitUniformColorSpace",0,i9,"log",0,L,"mergeUniforms",0,i6,"probeAsync",0,F,"setConsoleFunction",0,function(e){R=e},"warn",0,D,"warnOnce",0,U],90072);var oo=e.i(47167),ol=e.i(71645);function ou(){let e=null,t=!1,r=null,n=null;function i(t,a){r(t,a),n=e.requestAnimationFrame(i)}return{start:function(){!0===t||null===r||null!==e&&(n=e.requestAnimationFrame(i),t=!0)},stop:function(){null!==e&&e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(e){r=e},setContext:function(t){e=t}}}function oc(e){let t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(r){r.isInterleavedBufferAttribute&&(r=r.data);let n=t.get(r);n&&(e.deleteBuffer(n.buffer),t.delete(r))},update:function(r,n){if(r.isInterleavedBufferAttribute&&(r=r.data),r.isGLBufferAttribute){let e=t.get(r);(!e||e.version<r.version)&&t.set(r,{buffer:r.buffer,type:r.type,bytesPerElement:r.elementSize,version:r.version});return}let i=t.get(r);if(void 0===i)t.set(r,function(t,r){let n,i=t.array,a=t.usage,s=i.byteLength,o=e.createBuffer();if(e.bindBuffer(r,o),e.bufferData(r,i,a),t.onUploadCallback(),i instanceof Float32Array)n=e.FLOAT;else if("u">typeof Float16Array&&i instanceof Float16Array)n=e.HALF_FLOAT;else if(i instanceof Uint16Array)n=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(i instanceof Int16Array)n=e.SHORT;else if(i instanceof Uint32Array)n=e.UNSIGNED_INT;else if(i instanceof Int32Array)n=e.INT;else if(i instanceof Int8Array)n=e.BYTE;else if(i instanceof Uint8Array)n=e.UNSIGNED_BYTE;else if(i instanceof Uint8ClampedArray)n=e.UNSIGNED_BYTE;else throw Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);return{buffer:o,type:n,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version,size:s}}(r,n));else if(i.version<r.version){if(i.size!==r.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.");!function(t,r,n){let i=r.array,a=r.updateRanges;if(e.bindBuffer(n,t),0===a.length)e.bufferSubData(n,0,i);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;e<a.length;e++){let r=a[t],n=a[e];n.start<=r.start+r.count+1?r.count=Math.max(r.count,n.start+n.count-r.start):a[++t]=n}a.length=t+1;for(let t=0,r=a.length;t<r;t++){let r=a[t];e.bufferSubData(n,r.start*i.BYTES_PER_ELEMENT,i,r.start,r.count)}r.clearUpdateRanges()}r.onUploadCallback()}(i.buffer,r,n),i.version=r.version}}}}let od={alphahash_fragment:"#ifdef USE_ALPHAHASH\n if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n const float ALPHA_HASH_SCALE = 0.05;\n float hash2D( vec2 value ) {\n return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n }\n float hash3D( vec3 value ) {\n return hash2D( vec2( hash2D( value.xy ), value.z ) );\n }\n float getAlphaHashThreshold( vec3 position ) {\n float maxDeriv = max(\n length( dFdx( position.xyz ) ),\n length( dFdy( position.xyz ) )\n );\n float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n vec2 pixScales = vec2(\n exp2( floor( log2( pixScale ) ) ),\n exp2( ceil( log2( pixScale ) ) )\n );\n vec2 alpha = vec2(\n hash3D( floor( pixScales.x * position.xyz ) ),\n hash3D( floor( pixScales.y * position.xyz ) )\n );\n float lerpFactor = fract( log2( pixScale ) );\n float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n float a = min( lerpFactor, 1.0 - lerpFactor );\n vec3 cases = vec3(\n x * x / ( 2.0 * a * ( 1.0 - a ) ),\n ( x - 0.5 * a ) / ( 1.0 - a ),\n 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n );\n float threshold = ( x < ( 1.0 - a ) )\n ? ( ( x < a ) ? cases.x : cases.y )\n : cases.z;\n return clamp( threshold , 1.0e-6, 1.0 );\n }\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n #ifdef ALPHA_TO_COVERAGE\n diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n uniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot
1( geometryNormal, geometryViewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n #endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n #if ! defined( GL_ANGLE_multi_draw )\n #define gl_DrawID _gl_DrawID\n uniform int _gl_DrawID;\n #endif\n uniform highp sampler2D batchingTexture;\n uniform highp usampler2D batchingIdTexture;\n mat4 getBatchingMatrix( const in float i ) {\n int size = textureSize( batchingTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n float getIndirectIndex( const in int i ) {\n int size = textureSize( batchingIdTexture, 0 ).x;\n int x = i % size;\n int y = i / size;\n return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n }\n#endif\n#ifdef USE_BATCHING_COLOR\n uniform sampler2D batchingColorTexture;\n vec4 getBatchingColor( const in float i ) {\n int size = textureSize( batchingColorTexture, 0 ).x;\n int j = int( i );\n int x = j % size;\n int y = j / size;\n return texelFetch( batchingColorTexture, ivec2( x, y ), 0 );\n }\n#endif",batching_vertex:"#ifdef USE_BATCHING\n mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n vPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( specularColor, 1.0, dotVH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n const mat3 XYZ_TO_REC709 = mat3(\n 3.2404542, -0.9692660, 0.0556434,\n -1.5371385, 1.8760108, -0.2040259,\n -0.4985314, 0.0415560, 1.0572252\n );\n vec3 Fresnel0ToIor( vec3 fresnel0 ) {\n vec3 sqrtF0 = sqrt( fresnel0 );\n return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n }\n vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n }\n float IorToFresnel0( float transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n }\n vec3 evalSensitivity( float OPD, vec3 shift ) {\n float phase = 2.0 * PI * OPD * 1.0e-9;\n vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n 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 ) );\n xyz /= 1.0685e-7;\n vec3 rgb = XYZ_TO_REC709 * xyz;\n return rgb;\n }\n vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n vec3 I;\n float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n float cosTheta2Sq = 1.0 - sinTheta2Sq;\n if ( cosTheta2Sq < 0.0 ) {\n return vec3( 1.0 );\n }\n float cosTheta2 = sqrt( cosTheta2Sq );\n float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
1\n float R12 = F_Schlick( R0, 1.0, cosTheta1 );\n float T121 = 1.0 - R12;\n float phi12 = 0.0;\n if ( iridescenceIOR < outsideIOR ) phi12 = PI;\n float phi21 = PI - phi12;\n vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n vec3 phi23 = vec3( 0.0 );\n if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n vec3 phi = vec3( phi21 ) + phi23;\n vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n vec3 r123 = sqrt( R123 );\n vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n vec3 C0 = R12 + Rs;\n I = C0;\n vec3 Cm = Rs - T121;\n for ( int m = 1; m <= 2; ++ m ) {\n Cm *= r123;\n vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n I += Cm * Sm;\n }\n return max( I, vec3( 0.0 ) );\n }\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vBumpMapUv );\n vec2 dSTdy = dFdy( vBumpMapUv );\n float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #ifdef ALPHA_TO_COVERAGE\n float distanceToPlane, distanceGradient;\n float clipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n if ( clipOpacity == 0.0 ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n float unionClipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n }\n #pragma unroll_loop_end\n clipOpacity *= 1.0 - unionClipOpacity;\n #endif\n diffuseColor.a *= clipOpacity;\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n #endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n varying vec4 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n vColor = vec4( 1.0 );\n#endif\n#ifdef USE_COLOR_ALPHA\n vColor *= color;\n#elif defined( USE_COLOR )\n vColor.rgb *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.rgb *= instanceColor.rgb;\n#endif\n#ifdef USE_BATCHING_COLOR\n vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) );\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\n#define inverseTransformDirection transformDirectionByInverseViewMatrix\nvec3 transformNormalByInverseViewMatrix( in vec3 normal, in mat4 viewMatrix ) {\n return normalize( ( vec4( normal, 0.0 ) * viewMatrix ).xyz );\n}\nvec3 transformDirectionByInverseViewMatrix( in vec3 dir, in mat4 viewMatrix ) {\n return normalize( ( vec4( dir, 0.0 ) * viewMatrix ).xyz );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n vec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n mat3 bm = mat3( batchingMatrix );
1\n transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n transformedNormal = bm * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = bm * transformedTangent;\n #endif\n#endif\n#ifdef USE_INSTANCING\n mat3 im = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n transformedNormal = im * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = im * transformedTangent;\n #endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n emissiveColor = sRGBTransferEOTF( emissiveColor );\n #endif\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n 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 );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n 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 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, envMapRotation * reflectVec );\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n #endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform mat3 envMapRotation;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );
1\n reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n reflectVec = transformDirectionByInverseViewMatrix( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n }
1 else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",fog_vertex:"#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid 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 ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }
1\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif\n#include <lightprobes_pars_fragment>",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid 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 ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid 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 ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid 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 ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = metalnessFactor;\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = vec3( 0.04 );\n material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;
1\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n material.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n if( material.anisotropy == 0.0 ) {\n anisotropyV = vec2( 1.0, 0.0 );\n } else {\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n }\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"uniform sampler2D dfgLUT;\nstruct PhysicalMaterial {\n vec3 diffuseColor;\n vec3 diffuseContribution;\n vec3 specularColor;\n vec3 specularColorBlended;\n float roughness;\n float metalness;\n float specularF90;\n float dispersion;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n vec3 iridescenceFresnelDielectric;\n vec3 iridescenceFresnelMetallic;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n 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 ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alph
1aB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColorBlended;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x >
1 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float rInv = 1.0 / ( roughness + 0.1 );\n float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n float DG = exp( a * dotNV + b );\n return saturate( DG );\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid 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 ) {\n#else\nvoid 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 ) {\n#endif\n float dotNV = saturate( dot( normal, viewDir ) );\n vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
1\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n float Ess_V = dfgV.x + dfgV.y;\n float Ess_L = dfgL.x + dfgL.y;\n float Ems_V = 1.0 - Ess_V;\n float Ems_L = 1.0 - Ess_L;\n vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;\n vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n float compensationFactor = Ems_V * Ems_L;\n vec3 multiScatter = Fms * compensationFactor;\n return singleScatter + multiScatter;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n 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 ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n #ifdef USE_CLEARCOAT\n vec3 Ncc = geometryClearcoatNormal;\n vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness );\n vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat );\n vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat );\n mat3 mInvClearcoat = mat3(\n vec3( t1Clearcoat.x, 0, t1Clearcoat.y ),\n vec3( 0, 1, 0 ),\n vec3( t1Clearcoat.z, 0, t1Clearcoat.w )\n );\n vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y;\n clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords );\n #endif\n }\n#endif\nvoid 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 ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n \n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n irradiance *= sheenEnergyComp;\n \n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\n}\nvoid 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 ) {\n vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n #ifdef USE_SHEEN\n float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n diffuse *= sheenEnergyComp;\n #endif\n reflectedLight.indirectDiffuse += diffuse;\n}\nvoid 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) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;\n #endif\n vec3 singleScatteringDielectric = vec3( 0.0 );\n vec3 multiScatteringDielectric = vec3( 0.0 );\n vec3 singleScatteringMetallic = vec3( 0.0 );\n vec3 multiScatteringMetallic = vec3( 0.0 );
1\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n #endif\n vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n vec3 indirectSpecular = radiance * singleScattering;\n indirectSpecular += multiScattering * cosineWeightedIrradiance;\n vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n #ifdef USE_SHEEN\n float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n indirectSpecular *= sheenEnergyComp;\n indirectDiffuse *= sheenEnergyComp;\n #endif\n reflectedLight.indirectSpecular += indirectSpecular;\n reflectedLight.indirectDiffuse += indirectDiffuse;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }
1\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n #ifdef USE_LIGHT_PROBES_GRID\n vec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz;\n vec3 probeWorldNormal = transformNormalByInverseViewMatrix( geometryNormal, viewMatrix );\n irradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal );\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV )\n #if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n #if defined( LAMBERT ) || defined( PHONG )\n irradiance += iblIrradiance;\n #endif\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",lightprobes_pars_fragment:"#ifdef USE_LIGHT_PROBES_GRID\nuniform highp sampler3D probesSH;\nuniform vec3 probesMin;\nuniform vec3 probesMax;\nuniform vec3 probesResolution;\nvec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {\n vec3 res = probesResolution;\n vec3 gridRange = probesMax - probesMin;\n vec3 resMinusOne = res - 1.0;\n vec3 probeSpacing = gridRange / resMinusOne;\n vec3 samplePos = worldPos + worldNormal * probeSpacing * 0.5;\n vec3 uvw = clamp( ( samplePos - probesMin ) / gridRange, 0.0, 1.0 );\n uvw = uvw * resMinusOne / res + 0.5 / res;\n float nz = res.z;\n float paddedSlices = nz + 2.0;\n float atlasDepth = 7.0 * paddedSlices;\n float uvZBase = uvw.z * nz + 1.0;\n vec4 s0 = texture( probesSH, vec3( uvw.xy, ( uvZBase ) / atlasDepth ) );\n vec4 s1 = texture( probesSH, vec3( uvw.xy, ( uvZBase + paddedSlices ) / atlasDepth ) );\n vec4 s2 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 2.0 * paddedSlices ) / atlasDepth ) );\n vec4 s3 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 3.0 * paddedSlices ) / atlasDepth ) );\n vec4 s4 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 4.0 * paddedSlices ) / atlasDepth ) );\n vec4 s5 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 5.0 * paddedSlices ) / atlasDepth ) );\n vec4 s6 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 6.0 * paddedSlices ) / atlasDepth ) );\n vec3 c0 = s0.xyz;\n vec3 c1 = vec3( s0.w, s1.xy );\n vec3 c2 = vec3( s1.zw, s2.x );\n vec3 c3 = s2.yzw;\n vec3 c4 = s3.xyz;\n vec3 c5 = vec3( s3.w, s4.xy );\n vec3 c6 = vec3( s4.zw, s5.x );\n vec3 c7 = s5.yzw;\n vec3 c8 = s6.xyz;\n float x = worldNormal.x, y = worldNormal.y, z = worldNormal.z;\n vec3 result = c0 * 0.886227;\n result += c1 * 2.0 * 0.511664 * y;\n result += c2 * 2.0 * 0.511664 * z;\n result += c3 * 2.0 * 0.511664 * x;\n result += c4 * 2.0 * 0.429043 * x * y;\n result += c5 * 2.0 * 0.429043 * y * z;\n result += c6 * ( 0.743125 * z * z - 0.247708 );\n result += c7 * 2.0 * 0.429043 * x * z;\n result += c8 * 0.429043 * ( x * x - y * y );\n return max( result, vec3( 0.0 ) );\n}\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n uniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n }\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n #ifndef USE_INSTANCING_MORPH\n uniform float morphTargetBaseInfluence;\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n #endif\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #ifdef DOUBLE_SIDED\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #ifdef DOUBLE_SIDED\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #if defined( USE_PACKED_NORMALMAP )\n mapN = vec3( mapN.xy, sqrt( saturate( 1.0 - dot( mapN.xy, mapN.xy ) ) ) );\n #endif\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );
1\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #ifdef FLIP_SIDED\n vBitangent = - vBitangent;\n #endif\n #endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n if( v <= 0.0 )\n return vec4( 0., 0., 0., 0. );\n if( v >= 1.0 )\n return vec4( 1., 1., 1., 1. );\n float vuf;\n float af = modf( v * PackFactors.a, vuf );\n float bf = modf( vuf * ShiftRight8, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n if( v <= 0.0 )\n return vec3( 0., 0., 0. );\n if( v >= 1.0 )\n return vec3( 1., 1., 1. );\n float vuf;\n float bf = modf( v * PackFactors.b, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n if( v <= 0.0 )\n return vec2( 0., 0. );\n if( v >= 1.0 )\n return vec2( 1., 1. );\n float vuf;\n float gf = modf( v * 256., vuf );\n return vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n return dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 25
15.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n #ifdef USE_REVERSED_DEPTH_BUFFER\n \n return depth * ( far - near ) - far;\n #else\n return depth * ( near - far ) - near;\n #endif\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n \n #ifdef USE_REVERSED_DEPTH_BUFFER\n return ( near * far ) / ( ( near - far ) * depth - near );\n #else\n return ( near * far ) / ( ( far - near ) * depth - far );\n #endif\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n mvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #if defined( SHADOWMAP_TYPE_PCF )\n uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n #else\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n #if defined( SHADOWMAP_TYPE_PCF )\n uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n #else\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #if defined( SHADOWMAP_TYPE_PCF )\n uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n #elif defined( SHADOWMAP_TYPE_BASIC )\n uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n #if defined( SHADOWMAP_TYPE_PCF )\n float interleavedGradientNoise( vec2 position ) {\n return fract( 52.9829189 * fract( dot
1( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n }\n vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n const float goldenAngle = 2.399963229728653;\n float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n float theta = float( sampleIndex ) * goldenAngle + phi;\n return vec2( cos( theta ), sin( theta ) ) * r;\n }\n #endif\n #if defined( SHADOWMAP_TYPE_PCF )\n float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float radius = shadowRadius * texelSize.x;\n float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;\n shadow = (\n texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n ) * 0.2;\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n #elif defined( SHADOWMAP_TYPE_VSM )\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n #ifdef USE_REVERSED_DEPTH_BUFFER\n shadowCoord.z -= shadowBias;\n #else\n shadowCoord.z += shadowBias;\n #endif\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n float mean = distribution.x;\n float variance = distribution.y * distribution.y;\n #ifdef USE_REVERSED_DEPTH_BUFFER\n float hard_shadow = step( mean, shadowCoord.z );\n #else\n float hard_shadow = step( shadowCoord.z, mean );\n #endif\n \n if ( hard_shadow == 1.0 ) {\n shadow = 1.0;\n } else {\n variance = max( variance, 0.0000001 );\n float d = shadowCoord.z - mean;\n float p_max = variance / ( variance + d * d );\n p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n shadow = max( hard_shadow, p_max );\n }\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n #else\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n #ifdef USE_REVERSED_DEPTH_BUFFER\n shadowCoord.z -= shadowBias;\n #else\n shadowCoord.z += shadowBias;\n #endif\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n float depth = texture2D( shadowMap, shadowCoord.xy ).r;\n #ifdef USE_REVERSED_DEPTH_BUFFER\n shadow = step( depth, shadowCoord.z );\n #else\n shadow = step( shadowCoord.z, depth );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #if defined( SHADOWMAP_TYPE_PCF )\n float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n vec3 bd3D = normalize( lightToPosition );\n vec3 absVec = abs( lightToPosition );\n float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n #ifdef USE_REVERSED_DEPTH_BUFFER\n float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
1\n dp -= shadowBias;\n #else\n float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n dp += shadowBias;\n #endif\n float texelSize = shadowRadius / shadowMapSize.x;\n vec3 absDir = abs( bd3D );\n vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n tangent = normalize( cross( bd3D, tangent ) );\n vec3 bitangent = cross( bd3D, tangent );\n float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;\n vec2 sample0 = vogelDiskSample( 0, 5, phi );\n vec2 sample1 = vogelDiskSample( 1, 5, phi );\n vec2 sample2 = vogelDiskSample( 2, 5, phi );\n vec2 sample3 = vogelDiskSample( 3, 5, phi );\n vec2 sample4 = vogelDiskSample( 4, 5, phi );\n shadow = (\n texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) +\n texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) +\n texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) +\n texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) +\n texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) )\n ) * 0.2;\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n #elif defined( SHADOWMAP_TYPE_BASIC )\n float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n vec3 absVec = abs( lightToPosition );\n float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n float depth = textureCube( shadowMap, bd3D ).r;\n #ifdef USE_REVERSED_DEPTH_BUFFER\n depth = 1.0 - depth;\n #endif\n shadow = step( dp, depth );\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n #endif\n #endif\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n #ifdef HAS_NORMAL\n vec3 shadowWorldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );\n #else\n vec3 shadowWorldNormal = vec3( 0.0 );\n #endif\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }
1\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n mat4 getBoneMatrix( const in float i ) {\n int size = textureSize( boneTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;
1\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n vec3( 1.6605, - 0.1246, - 0.0182 ),\n vec3( - 0.5876, 1.1329, - 0.1006 ),\n vec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n vec3( 0.6274, 0.0691, 0.0164 ),\n vec3( 0.3293, 0.9195, 0.0880 ),\n vec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n vec3 x2 = x * x;\n vec3 x4 = x2 * x2;\n return + 15.5 * x4 * x2\n - 40.14 * x4 * x\n + 31.96 * x4\n - 6.868 * x2 * x\n + 0.4298 * x2\n + 0.1191 * x\n - 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n const mat3 AgXInsetMatrix = mat3(\n vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n );
1\n const mat3 AgXOutsetMatrix = mat3(\n vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n );\n const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;\n color *= toneMappingExposure;\n color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n color = AgXInsetMatrix * color;\n color = max( color, 1e-10 ); color = log2( color );\n color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n color = clamp( color, 0.0, 1.0 );\n color = agxDefaultContrastApprox( color );\n color = AgXOutsetMatrix * color;\n color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n color = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n color = clamp( color, 0.0, 1.0 );\n return color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n const float StartCompression = 0.8 - 0.04;\n const float Desaturation = 0.15;\n color *= toneMappingExposure;\n float x = min( color.r, min( color.g, color.b ) );\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n float peak = max( color.r, max( color.g, color.b ) );\n if ( peak < StartCompression ) return color;\n float d = 1. - StartCompression;\n float newPeak = 1. - d * d / ( peak + d - StartCompression );\n color *= newPeak / peak;\n float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n return mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = transformNormalByInverseViewMatrix( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec4 transmittedLight;\n vec3 transmittance;\n #ifdef USE_DISPERSION\n float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n for ( int i = 0; i < 3; i ++ ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n transmittedLight[ i ] = transmissionSample[ i ];\n transmittedLight.a += transmissionSample.a;\n transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n }\n transmittedLight.a /= 3.0;\n #else\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n #endif\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;
1\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
1\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_BATCHING\n worldPosition = batchingMatrix * worldPosition;\n #endif\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n 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 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <logdepthbuf_fragment>\n #ifdef USE_REVERSED_DEPTH_BUFFER\n float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n #else\n float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n #endif\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #elif DEPTH_PACKING == 3202\n gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n #elif DEPTH_PACKING == 3203\n gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n #endif\n}",distance_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n vWorldPosition = worldPosition.xyz;\n}",distance_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n vLineDistance = scale * lineDistance;\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include <aomap_fragment>\n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_lambert_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <mor
1phtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n vViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_phong_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;
1\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n uniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_physical_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include <transmission_fragment>\n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n \n outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
1\n #endif\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_toon_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_particle_fragment>\n #include <color_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n #include <logdepthbuf_fragment>\n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n vec4 mvPosition = modelViewMatrix[ 3 ];\n vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}"},oh={common:{diffuse:{value:new e2(0xffffff)},opacity:{value:1},map:{value:null},mapTransform:{value:new er},alphaMap:{value:null},alphaMapTransform:{value:new er},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new er}},envmap:{envMap:{value:null},envMapRotation:{value:new er},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new er}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new er}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new er},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new er},normalScale:{value:new Z(1,1)}}
1,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new er},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new er}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new er}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new er}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new e2(0xffffff)}},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 Q},probesMax:{value:new Q},probesResolution:{value:new Q}},points:{diffuse:{value:new e2(0xffffff)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new er},alphaTest:{value:0},uvTransform:{value:new er}},sprite:{diffuse:{value:new e2(0xffffff)},opacity:{value:1},center:{value:new Z(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new er},alphaMap:{value:null},alphaMapTransform:{value:new er},alphaTest:{value:0}}},of={basic:{uniforms:i6([oh.common,oh.specularmap,oh.envmap,oh.aomap,oh.lightmap,oh.fog]),vertexShader:od.meshbasic_vert,fragmentShader:od.meshbasic_frag},lambert:{uniforms:i6([oh.common,oh.specularmap,oh.envmap,oh.aomap,oh.lightmap,oh.emissivemap,oh.bumpmap,oh.normalmap,oh.displacementmap,oh.fog,oh.lights,{emissive:{value:new e2(0)},envMapIntensity:{value:1}}]),vertexShader:od.meshlambert_vert,fragmentShader:od.meshlambert_frag},phong:{uniforms:i6([oh.common,oh.specularmap,oh.envmap,oh.aomap,oh.lightmap,oh.emissivemap,oh.bumpmap,oh.normalmap,oh.displacementmap,oh.fog,oh.lights,{emissive:{value:new e2(0)},specular:{value:new e2(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:od.meshphong_vert,fragmentShader:od.meshphong_frag},standard:{uniforms:i6([oh.common,oh.envmap,oh.aomap,oh.lightmap,oh.emissivemap,oh.bumpmap,oh.normalmap,oh.displacementmap,oh.roughnessmap,oh.metalnessmap,oh.fog,oh.lights,{emissive:{value:new e2(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:od.meshphysical_vert,fragmentShader:od.meshphysical_frag},toon:{uniforms:i6([oh.common,oh.aomap,oh.lightmap,oh.emissivemap,oh.bumpmap,oh.normalmap,oh.displacementmap,oh.gradientmap,oh.fog,oh.lights,{emissive:{value:new e2(0)}}]),vertexShader:od.meshtoon_vert,fragmentShader:od.meshtoon_frag},matcap:{uniforms:i6([oh.common,oh.bumpmap,oh.normalmap,oh.displacementmap,oh.fog,{matcap:{value:null}}]),vertexShader:od.meshmatcap_vert,fragmentShader:od.meshmatcap_frag},points:{uniforms:i6([oh.points,oh.fog]),vertexShader:od.points_vert,fragmentShader:od.points_frag},dashed:{uniforms:i6([oh.common,oh.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:od.linedashed_vert,fragmentShader:od.linedashed_frag},depth:{uniforms:i6([oh.common,oh.displacementmap]),vertexShader:od.depth_vert,fragmentShader:od.depth_frag},normal:{uniforms:i6([oh.common,oh.bumpmap,oh.normalmap,oh.displacementmap,{opacity:{value:1}}]),vertexShader:od.meshnormal_vert,fragmentShader:od.meshnormal_frag},sprite:{uniforms:i6([oh.sprite,oh.fog]),vertexShader:od.sprite_vert,fragmentShader:od.sprite_frag},background:{uniforms:{uvTransform:{value:new er},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:od.background_vert,fragmentShader:od.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new er}},vertexShader:od.backgroundCube_vert,fragmentShader:od.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:od.cube_vert,fragmentShader:od.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:od.equirect_vert,fragmentShader:od.equirect_frag},distance:{uniforms:i6([oh.common,oh.displacementmap,{referencePosition:{value:new Q},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:od.distance_vert,fragmentShader:od.distance_frag},shadow:{uniforms:i6([oh.lights,oh.fog,{color:{value:new e2(0)},opacity:{value:1}}]),vertexShader:od.shadow_vert,fragmentShader:od.shadow_frag}};of.physical={uniforms:i6([of.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new er},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new er},clearcoatNormalScale:{value:new Z(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new er},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new er},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new er},sheen:{value:0},sheenColor:{value:new e2(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new er},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new er},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new er},transmissionSamplerSize:{value:new Z},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new er},attenuationDistance:{value:0},attenuationColor:{value:new e2(0)},specularColor:{value:new e2(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new er},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new er},anisotropyVector:{value:new Z},anisotropyMap:{value:null},anisotropyMapTransform:{value:new er}}]),vertexShader:od.meshphysical_vert,fragmentShader:od.meshphysical_frag};let op={r:0,b:0,g:0},om=new e_,og=new er;function ov(e,t,r,n,i,a){let s,o,l=new e2(0),u=+(!0!==i),c=null,d=0,h=null;function f(e){let r=!0===e.isScene?e.background:null;if(r&&r.isTexture){let n=e.backgroundBlurriness>0;r=t.get(r,n)}return r}function p(t,n){t.getRGB(op,i9(e)),r.buffers.color.setClear(op.r,op.g,op.b,n,a)}return{getClearColor:function(){return l},setClearColor:function(e,t=1){l.set(e),p(l,u=t)},getClearAlpha:function(){return u},setClearAlpha:function(e){p(l,u=e)},render:function(t){let n=!1,i=f(t);null===i?p(l,u):i&&i.isColor&&(p(i,1),n=!0);let s=e.xr.getEnvironmentBlendMode();"additive"===s?r.buffers.color.setClear(0,0,0,1,a):"alpha-blend"===s&&r.buffers.color.setClear(0,0,0,0,a),(e.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))},addToRenderList:function(t,r){let i=f(r);i&&(i.isCubeTexture||306===i.mapping)?(void 0===o&&((o=new rA(new nG(1,1,1),new ae({name:"Backgroun
1dCubeMaterial",uniforms:i5(of.backgroundCube.uniforms),vertexShader:of.backgroundCube.vertexShader,fragmentShader:of.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),o.geometry.deleteAttribute("uv"),o.onBeforeRender=function(e,t,r){this.matrixWorld.copyPosition(r.matrixWorld)},Object.defineProperty(o.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(o)),o.material.uniforms.envMap.value=i,o.material.uniforms.backgroundBlurriness.value=r.backgroundBlurriness,o.material.uniforms.backgroundIntensity.value=r.backgroundIntensity,o.material.uniforms.backgroundRotation.value.setFromMatrix4(om.makeRotationFromEuler(r.backgroundRotation)).transpose(),i.isCubeTexture&&!1===i.isRenderTargetTexture&&o.material.uniforms.backgroundRotation.value.premultiply(og),o.material.toneMapped=es.getTransfer(i.colorSpace)!==M,(c!==i||d!==i.version||h!==e.toneMapping)&&(o.material.needsUpdate=!0,c=i,d=i.version,h=e.toneMapping),o.layers.enableAll(),t.unshift(o,o.geometry,o.material,0,0,null)):i&&i.isTexture&&(void 0===s&&((s=new rA(new iq(2,2),new ae({name:"BackgroundMaterial",uniforms:i5(of.background.uniforms),vertexShader:of.background.vertexShader,fragmentShader:of.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(s)),s.material.uniforms.t2D.value=i,s.material.uniforms.backgroundIntensity.value=r.backgroundIntensity,s.material.toneMapped=es.getTransfer(i.colorSpace)!==M,!0===i.matrixAutoUpdate&&i.updateMatrix(),s.material.uniforms.uvTransform.value.copy(i.matrix),(c!==i||d!==i.version||h!==e.toneMapping)&&(s.material.needsUpdate=!0,c=i,d=i.version,h=e.toneMapping),s.layers.enableAll(),t.unshift(s,s.geometry,s.material,0,0,null))},dispose:function(){void 0!==o&&(o.geometry.dispose(),o.material.dispose(),o=void 0),void 0!==s&&(s.geometry.dispose(),s.material.dispose(),s=void 0)}}}function oy(e,t){let r=e.getParameter(e.MAX_VERTEX_ATTRIBS),n={},i=u(null),a=i,s=!1;function o(t){return e.bindVertexArray(t)}function l(t){return e.deleteVertexArray(t)}function u(e){let t=[],n=[],i=[];for(let e=0;e<r;e++)t[e]=0,n[e]=0,i[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:i,object:e,attributes:{},index:null}}function c(){let e=a.newAttributes;for(let t=0,r=e.length;t<r;t++)e[t]=0}function d(e){h(e,0)}function h(t,r){let n=a.newAttributes,i=a.enabledAttributes,s=a.attributeDivisors;n[t]=1,0===i[t]&&(e.enableVertexAttribArray(t),i[t]=1),s[t]!==r&&(e.vertexAttribDivisor(t,r),s[t]=r)}function f(){let t=a.newAttributes,r=a.enabledAttributes;for(let n=0,i=r.length;n<i;n++)r[n]!==t[n]&&(e.disableVertexAttribArray(n),r[n]=0)}function p(t,r,n,i,a,s,o){!0===o?e.vertexAttribIPointer(t,r,n,a,s):e.vertexAttribPointer(t,r,n,i,a,s)}function m(){g(),s=!0,a!==i&&o((a=i).object)}function g(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:function(r,i,l,m,g){var v,y,x;let b,_,S,w,M,T,E=!1,A=(v=r,y=m,x=l,b=!0===i.wireframe,void 0===(_=n[y.id])&&(_={},n[y.id]=_),void 0===(w=_[S=!0===v.isInstancedMesh?v.id:0])&&(w={},_[S]=w),void 0===(M=w[x.id])&&(M={},w[x.id]=M),void 0===(T=M[b])&&(T=u(e.createVertexArray()),M[b]=T),T);a!==A&&o((a=A).object),(E=function(e,t,r,n){let i=a.attributes,s=t.attributes,o=0,l=r.getAttributes();for(let t in l)if(l[t].location>=0){let r=i[t],n=s[t];if(void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor)),void 0===r||r.attribute!==n||n&&r.data!==n.data)return!0;o++}return a.attributesNum!==o||a.index!==n}(r,m,l,g))&&function(e,t,r,n){let i={},s=t.attributes,o=0,l=r.getAttributes();for(let t in l)if(l[t].location>=0){let r=s[t];void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor));let n={};n.attribute=r,r&&r.data&&(n.data=r.data),i[t]=n,o++}a.attributes=i,a.attributesNum=o,a.index=n}(r,m,l,g),null!==g&&t.update(g,e.ELEMENT_ARRAY_BUFFER),(E||s)&&(s=!1,function(r,n,i,a){c();let s=a.attributes,o=i.getAttributes(),l=n.defaultAttributeValues;for(let n in o){let i=o[n];if(i.location>=0){let o=s[n];if(void 0===o&&("instanceMatrix"===n&&r.instanceMatrix&&(o=r.instanceMatrix),"instanceColor"===n&&r.instanceColor&&(o=r.instanceColor)),void 0!==o){let n=o.normalized,s=o.itemSize,l=t.get(o);if(void 0===l)continue;let u=l.buffer,c=l.type,f=l.bytesPerElement,m=c===e.INT||c===e.UNSIGNED_INT||1013===o.gpuType;if(o.isInterleavedBufferAttribute){let t=o.data,l=t.stride,g=o.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e<i.locationSize;e++)h(i.location+e,t.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=t.meshPerAttribute*t.count)}else for(let e=0;e<i.locationSize;e++)d(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<i.locationSize;e++)p(i.location+e,s/i.locationSize,c,n,l*f,(g+s/i.locationSize*e)*f,m)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<i.locationSize;e++)h(i.location+e,o.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=o.meshPerAttribute*o.count)}
vendor: 2,596 bytes, line 1
1else for(let e=0;e<i.locationSize;e++)d(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<i.locationSize;e++)p(i.location+e,s/i.locationSize,c,n,s*f,s/i.locationSize*e*f,m)}}else if(void 0!==l){let t=l[n];if(void 0!==t)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)}}}}f()}(r,i,l,m),null!==g&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(g).buffer))},reset:m,resetDefaultState:g,dispose:function(){for(let e in m(),n){let t=n[e];for(let e in t){let r=t[e];for(let e in r){let t=r[e];for(let e in t)l(t[e].object),delete t[e];delete r[e]}}delete n[e]}},releaseStatesOfGeometry:function(e){if(void 0===n[e.id])return;let t=n[e.id];for(let e in t){let r=t[e];for(let e in r){let t=r[e];for(let e in t)l(t[e].object),delete t[e];delete r[e]}}delete n[e.id]},releaseStatesOfObject:function(e){for(let t in n){let r=n[t],i=!0===e.isInstancedMesh?e.id:0,a=r[i];if(void 0!==a){for(let e in a){let t=a[e];for(let e in t)l(t[e].object),delete t[e];delete a[e]}delete r[i],0===Object.keys(r).length&&delete n[t]}}},releaseStatesOfProgram:function(e){for(let t in n){let r=n[t];for(let t in r){let n=r[t];if(void 0===n[e.id])continue;let i=n[e.id];for(let e in i)l(i[e].object),delete i[e];delete n[e.id]}}},initAttributes:c,enableAttribute:d,disableUnusedAttributes:f}}function ox(e,t,r){let n;this.setMode=function(e){n=e},this.render=function(t,i){e.drawArrays(n,t,i),r.update(i,n,1)},this.renderInstances=function(t,i,a){0!==a&&(e.drawArraysInstanced(n,t,i,a),r.update(i,n,a))},this.renderMultiDraw=function(e,i,a){if(0===a)return;t.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,e,0,i,0,a);let s=0;for(let e=0;e<a;e++)s+=i[e];r.update(s,n,1)}}function ob(e,t,r,n){let i;function a(t){if("highp"===t){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"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=void 0!==r.precision?r.precision:"highp",o=a(s);o!==s&&(D("WebGLRenderer:",s,"not supported, using",o,"instead."),s=o);let l=!0===r.logarithmicDepthBuffer,u=!0===r.reversedDepthBuffer&&t.has("EXT_clip_control");return!0===r.reversedDepthBuffer&&!1===u&&D("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer."),{isWebG
1L2:!0,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){let r=t.get("EXT_texture_filter_anisotropic");i=e.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:a,textureFormatReadable:function(t){return 1023===t||n.convert(t)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(r){let i=1016===r&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return 1009===r||n.convert(r)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)||1015===r||!!i},precision:s,logarithmicDepthBuffer:l,reversedDepthBuffer:u,maxTextures:e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),maxVertexTextures:e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:e.getParameter(e.MAX_TEXTURE_SIZE),maxCubemapSize:e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:e.getParameter(e.MAX_VERTEX_ATTRIBS),maxVertexUniforms:e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:e.getParameter(e.MAX_VARYING_VECTORS),maxFragmentUniforms:e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),maxSamples:e.getParameter(e.MAX_SAMPLES),samples:e.getParameter(e.SAMPLES)}}function o_(e){let t=this,r=null,n=0,i=!1,a=!1,s=new r2,o=new er,l={value:null,needsUpdate:!1};function u(e,r,n,i){let a=null!==e?e.length:0,u=null;if(0!==a){if(u=l.value,!0!==i||null===u){let t=n+4*a,i=r.matrixWorldInverse;o.getNormalMatrix(i),(null===u||u.length<t)&&(u=new Float32Array(t));for(let t=0,r=n;t!==a;++t,r+=4)s.copy(e[t]).applyMatrix4(i,o),s.normal.toArray(u,r),u[r+3]=s.constant}l.value=u,l.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,u}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let r=0!==e.length||t||0!==n||i;return i=t,n=e.length,r},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){r=u(e,t,0)},this.setState=function(s,o,c){let d=s.clippingPlanes,h=s.clipIntersection,f=s.clipShadows,p=e.get(s);if(i&&null!==d&&0!==d.length&&(!a||f)){let e=a?0:n,t=4*e,i=p.clippingState||null;l.value=i,i=u(d,o,t,c);for(let e=0;e!==t;++e)i[e]=r[e];p.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}else a?u(null):(l.value!==r&&(l.value=r,l.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0)}}og.set(-1,0,0,0,1,0,0,0,1);let oS=[.125,.215,.35,.446,.526,.582],ow=new a4,oM=new e2,oT=null,oE=0,oA=0,oC=!1,oP=new Q;class oI{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,r=.1,n=100,i={}){let{size:a=256,position:s=oP}=i;oT=this._renderer.getRenderTarget(),oE=this._renderer.getActiveCubeFace(),oA=this._renderer.getActiveMipmapLevel(),oC=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,n,o,s),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=oN(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=oL(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose(),null!==this._backgroundBox&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._ggxMaterial&&this._ggxMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(oT,oE,oA),this._renderer.xr.enabled=oC,e.scissorTest=!1,oR(e,0,0,e.width,e.height)}_fromTexture(e,t){301===e.mapping||302===e.mapping?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),oT=this._renderer.getRenderTarget(),oE=this._renderer.getActiveCubeFace(),oA=this._renderer.getActiveMipmapLevel(),oC=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let r=t||this._allocateTargets();return this._textureToCubeUV(e,r),this._applyPMREM(r),this._cleanup(r),r}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,r={magFilter:1006,minFilter:1006,generateMipmaps:!1,type:1016,format:1023,colorSpace:S,depthBuffer:!1},n=oO(e,t,r);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){var i,a;null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=oO(e,t,r);let{_lodMax:n}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}
1=function(e){let t=[],r=[],n=[],i=e,a=e-4+1+oS.length;for(let s=0;s<a;s++){let a=Math.pow(2,i);t.push(a);let o=1/a;s>e-4?o=oS[s-e+4-1]:0===s&&(o=0),r.push(o);let l=1/(a-2),u=-l,c=1+l,d=[u,u,c,u,c,c,u,u,c,c,u,c],h=new Float32Array(108),f=new Float32Array(72),p=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,r=e>2?0:-1,n=[t,r,0,t+2/3,r,0,t+2/3,r+1,0,t,r,0,t+2/3,r+1,0,t,r+1,0];h.set(n,18*e),f.set(d,12*e);let i=[e,e,e,e,e,e];p.set(i,6*e)}let m=new tq;m.setAttribute("position",new tR(h,3)),m.setAttribute("uv",new tR(f,2)),m.setAttribute("faceIndex",new tR(p,1)),n.push(new rA(m,null)),i>4&&i--}return{lodMeshes:n,sizeLods:t,sigmas:r}}(n)),this._blurMaterial=(i=n,new ae({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:new Float32Array(20)},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:new Q(0,1,0)}},vertexShader:oD(),fragmentShader:` 2 3 precision mediump float; 4 precision mediump int; 5 6 varying vec3 vOutputDirection; 7 8 uniform sampler2D envMap; 9 uniform int samples; 10 uniform float weights[ n ]; 11 uniform bool latitudinal; 12 uniform float dTheta; 13 uniform float mipInt; 14 uniform vec3 poleAxis; 15 16 #define ENVMAP_TYPE_CUBE_UV 17 #include <cube_uv_reflection_fragment> 18 19 vec3 getSample( float theta, vec3 axis ) { 20 21 float cosTheta = cos( theta ); 22 // Rodrigues' axis-angle rotation 23 vec3 sampleDirection = vOutputDirection * cosTheta 24 + cross( axis, vOutputDirection ) * sin( theta ) 25 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 26 27 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 28 29 } 30 31 void main() { 32 33 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 34 35 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 36 37 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 38 39 } 40 41 axis = normalize( axis ); 42 43 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 44 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 45 46 for ( int i = 1; i < n; i++ ) { 47 48 if ( i >= samples ) { 49 50 break; 51 52 } 53 54 float theta = dTheta * float( i ); 55 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 56 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 57 58 } 59 60 } 61 `,blending:0,depthTest:!1,depthWrite:!1})),this._ggxMaterial=(a=n,new ae({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:256,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${a}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:oD(),fragmentShader:` 62 63 precision highp float; 64 precision highp int; 65 66 varying vec3 vOutputDirection; 67 68 uniform sampler2D envMap; 69 uniform float roughness; 70 uniform float mipInt; 71 72 #define ENVMAP_TYPE_CUBE_UV 73 #include <cube_uv_reflection_fragment> 74 75 #define PI 3.14159265359 76 77 // Van der Corput radical inverse 78 float radicalInverse_VdC(uint bits) { 79 bits = (bits << 16u) | (bits >> 16u); 80 bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 81 bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 82 bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 83 bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 84 return float(bits) * 2.3283064365386963e-10; // / 0x100000000 85 } 86 87 // Hammersley sequence 88 vec2 hammersley(uint i, uint N) { 89 return vec2(float(i) / float(N), radicalInverse_VdC(i)); 90 } 91 92 // GGX VNDF importance sampling (Eric Heitz 2018) 93 // "Sampling the GGX Distribution of Visible Normals" 94 // https://jcgt.org/published/0007/04/01/ 95 vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { 96 float alpha = roughness * roughness; 97 98 // Section 4.1: Orthonormal basis 99 vec3 T1 = vec3(1.0, 0.0, 0.0); 100 vec3 T2 = cross(V, T1); 101 102 // Section 4.2: Parameterization of projected area 103 float r = sqrt(Xi.x); 104 float phi = 2.0 * PI * Xi.y; 105 float t1 = r * cos(phi); 106 float t2 = r * sin(phi); 107 float s = 0.5 * (1.0 + V.z); 108 t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; 109 110 // Section 4.3: Reprojection onto hemisphere 111 vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V; 112 113 // Section 3.4: Transform back to ellipsoid configuration 114 return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); 115 } 116 117 void main() { 118 vec3 N = normalize(vOutputDirection); 119 vec3 V = N; // Assume view direction equals normal for pre-filtering 120 121 vec3 prefilteredColor = vec3(0.0); 122 float totalWeight = 0.0; 123 124 // For very low roughness, just sample the environment directly 125 if (roughness < 0.001) { 126 gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); 127 return; 128 } 129 130 // Tangent space basis for VNDF sampling 131 vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 132 vec3 tangent = normalize(cross(up, N)); 133 vec3 bitangent = cross(N, tangent); 134
135 for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { 136 vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); 137 138 // For PMREM, V = N, so in tangent space V is always (0, 0, 1) 139 vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); 140 141 // Transform H back to world space 142 vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); 143 vec3 L = normalize(2.0 * dot(V, H) * H - V); 144 145 float NdotL = max(dot(N, L), 0.0); 146 147 if(NdotL > 0.0) { 148 // Sample environment at fixed mip level 149 // VNDF importance sampling handles the distribution filtering 150 vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); 151 152 // Weight by NdotL for the split-sum approximation 153 // VNDF PDF naturally accounts for the visible microfacet distribution 154 prefilteredColor += sampleColor * NdotL; 155 totalWeight += NdotL; 156 } 157 } 158 159 if (totalWeight > 0.0) { 160 prefilteredColor = prefilteredColor / totalWeight; 161 } 162 163 gl_FragColor = vec4(prefilteredColor, 1.0); 164 } 165 `,blending:0,depthTest:!1,depthWrite:!1}))}return n}_compileMaterial(e){let t=new rA(new tq,e);this._renderer.compile(t,ow)}_sceneToCubeUV(e,t,r,n,i){let a=new aQ(90,1,t,r),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],l=this._renderer,u=l.autoClear,c=l.toneMapping;l.getClearColor(oM),l.toneMapping=0,l.autoClear=!1,l.state.buffers.depth.getReversed()&&(l.setRenderTarget(n),l.clearDepth(),l.setRenderTarget(null)),null===this._backgroundBox&&(this._backgroundBox=new rA(new nG,new rm({name:"PMREM.Backgroun
165d",side:1,depthWrite:!1,depthTest:!1})));let d=this._backgroundBox,h=d.material,f=!1,p=e.background;p?p.isColor&&(h.color.copy(p),e.background=null,f=!0):(h.color.copy(oM),f=!0);for(let t=0;t<6;t++){let r=t%3;0===r?(a.up.set(0,s[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x+o[t],i.y,i.z)):1===r?(a.up.set(0,0,s[t]),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y+o[t],i.z)):(a.up.set(0,s[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y,i.z+o[t]));let u=this._cubeSize;oR(n,r*u,t>2?u:0,u,u),l.setRenderTarget(n),f&&l.render(d,a),l.render(e,a)}l.toneMapping=c,l.autoClear=u,e.background=p}_textureToCubeUV(e,t){let r=this._renderer,n=301===e.mapping||302===e.mapping;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=oN()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=oL());let i=n?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=i,i.uniforms.envMap.value=e;let s=this._cubeSize;oR(t,0,0,3*s,2*s),r.setRenderTarget(t),r.render(a,ow)}_applyPMREM(e){let t=this._renderer,r=t.autoClear;t.autoClear=!1;let n=this._lodMeshes.length;for(let t=1;t<n;t++)this._applyGGXFilter(e,t-1,t);t.autoClear=r}_applyGGXFilter(e,t,r){let n=this._renderer,i=this._pingPongRenderTarget,a=this._ggxMaterial,s=this._lodMeshes[r];s.material=a;let o=a.uniforms,l=r/(this._lodMeshes.length-1),u=t/(this._lodMeshes.length-1),c=Math.sqrt(l*l-u*u),{_lodMax:d}=this,h=this._sizeLods[r],f=3*h*(r>d-4?r-d+4:0),p=4*(this._cubeSize-h);o.envMap.value=e.texture,o.roughness.value=c*(0+1.25*l),o.mipInt.value=d-t,oR(i,f,p,3*h,2*h),n.setRenderTarget(i),n.render(s,ow),o.envMap.value=i.texture,o.roughness.value=0,o.mipInt.value=d-r,oR(e,f,p,3*h,2*h),n.setRenderTarget(e),n.render(s,ow)}_blur(e,t,r,n,i){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,r,n,"latitudinal",i),this._halfBlur(a,e,r,r,n,"longitudinal",i)}_halfBlur(e,t,r,n,i,a,s){let o=this._renderer,l=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&k("blur direction must be either latitudinal or longitudinal!");let u=this._lodMeshes[n];u.material=l;let c=l.uniforms,d=this._sizeLods[r]-1,h=isFinite(i)?Math.PI/(2*d):2*Math.PI/39,f=i/h,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&D(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);let m=[],g=0;for(let e=0;e<20;++e){let t=e/f,r=Math.exp(-t*t/2);m.push(r),0===e?g+=r:e<p&&(g+=2*r)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;c.envMap.value=e.texture,c.samples.value=p,c.weights.value=m,c.latitudinal.value="latitudinal"===a,s&&(c.poleAxis.value=s);let{_lodMax:v}=this;c.dTheta.value=h,c.mipInt.value=v-r;let y=this._sizeLods[n],x=4*(this._cubeSize-y);oR(t,3*y*(n>v-4?n-v+4:0),x,3*y,2*y),o.setRenderTarget(t),o.render(u,ow)}}function oO(e,t,r){let n=new ey(e,t,r);return n.texture.mapping=306,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function oR(e,t,r,n,i){e.viewport.set(t,r,n,i),e.scissor.set(t,r,n,i)}function oL(){return new ae({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:oD(),fragmentShader:` 166 167 precision mediump float; 168 precision mediump int; 169 170 varying vec3 vOutputDirection; 171 172 uniform sampler2D envMap; 173 174 #include <common> 175 176 void main() { 177 178 vec3 outputDirection = normalize( vOutputDirection ); 179 vec2 uv = equirectUv( outputDirection ); 180 181 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 182 183 } 184 `,blending:0,depthTest:!1,depthWrite:!1})}function oN(){return new ae({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:oD(),fragmentShader:` 185 186 precision mediump float; 187 precision mediump int; 188 189 uniform float flipEnvMap; 190 191 varying vec3 vOutputDirection; 192 193 uniform samplerCube envMap; 194 195 void main() { 196 197 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 198 199 } 200 `,blending:0,depthTest:!1,depthWrite:!1})}function oD(){return` 201 202 precision mediump float; 203 precision mediump int; 204 205 attribute float faceIndex; 206 207 varying vec3 vOutputDirection; 208 209 // RH coordinate system; PMREM face-indexing convention 210 vec3 getDirection( vec2 uv, float face ) { 211 212 uv = 2.0 * uv - 1.0; 213 214 vec3 direction = vec3( uv, 1.0 ); 215 216 if ( face == 0.0 ) { 217 218 direction = direction.zyx; // ( 1, v, u ) pos x 219 220 } else if ( face == 1.0 ) { 221 222 direction = direction.xzy; 223 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 224 225 } else if ( face == 2.0 ) { 226 227 direction.x *= -1.0; // ( -u, v, 1 ) pos z 228 229 } else if ( face == 3.0 ) { 230 231 direction = direction.zyx; 232 direction.xz *= -1.0; // ( -1, v, -u ) neg x 233 234 } else if ( face == 4.0 ) { 235 236 direction = direction.xzy; 237 direction.xy *= -1.0; // ( -u, -1, v ) neg y 238 239 } else if ( face == 5.0 ) { 240 241 direction.z *= -1.0; // ( u, v, -1 ) neg z 242 243 } 244 245 return direction; 246 247 } 248 249 void main() { 250 251 vOutputDirection = getDirection( uv, faceIndex ); 252 gl_Position = vec4( position, 1.0 ); 253 254 } 255 `}class ok extends ey{constructor(e=1,t={}
255){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1};this.texture=new nz([r,r,r,r,r,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 r={uniforms:{tEquirect:{value:null}},vertexShader:` 256 257 varying vec3 vWorldDirection; 258 259 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 260 261 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 262 263 } 264 265 void main() { 266 267 vWorldDirection = transformDirection( position, modelMatrix ); 268 269 #include <begin_vertex> 270 #include <project_vertex> 271 272 } 273 `,fragmentShader:` 274 275 uniform sampler2D tEquirect; 276 277 varying vec3 vWorldDirection; 278 279 #include <common> 280 281 void main() { 282 283 vec3 direction = normalize( vWorldDirection ); 284 285 vec2 sampleUV = equirectUv( direction ); 286 287 gl_FragColor = texture2D( tEquirect, sampleUV ); 288 289 } 290 `},n=new nG(5,5,5),i=new ae({name:"CubemapFromEquirect",uniforms:i5(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;let a=new rA(n,i),s=t.minFilter;return 1008===t.minFilter&&(t.minFilter=1006),new sm(1,10,this).update(e,a),t.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,r=!0,n=!0){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,r,n);e.setRenderTarget(i)}}function oU(e){let t=new WeakMap,r=new WeakMap,n=null;function i(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function a(e){let r=e.target;r.removeEventListener("dispose",a);let n=t.get(r);void 0!==n&&(t.delete(r),n.dispose())}function s(e){let t=e.target;t.removeEventListener("dispose",s);let n=r.get(t);void 0!==n&&(r.delete(t),n.dispose())}return{get:function(o,l=!1){return null==o?null:l?function(t){if(t&&t.isTexture){let i=t.mapping,a=303===i||304===i,o=301===i||302===i;if(a||o){let i=r.get(t),l=void 0!==i?i.texture.pmremVersion:0;if(t.isRenderTargetTexture&&t.pmremVersion!==l)return null===n&&(n=new oI(e)),(i=a?n.fromEquirectangular(t,i):n.fromCubemap(t,i)).texture.pmremVersion=t.pmremVersion,r.set(t,i),i.texture;{if(void 0!==i)return i.texture;let l=t.image;return a&&l&&l.height>0||o&&l&&function(e){let t=0;for(let r=0;r<6;r++)void 0!==e[r]&&t++;return 6===t}(l)?(null===n&&(n=new oI(e)),(i=a?n.fromEquirectangular(t):n.fromCubemap(t)).texture.pmremVersion=t.pmremVersion,r.set(t,i),t.addEventListener("dispose",s),i.texture):null}}}return t}(o):function(r){if(r&&r.isTexture){let n=r.mapping;if(303===n||304===n)if(t.has(r))return i(t.get(r).texture,r.mapping);else{let n=r.image;if(!n||!(n.height>0))return null;{let s=new ok(n.height);return s.fromEquirectangularTexture(e,r),t.set(r,s),r.addEventListener("dispose",a),i(s.texture,r.mapping)}}}return r}(o)},dispose:function(){t=new WeakMap,r=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function oF(e){let t={};function r(r){if(void 0!==t[r])return t[r];let n=e.getExtension(r);return t[r]=n,n}return{has:function(e){return null!==r(e)},init:function(){r("EXT_color_buffer_float"),r("WEBGL_clip_cull_distance"),r("OES_texture_float_linear"),r("EXT_color_buffer_half_float"),r("WEBGL_multisampled_render_to_texture"),r("WEBGL_render_shared_exponent")},get:function(e){let t=r(e);return null===t&&U("WebGLRenderer: "+e+" extension not supported."),t}}}function oz(e,t,r,n){let i={},a=new WeakMap;function s(e){let o=e.target;for(let e in null!==o.index&&t.remove(o.index),o.attributes)t.remove(o.attributes[e]);o.removeEventListener("dispose",s),delete i[o.id];let l=a.get(o);l&&(t.remove(l),a.delete(o)),n.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,r.memory.geometries--}function o(e){let r=[],n=e.index,i=e.attributes.position,s=0;if(void 0===i)return;if(null!==n){let e=n.array;s=n.version;for(let t=0,n=e.length;t<n;t+=3){let n=e[t+0],i=e[t+1],a=e[t+2];r.push(n,i,i,a,a,n)}}else{let e=i.array;s=i.version;for(let t=0,n=e.length/3-1;t<n;t+=3){let e=t+0,n=t+1,i=t+2;r.push(e,n,n,i,i,e)}}let o=new(i.count>=65535?tN:tL)(r,1);o.version=s;let l=a.get(e);l&&t.remove(l),a.set(e,o)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",s),i[t.id]=!0,r.memory.geometries++),t},update:function(r){let n=r.attributes;for(let r in n)t.update(n[r],e.ARRAY_BUFFER)},getWireframeAttribute:function(e){let t=a.get(e);if(t){let r=e.index;null!==r&&t.version<r.version&&o(e)}else o(e);return a.get(e)}}}function oj(e,t,r){let n,i,a;this.setMode=function(e){n=e},this.setIndex=function(e){i=e.type,a=e.bytesPerElement},this.render=function(t,s){e.drawElements(n,s,i,t*a),r.update(s,n,1)},this.renderInstances=function(t,s,o){0!==o&&(e.drawElementsInstanced(n,s,i,t*a,o),r.update(s,n,o))},this.renderMultiDraw=function(e,a,s){if(0===s)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,a,0,i,e,0,s);let o=0;for(let e=0;e<s;e++)o+=a[e];r.update(o,n,1)}}function oB(e){let t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(r,n,i){switch(t.calls++,n){case e.TRIANGLES:t.triangles+=r/3*i;break;case e.LINES:t.lines+=r/2*i;break;case e.LINE_STRIP:t.lines+=i*(r-1);break;case e.LINE_LOOP:t.lines+=i*r;break;case e.POINTS:t.points+=i*r;break;default:k("WebGLInfo: Unknown draw mode:",n)}}}}function oV(e,t,r){let n=new WeakMap,i=new eg;return{update:function(a,s,o){let l=a.morphTargetInfluences,u=s.morphAttributes.position||s.morphAttributes.normal||s.morphAttributes.color,c=void 0!==u?u.length:0,d=n.get(s);if(void 0===d||d.count!==c){void 0!==d&&d.texture.dispose();let e=void 0!==s.morphAttributes.position,r=void 0!==s.morphAttributes.normal,a=void 0!==s.morphAttributes.color,o=s.morphAttributes.position||[],l=s.morphAttributes.normal||[],u=s.morphAttributes.color||[],h=0;!0===e&&(h=1),!0===r&&(h=2),!0===a&&(h=3);let f=s.attributes.position.count*h,p=1;f>t.maxTextureSize&&(p=Math.ceil(f/t.maxTextureSize),f=t.maxTextureSize);let m=new Float32Array(f*p*4*c),g=new ex(m,f,p,c);g.type=1015,g.needsUpdate=!0;let v=4*h;for(let t=0;t<c;t++){let n=o[t],s=l[t],c=u[t],d=f*p*4*t;
290for(let t=0;t<n.count;t++){let o=t*v;!0===e&&(i.fromBufferAttribute(n,t),m[d+o+0]=i.x,m[d+o+1]=i.y,m[d+o+2]=i.z,m[d+o+3]=0),!0===r&&(i.fromBufferAttribute(s,t),m[d+o+4]=i.x,m[d+o+5]=i.y,m[d+o+6]=i.z,m[d+o+7]=0),!0===a&&(i.fromBufferAttribute(c,t),m[d+o+8]=i.x,m[d+o+9]=i.y,m[d+o+10]=i.z,m[d+o+11]=4===c.itemSize?i.w:1)}}d={count:c,texture:g,size:new Z(f,p)},n.set(s,d),s.addEventListener("dispose",function e(){g.dispose(),n.delete(s),s.removeEventListener("dispose",e)})}if(!0===a.isInstancedMesh&&null!==a.morphTexture)o.getUniforms().setValue(e,"morphTexture",a.morphTexture,r);else{let t=0;for(let e=0;e<l.length;e++)t+=l[e];let r=s.morphTargetsRelative?1:1-t;o.getUniforms().setValue(e,"morphTargetBaseInfluence",r),o.getUniforms().setValue(e,"morphTargetInfluences",l)}o.getUniforms().setValue(e,"morphTargetsTexture",d.texture,r),o.getUniforms().setValue(e,"morphTargetsTextureSize",d.size)}}}function oG(e,t,r,n,i){let a=new WeakMap;function s(e){let t=e.target;t.removeEventListener("dispose",s),n.releaseStatesOfObject(t),r.remove(t.instanceMatrix),null!==t.instanceColor&&r.remove(t.instanceColor)}return{update:function(n){let o=i.render.frame,l=n.geometry,u=t.get(n,l);if(a.get(u)!==o&&(t.update(u),a.set(u,o)),n.isInstancedMesh&&(!1===n.hasEventListener("dispose",s)&&n.addEventListener("dispose",s),a.get(n)!==o&&(r.update(n.instanceMatrix,e.ARRAY_BUFFER),null!==n.instanceColor&&r.update(n.instanceColor,e.ARRAY_BUFFER),a.set(n,o))),n.isSkinnedMesh){let e=n.skeleton;a.get(e)!==o&&(e.update(),a.set(e,o))}return u},dispose:function(){a=new WeakMap}}}let oH={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 oW(e,t,r,n,i,a){let s,o=new ey(t,r,{type:e,depthBuffer:i,stencilBuffer:a,samples:4*!!n,depthTexture:i?new nj(t,r):void 0}),l=new ey(t,r,{type:1016,depthBuffer:!1,stencilBuffer:!1}),u=new tq;u.setAttribute("position",new tD([-1,3,0,-1,-1,0,3,-1,0],3)),u.setAttribute("uv",new tD([0,2,0,0,2,0],2));let c=new at({uniforms:{tDiffuse:{value:null}},vertexShader:` 291 precision highp float; 292 293 uniform mat4 modelViewMatrix; 294 uniform mat4 projectionMatrix; 295 296 attribute vec3 position; 297 attribute vec2 uv; 298 299 varying vec2 vUv; 300 301 void main() { 302 vUv = uv; 303 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 304 }`,fragmentShader:` 305 precision highp float; 306 307 uniform sampler2D tDiffuse; 308 309 varying vec2 vUv; 310 311 #include <tonemapping_pars_fragment> 312 #include <colorspace_pars_fragment> 313 314 void main() { 315 gl_FragColor = texture2D( tDiffuse, vUv ); 316 317 #ifdef LINEAR_TONE_MAPPING 318 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 319 #elif defined( REINHARD_TONE_MAPPING ) 320 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 321 #elif defined( CINEON_TONE_MAPPING ) 322 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 323 #elif defined( ACES_FILMIC_TONE_MAPPING ) 324 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 325 #elif defined( AGX_TONE_MAPPING ) 326 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 327 #elif defined( NEUTRAL_TONE_MAPPING ) 328 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 329 #elif defined( CUSTOM_TONE_MAPPING ) 330 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 331 #endif 332 333 #ifdef SRGB_TRANSFER 334 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 335 #endif 336 }`,depthTest:!1,depthWrite:!1}),d=new rA(u,c),h=new a4(-1,1,1,-1,0,1),f=null,p=null,m=!1,g=null,v=[],y=!1;this.setSize=function(e,t){o.setSize(e,t),l.setSize(e,t);for(let r=0;r<v.length;r++){let n=v[r];n.setSize&&n.setSize(e,t)}},this.setEffects=function(e){y=(v=e).length>0&&!0===v[0].isRenderPass;let t=o.width,r=o.height;for(let e=0;e<v.length;e++){let n=v[e];n.setSize&&n.setSize(t,r)}},this.begin=function(e,t){if(m||0===e.toneMapping&&0===v.length)return!1;if(g=t,null!==t){let e=t.width,r=t.height;(o.width!==e||o.height!==r)&&this.setSize(e,r)}return!1===y&&e.setRenderTarget(o),s=e.toneMapping,e.toneMapping=0,!0},this.hasRenderPass=function(){return y},this.end=function(e,t){e.toneMapping=s,m=!0;let r=o,n=l;for(let i=0;i<v.length;i++){let a=v[i];
vendor: 2,328 bytes, line 336
336if(!1!==a.enabled&&(a.render(e,n,r,t),!1!==a.needsSwap)){let e=r;r=n,n=e}}if(f!==e.outputColorSpace||p!==e.toneMapping){f=e.outputColorSpace,p=e.toneMapping,c.defines={},es.getTransfer(f)===M&&(c.defines.SRGB_TRANSFER="");let t=oH[p];t&&(c.defines[t]=""),c.needsUpdate=!0}c.uniforms.tDiffuse.value=r.texture,e.setRenderTarget(g),e.render(d,h),g=null,m=!1},this.isCompositing=function(){return m},this.dispose=function(){o.depthTexture&&o.depthTexture.dispose(),o.dispose(),l.dispose(),u.dispose(),c.dispose()}}let oX=new em,oq=new nj(1,1),oY=new ex,o$=new eb,oK=new nz,oZ=[],oJ=[],oQ=new Float32Array(16),o0=new Float32Array(9),o1=new Float32Array(4);function o2(e,t,r){let n=e[0];if(n<=0||n>0)return e;let i=t*r,a=oZ[i];if(void 0===a&&(a=new Float32Array(i),oZ[i]=a),0!==t){n.toArray(a,0);for(let n=1,i=0;n!==t;++n)i+=r,e[n].toArray(a,i)}return a}function o3(e,t){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function o4(e,t){for(let r=0,n=t.length;r<n;r++)e[r]=t[r]}function o5(e,t){let r=oJ[t];void 0===r&&(r=new Int32Array(t),oJ[t]=r);for(let n=0;n!==t;++n)r[n]=e.allocateTextureUnit();return r}function o6(e,t){let r=this.cache;r[0]!==t&&(e.uniform1f(this.addr,t),r[0]=t)}function o8(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(o3(r,t))return;e.uniform2fv(this.addr,t),o4(r,t)}}function o9(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else if(void 0!==t.r)(r[0]!==t.r||r[1]!==t.g||r[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),r[0]=t.r,r[1]=t.g,r[2]=t.b);else{if(o3(r,t))return;e.uniform3fv(this.addr,t),o4(r,t)}}function o7(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z||r[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(o3(r,t))return;e.uniform4fv(this.addr,t),o4(r,t)}}function le(e,t){let r=this.cache,n=t.elements;if(void 0===n){if(o3(r,t))return;e.uniformMatrix2fv(this.addr,!1,t),o4(r,t)}else{if(o3(r,n))return;o1.set(n),e.uniformMatrix2fv(this.addr,!1,o1),o4(r,n)}}function lt(e,t){let r=this.cache,n=t.elements;if(void 0===n){if(o3(r,t))return;e.uniformMatrix3fv(this.addr,!1,t),o4(r,t)}else{if(o3(r,n))return;
336o0.set(n),e.uniformMatrix3fv(this.addr,!1,o0),o4(r,n)}}function lr(e,t){let r=this.cache,n=t.elements;if(void 0===n){if(o3(r,t))return;e.uniformMatrix4fv(this.addr,!1,t),o4(r,t)}else{if(o3(r,n))return;oQ.set(n),e.uniformMatrix4fv(this.addr,!1,oQ),o4(r,n)}}function ln(e,t){let r=this.cache;r[0]!==t&&(e.uniform1i(this.addr,t),r[0]=t)}function li(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y)&&(e.uniform2i(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(o3(r,t))return;e.uniform2iv(this.addr,t),o4(r,t)}}function la(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z)&&(e.uniform3i(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else{if(o3(r,t))return;e.uniform3iv(this.addr,t),o4(r,t)}}function ls(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z||r[3]!==t.w)&&(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(o3(r,t))return;e.uniform4iv(this.addr,t),o4(r,t)}}function lo(e,t){let r=this.cache;r[0]!==t&&(e.uniform1ui(this.addr,t),r[0]=t)}function ll(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y)&&(e.uniform2ui(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(o3(r,t))return;e.uniform2uiv(this.addr,t),o4(r,t)}}function lu(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z)&&(e.uniform3ui(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else{if(o3(r,t))return;e.uniform3uiv(this.addr,t),o4(r,t)}}function lc(e,t){let r=this.cache;if(void 0!==t.x)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z||r[3]!==t.w)&&(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(o3(r,t))return;e.uniform4uiv(this.addr,t),o4(r,t)}}function ld(e,t,r){let n,i=this.cache,a=r.allocateTextureUnit();i[0]!==a&&(e.uniform1i(this.addr,a),i[0]=a),this.type===e.SAMPLER_2D_SHADOW?(oq.compareFunction=r.isReversedDepthBuffer()?518:515,n=oq):n=oX,r.setTexture2D(t||n,a)}function lh(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture3D(t||o$,i)}function lf(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTextureCube(t||oK,i)}function lp(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture2DArray(t||oY,i)}function lm(e,t){e.uniform1fv(this.addr,t)}function lg(e,t){let r=o2(t,this.size,2);e.uniform2fv(this.addr,r)}function lv(e,t){let r=o2(t,this.size,3);e.uniform3fv(this.addr,r)}function ly(e,t){let r=o2(t,this.size,4);e.uniform4fv(this.addr,r)}function lx(e,t){let r=o2(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,r)}function lb(e,t){let r=o2(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,r)}function l_(e,t){let r=o2(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,r)}function lS(e,t){e.uniform1iv(this.addr,t)}function lw(e,t){e.uniform2iv(this.addr,t)}function lM(e,t){e.uniform3iv(this.addr,t)}function lT(e,t){e.uniform4iv(this.addr,t)}function lE(e,t){e.uniform1uiv(this.addr,t)}function lA(e,t){e.uniform2uiv(this.addr,t)}function lC(e,t){e.uniform3uiv(this.addr,t)}function lP(e,t){e.uniform4uiv(this.addr,t)}function lI(e,t,r){let n,i=this.cache,a=t.length,s=o5(r,a);o3(i,s)||(e.uniform1iv(this.addr,s),o4(i,s)),n=this.type===e.SAMPLER_2D_SHADOW?oq:oX;for(let e=0;e!==a;++e)r.setTexture2D(t[e]||n,s[e])}function lO(e,t,r){let n=this.cache,i=t.length,a=o5(r,i);o3(n,a)||(e.uniform1iv(this.addr,a),o4(n,a));for(let e=0;e!==i;++e)r.setTexture3D(t[e]||o$,a[e])}function lR(e,t,r){let n=this.cache,i=t.length,a=o5(r,i);o3(n,a)||(e.uniform1iv(this.addr,a),o4(n,a));for(let e=0;e!==i;++e)r.setTextureCube(t[e]||oK,a[e])}function lL(e,t,r){let n=this.cache,i=t.length,a=o5(r,i);o3(n,a)||(e.uniform1iv(this.addr,a),o4(n,a));for(let e=0;e!==i;++e)r.setTexture2DArray(t[e]||oY,a[e])}class lN{constructor(e,t,r){this.id=e,this.addr=r,this.cache=[],this.type=t.type,this.setValue=function(e){switch(e){case 5126:return o6;case 35664:return o8;case 35665:return o9;case 35666:return o7;case 35674:return le;case 35675:return lt;case 35676:return lr;case 5124:case 35670:return ln;case 35667:case 35671:return li;case 35668:case 35672:return la;case 35669:case 35673:return ls;case 5125:return lo;case 36294:return ll;case 36295:return lu;case 36296:return lc;case 35678:case 36198:case 36298:case 36306:case 35682:return ld;case 35679:case 36299:case 36307:return lh;case 35680:case 36300:case 36308:case 36293:return lf;case 36289:case 36303:case 36311:case 36292:return lp}}(t.type)}}class lD{constructor(e,t,r){this.id=e,this.addr=r,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return lm;case 35664:return lg;case 35665:return lv;case 35666:return ly;case 35674:return lx;case 35675:return lb;case 35676:return l_;case 5124:case 35670:return lS;case 35667:case 35671:return lw;case 35668:case 35672:return lM;case 35669:case 35673:return lT;case 5125:return lE;case 36294:return lA;case 36295:return lC;case 36296:return lP;case 35678:case 36198:case 36298:case 36306:case 35682:return lI;case 35679:case 36299:case 36307:return lO;case 35680:case 36300:case 36308:case 36293:return lR;case 36289:case 36303:case 36311:case 36292:return lL}}(t.type)}}class lk{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,r){let n=this.seq;for(let i=0,a=n.length;i!==a;++i){let a=n[i];a.setValue(e,t[a.id],r)}}}let lU=/(\w+)(\])?(\[|\.)?/g;function lF(e,t){e.seq.push(t),e.map[t.id]=t}class lz{constructor(e,t){this.seq=[],this.map={};const r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let n=0;n<r;++n){const r=e.getActiveUniform(t,n),i=e.getUniformLocation(t,r.name);!function(e,t,r){let n=e.name,i=n.length;for(lU.lastIndex=0;;){let a=lU.exec(n),s=lU.lastIndex,o=a[1],l="]"===a[2],u=a[3];if(l&&(o|=0),void 0===u||"["===u&&s+2===i){lF(r,void 0===u?new lN(o,e,t):new lD(o,e,t));break}{let e=r.map[o];void 0===e&&lF(r,e=new lk(o)),r=e}}}(r,i,this)}const n=[],i=[];for(const t of this.seq)t.type===e.SAMPLER_2D_SHADOW||t.type===e.SAMPLER_CUBE_SHADOW||t.type===e.SAMPLER_2D_ARRAY_SHADOW?n.push(t):i.push(t);n.length>0&&(this.seq=n.concat(i))}setValue(e,t,r,n){let i=this.map[t];void 0!==i&&i.setValue(e,r,n)}setOptional(e,t,r){let n=t[r];void 0!==n&&this.setValue(e,r,n)}static upload(e,t,r,n){for(let i=0,a=t.length;i!==a;++i){let a=t[i],s=r[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,n)}}static seqWithValue(e,t){let r=[];for(let n=0,i=e.length;n!==i;++n){let i=e[n];i.id in t&&r.push(i)}return r}}function lj(e,t,r){let n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}let lB=0,lV=new er;function lG(e,t,r){let n=e.getShaderParameter(t,e.COMPILE_STATUS),i=(e.getShaderInfoLog(t)||"").trim();if(n&&""===i)return"";let a=/ERROR: 0:(\d+)/.exec(i);if(!a)return i;{let n=parseInt(a[1]);return r.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){let r=e.split("\n"),n=[],i=Math.max(t-6,0),a=Math.min(t+6,r.length);for(let e=i;e<a;e++){let i=e+1;n.push(`${i===t?">":" "} ${i}: ${r[e]}`)}return n.join("\n")}(e.getShaderSource(t),n)}}let lH={1:"Linear",2:"Reinhard",3:"Cineon",4:"ACESFilmic",6:"AgX",7:"Neutral",5:"Custom"},lW=new Q;function lX(e){return""!==e}function lq(e,t){let r=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_L
336IGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,r).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 lY(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}let l$=/^[ \t]*#include +<([\w\d./]+)>/gm;function lK(e){return e.replace(l$,lJ)}let lZ=new Map;function lJ(e,t){let r=od[t];if(void 0===r){let e=lZ.get(t);if(void 0!==e)r=od[e],D('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e);else throw Error("THREE.WebGLProgram: Can not resolve #include <"+t+">")}return lK(r)}let lQ=/#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 l0(e){return e.replace(lQ,l1)}function l1(e,t,r,n){let i="";for(let e=parseInt(t);e<parseInt(r);e++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function l2(e){let t=`precision ${e.precision} float; 337 precision ${e.precision} int; 338 precision ${e.precision} sampler2D; 339 precision ${e.precision} samplerCube; 340 precision ${e.precision} sampler3D; 341 precision ${e.precision} sampler2DArray; 342 precision ${e.precision} sampler2DShadow; 343 precision ${e.precision} samplerCubeShadow; 344 precision ${e.precision} sampler2DArrayShadow; 345 precision ${e.precision} isampler2D; 346 precision ${e.precision} isampler3D; 347 precision ${e.precision} isamplerCube; 348 precision ${e.precision} isampler2DArray; 349 precision ${e.precision} usampler2D; 350 precision ${e.precision} usampler3D; 351 precision ${e.precision} usamplerCube; 352 precision ${e.precision} usampler2DArray; 353 `;return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}let l3={1:"SHADOWMAP_TYPE_PCF",3:"SHADOWMAP_TYPE_VSM"},l4={301:"ENVMAP_TYPE_CUBE",302:"ENVMAP_TYPE_CUBE",306:"ENVMAP_TYPE_CUBE_UV"},l5={302:"ENVMAP_MODE_REFRACTION"},l6={0:"ENVMAP_BLENDING_MULTIPLY",1:"ENVMAP_BLENDING_MIX",2:"ENVMAP_BLENDING_ADD"};function l8(e,t,r,n){var i,a;let s,o,l,u,c=e.getContext(),d=r.defines,h=r.vertexShader,f=r.fragmentShader,p=l3[r.shadowMapType]||"SHADOWMAP_TYPE_BASIC",m=!1===r.envMap?"ENVMAP_TYPE_CUBE":l4[r.envMapMode]||"ENVMAP_TYPE_CUBE",g=!1===r.envMap?"ENVMAP_MODE_REFLECTION":l5[r.envMapMode]||"ENVMAP_MODE_REFLECTION",v=!1===r.envMap?"ENVMAP_BLENDING_NONE":l6[r.combine]||"ENVMAP_BLENDING_NONE",y=function(e){let t=e.envMapCubeUVHeight;if(null===t)return null;let r=Math.log2(t)-2;return{texelWidth:1/(3*Math.max(Math.pow(2,r),112)),texelHeight:1/t,maxMip:r}}(r),x=[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(lX).join("\n"),b=function(e){let t=[];for(let r in e){let n=e[r];!1!==n&&t.push("#define "+r+" "+n)}return t.join("\n")}(d),_=c.createProgram(),S=r.glslVersion?"#version "+r.glslVersion+"\n":"";if(r.isRawShaderMaterial)(s=["#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,b].filter(lX).join("\n")).length>0&&(s+="\n"),(o=["#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,b].filter(lX).join("\n")).length>0&&(o+="\n");else{let e,t,n,l,u;s=[l2(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,b,r.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",r.batching?"#define USE_BATCHING":"",r.batchingColor?"#define USE_BATCHING_COLOR":"",r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.instancingMorph?"#define USE_INSTANCING_MORPH":"",r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+g:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.displacementMap?"#define USE_DISPLACEMENTMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.iridescenceMap?"#define USE_IR
353IDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.mapUv?"#define MAP_UV "+r.mapUv:"",r.alphaMapUv?"#define ALPHAMAP_UV "+r.alphaMapUv:"",r.lightMapUv?"#define LIGHTMAP_UV "+r.lightMapUv:"",r.aoMapUv?"#define AOMAP_UV "+r.aoMapUv:"",r.emissiveMapUv?"#define EMISSIVEMAP_UV "+r.emissiveMapUv:"",r.bumpMapUv?"#define BUMPMAP_UV "+r.bumpMapUv:"",r.normalMapUv?"#define NORMALMAP_UV "+r.normalMapUv:"",r.displacementMapUv?"#define DISPLACEMENTMAP_UV "+r.displacementMapUv:"",r.metalnessMapUv?"#define METALNESSMAP_UV "+r.metalnessMapUv:"",r.roughnessMapUv?"#define ROUGHNESSMAP_UV "+r.roughnessMapUv:"",r.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+r.anisotropyMapUv:"",r.clearcoatMapUv?"#define CLEARCOATMAP_UV "+r.clearcoatMapUv:"",r.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+r.clearcoatNormalMapUv:"",r.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+r.clearcoatRoughnessMapUv:"",r.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+r.iridescenceMapUv:"",r.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+r.iridescenceThicknessMapUv:"",r.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+r.sheenColorMapUv:"",r.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+r.sheenRoughnessMapUv:"",r.specularMapUv?"#define SPECULARMAP_UV "+r.specularMapUv:"",r.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+r.specularColorMapUv:"",r.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+r.specularIntensityMapUv:"",r.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+r.transmissionMapUv:"",r.thicknessMapUv?"#define THICKNESSMAP_UV "+r.thicknessMapUv:"",r.vertexTangents&&!1===r.flatShading?"#define USE_TANGENT":"",r.vertexNormals?"#define HAS_NORMAL":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&!1===r.flatShading?"#define USE_MORPHNORMALS":"",r.morphColors?"#define USE_MORPHCOLORS":"",r.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+r.morphTextureStride:"",r.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+p:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.numLightProbes>0?"#define USE_LIGHT_PROBES":"",r.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",r.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","\n"].filter(lX).join("\n"),o=[l2(r),"#define SHADER_TYPE "+r.shaderType,"#define SHADER_NAME "+r.shaderName,b,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+m:"",r.envMap?"#define "+g:"",r.envMap?"#define "+v:"",
353y?"#define CUBEUV_TEXEL_WIDTH "+y.texelWidth:"",y?"#define CUBEUV_TEXEL_HEIGHT "+y.texelHeight:"",y?"#define CUBEUV_MAX_MIP "+y.maxMip+".0":"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",r.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",r.packedNormalMap?"#define USE_PACKED_NORMALMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.anisotropy?"#define USE_ANISOTROPY":"",r.anisotropyMap?"#define USE_ANISOTROPYMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.dispersion?"#define USE_DISPERSION":"",r.iridescence?"#define USE_IRIDESCENCE":"",r.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",r.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",r.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.alphaHash?"#define USE_ALPHAHASH":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.vertexTangents&&!1===r.flatShading?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor?"#define USE_COLOR":"",r.vertexAlphas||r.batchingColor?"#define USE_COLOR_ALPHA":"",r.vertexUv1s?"#define USE_UV1":"",r.vertexUv2s?"#define USE_UV2":"",r.vertexUv3s?"#define USE_UV3":"",r.pointsUvs?"#define USE_POINTS_UV":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+p:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.numLightProbes>0?"#define USE_LIGHT_PROBES":"",r.numLightProbeGrids>0?"#define USE_LIGHT_PROBES_GRID":"",r.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",r.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",r.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",r.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==r.toneMapping?"#define TONE_MAPPING":"",0!==r.toneMapping?od.tonemapping_pars_fragment:"",0!==r.toneMapping?(i="toneMapping",void 0===(e=lH[a=r.toneMapping])?(D("WebGLProgram: Unsupported toneMapping:",a),"vec3 "+i+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"):"",r.dithering?"#define DITHERING":"",r.opaque?"#define OPAQUE":"",od.colorspace_pars_fragment,(t=function(e){es._getMatrix(lV,es.workingColorSpace,e);let t=`mat3( ${lV.elements.map(e=>e.toFixed(4))} )`;switch(es.getTransfer(e)){case w:return[t,"LinearTransferOETF"];case M:return[t,"sRGBTransferOETF"];default:return D("WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}(r.outputColorSpace),`vec4 linearToOutputTexel( vec4 value ) { 354 return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) ); 355}`),(es.getLuminanceCoefficients(lW),n=lW.x.toFixed(4),l=lW.y.toFixed(4),u=lW.z.toFixed(4),`float luminance( const in vec3 rgb ) { 356 const vec3 weights = vec3( ${n}, ${l}, ${u} ); 357 return dot( weights, rgb ); 358}`),r.useDepthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(lX).join("\n")}h=lY(h=lq(h=lK(h),r),r),f=lY(f=lq(f=lK(f),r),r),h=l0(h),f=l0(f),!0!==r.isRawShaderMaterial&&(S="#version 300 es\n",s=[x,"#define attribute in\n#define varying out\n#define texture2D texture"].join("\n")+"\n"+s,o=["#define varying in",r.glslVersion===T?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===T?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+o);let E=S+s+h,A=S+o+f,C=lj(c,c.VERTEX_SHADER,E),P=lj(c,c.FRAGMENT_SHADER,A);
358function I(t){if(e.debug.checkShaderErrors){let r=c.getProgramInfoLog(_)||"",n=c.getShaderInfoLog(C)||"",i=c.getShaderInfoLog(P)||"",a=r.trim(),l=n.trim(),u=i.trim(),d=!0,h=!0;if(!1===c.getProgramParameter(_,c.LINK_STATUS))if(d=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(c,_,C,P);else{let e=lG(c,C,"vertex"),r=lG(c,P,"fragment");k("WebGLProgram: Shader Error "+c.getError()+" - VALIDATE_STATUS "+c.getProgramParameter(_,c.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+a+"\n"+e+"\n"+r)}else""!==a?D("WebGLProgram: Program Info Log:",a):(""===l||""===u)&&(h=!1);h&&(t.diagnostics={runnable:d,programLog:a,vertexShader:{log:l,prefix:s},fragmentShader:{log:u,prefix:o}})}c.deleteShader(C),c.deleteShader(P),l=new lz(c,_),u=function(e,t){let r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){let n=e.getActiveAttrib(t,i),a=n.name,s=1;n.type===e.FLOAT_MAT2&&(s=2),n.type===e.FLOAT_MAT3&&(s=3),n.type===e.FLOAT_MAT4&&(s=4),r[a]={type:n.type,location:e.getAttribLocation(t,a),locationSize:s}}return r}(c,_)}c.attachShader(_,C),c.attachShader(_,P),void 0!==r.index0AttributeName?c.bindAttribLocation(_,0,r.index0AttributeName):!0===r.hasPositionAttribute&&c.bindAttribLocation(_,0,"position"),c.linkProgram(_),this.getUniforms=function(){return void 0===l&&I(this),l},this.getAttributes=function(){return void 0===u&&I(this),u};let O=!1===r.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===O&&(O=c.getProgramParameter(_,37297)),O},this.destroy=function(){n.releaseStatesOfProgram(this),c.deleteProgram(_),this.program=void 0},this.type=r.shaderType,this.name=r.shaderName,this.id=lB++,this.cacheKey=t,this.usedTimes=1,this.program=_,this.vertexShader=C,this.fragmentShader=P,this}let l9=0;class l7{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e,t,r){let n=this._getShaderCacheForMaterial(e);return!1===n.has(t)&&(n.add(t),t.usedTimes++),!1===n.has(r)&&(n.add(r),r.usedTimes++),this}remove(e){for(let t of this.materialCache.get(e))t.usedTimes--,0===t.usedTimes&&this.shaderCache.delete(t.code);return this.materialCache.delete(e),this}getVertexShaderStage(e){return this._getShaderStage(e.vertexShader)}getFragmentShaderStage(e){return this._getShaderStage(e.fragmentShader)}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,r=t.get(e);return void 0===r&&(r=new Set,t.set(e,r)),r}_getShaderStage(e){let t=this.shaderCache,r=t.get(e);return void 0===r&&(r=new ue(e),t.set(e,r)),r}}class ue{constructor(e){this.id=l9++,this.code=e,this.usedTimes=0}}function ut(e,t,r,n,i,a){let s=new eR,o=new l7,l=new Set,u=[],c=new Map,d=n.logarithmicDepthBuffer,h=n.precision,f={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 p(e){return(l.add(e),0===e)?"uv":`uv${e}`}return{getParameters:function(i,s,u,c,m,g){var v;let y,x,b,_,S=c.fog,w=m.geometry,T=i.isMeshStandardMaterial||i.isMeshLambertMaterial||i.isMeshPhongMaterial?c.environment:null,E=i.isMeshStandardMaterial||i.isMeshLambertMaterial&&!i.envMap||i.isMeshPhongMaterial&&!i.envMap,A=t.get(i.envMap||T,E),C=A&&306===A.mapping?A.image.height:null,P=f[i.type];null!==i.precision&&(h=n.getMaxPrecision(i.precision))!==i.precision&&D("WebGLProgram.getParameters:",i.precision,"not supported, using",h,"instead.");let I=w.morphAttributes.position||w.morphAttributes.normal||w.morphAttributes.color,O=void 0!==I?I.length:0,R=0;if(void 0!==w.morphAttributes.position&&(R=1),void 0!==w.morphAttributes.normal&&(R=2),void 0!==w.morphAttributes.color&&(R=3),P){let e=of[P];y=e.vertexShader,x=e.fragmentShader}else{y=i.vertexShader,x=i.fragmentShader;let e=o.getVertexShaderStage(i),t=o.getFragmentShaderStage(i);
vendor: 5,226 bytes, line 358
358o.update(i,e,t),b=e.id,_=t.id}let L=e.getRenderTarget(),N=e.state.buffers.depth.getReversed(),k=!0===m.isInstancedMesh,U=!0===m.isBatchedMesh,F=!!i.map,z=!!i.matcap,j=!!A,B=!!i.aoMap,V=!!i.lightMap,G=!!i.bumpMap&&!1===i.wireframe,H=!!i.normalMap,W=!!i.displacementMap,X=!!i.emissiveMap,q=!!i.metalnessMap,Y=!!i.roughnessMap,$=i.anisotropy>0,K=i.clearcoat>0,Z=i.dispersion>0,J=i.iridescence>0,Q=i.sheen>0,ee=i.transmission>0,et=$&&!!i.anisotropyMap,er=K&&!!i.clearcoatMap,en=K&&!!i.clearcoatNormalMap,ei=K&&!!i.clearcoatRoughnessMap,ea=J&&!!i.iridescenceMap,eo=J&&!!i.iridescenceThicknessMap,el=Q&&!!i.sheenColorMap,eu=Q&&!!i.sheenRoughnessMap,ec=!!i.specularMap,ed=!!i.specularColorMap,eh=!!i.specularIntensityMap,ef=ee&&!!i.transmissionMap,ep=ee&&!!i.thicknessMap,em=!!i.gradientMap,eg=!!i.alphaMap,ev=i.alphaTest>0,ey=!!i.alphaHash,ex=!!i.extensions,eb=0;i.toneMapped&&(null===L||!0===L.isXRRenderTarget)&&(eb=e.toneMapping);let e_={shaderID:P,shaderType:i.type,shaderName:i.name,vertexShader:y,fragmentShader:x,defines:i.defines,customVertexShaderID:b,customFragmentShaderID:_,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:h,batching:U,batchingColor:U&&null!==m._colorsTexture,instancing:k,instancingColor:k&&null!==m.instanceColor,instancingMorph:k&&null!==m.morphTexture,outputColorSpace:null===L?e.outputColorSpace:!0===L.isXRRenderTarget?L.texture.colorSpace:es.workingColorSpace,alphaToCoverage:!!i.alphaToCoverage,map:F,matcap:z,envMap:j,envMapMode:j&&A.mapping,envMapCubeUVHeight:C,aoMap:B,lightMap:V,bumpMap:G,normalMap:H,displacementMap:W,emissiveMap:X,normalMapObjectSpace:H&&1===i.normalMapType,normalMapTangentSpace:H&&0===i.normalMapType,packedNormalMap:H&&0===i.normalMapType&&(1030===(v=i.normalMap.format)||37490===v||36285===v),metalnessMap:q,roughnessMap:Y,anisotropy:$,anisotropyMap:et,clearcoat:K,clearcoatMap:er,clearcoatNormalMap:en,clearcoatRoughnessMap:ei,dispersion:Z,iridescence:J,iridescenceMap:ea,iridescenceThicknessMap:eo,sheen:Q,sheenColorMap:el,sheenRoughnessMap:eu,specularMap:ec,specularColorMap:ed,specularIntensityMap:eh,transmission:ee,transmissionMap:ef,thicknessMap:ep,gradientMap:em,opaque:!1===i.transparent&&1===i.blending&&!1===i.alphaToCoverage,alphaMap:eg,alphaTest:ev,alphaHash:ey,combine:i.combine,mapUv:F&&p(i.map.channel),aoMapUv:B&&p(i.aoMap.channel),lightMapUv:V&&p(i.lightMap.channel),bumpMapUv:G&&p(i.bumpMap.channel),normalMapUv:H&&p(i.normalMap.channel),displacementMapUv:W&&p(i.displacementMap.channel),emissiveMapUv:X&&p(i.emissiveMap.channel),metalnessMapUv:q&&p(i.metalnessMap.channel),roughnessMapUv:Y&&p(i.roughnessMap.channel),anisotropyMapUv:et&&p(i.anisotropyMap.channel),clearcoatMapUv:er&&p(i.clearcoatMap.channel),clearcoatNormalMapUv:en&&p(i.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ei&&p(i.clearcoatRoughnessMap.channel),iridescenceMapUv:ea&&p(i.iridescenceMap.channel),iridescenceThicknessMapUv:eo&&p(i.iridescenceThicknessMap.channel),sheenColorMapUv:el&&p(i.sheenColorMap.channel),sheenRoughnessMapUv:eu&&p(i.sheenRoughnessMap.channel),specularMapUv:ec&&p(i.specularMap.channel),specularColorMapUv:ed&&p(i.specularColorMap.channel),specularIntensityMapUv:eh&&p(i.specularIntensityMap.channel),transmissionMapUv:ef&&p(i.transmissionMap.channel),thicknessMapUv:ep&&p(i.thicknessMap.channel),alphaMapUv:eg&&p(i.alphaMap.channel),vertexTangents:!!w.attributes.tangent&&(H||$),vertexNormals:!!w.attributes.normal,vertexColors:i.vertexColors,vertexAlphas:!0===i.vertexColors&&!!w.attributes.color&&4===w.attributes.color.itemSize,pointsUvs:!0===m.isPoints&&!!w.attributes.uv&&(F||eg),fog:!!S,useFog:!0===i.fog,fogExp2:!!S&&S.isFogExp2,flatShading:!1===i.wireframe&&(!0===i.flatShading||void 0===w.attributes.normal&&!1===H&&(i.isMeshLambertMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.isMeshPhysicalMaterial)),sizeAttenuation:!0===i.sizeAttenuation,logarithmicDepthBuffer:d,reversedDepthBuffer:N,skinning:!0===m.isSkinnedMesh,hasPositionAttribute:void 0!==w.attributes.position,morphTargets:void 0!==w.morphAttributes.position,morphNormals:void 0!==w.morphAttributes.normal,morphColors:void 0!==w.morphAttributes.color,morphTargetsCount:O,morphTextureStride:R,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numLightProbeGrids:g.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:eb,decodeVideoTexture:F&&!0===i.map.isVideoTexture&&es.getTransfer(i.map.colorSpace)===M,decodeVideoTextureEmissive:X&&!0===i.emissiveMap.isVideoTexture&&es.getTransfer(i.emissiveMap.colorSpace)===M,premultipliedAlpha:i.premultipliedAlpha,doubleSided:2===i.side,flipSided:1===i.side,useDepthPacking:i.depthPacking>=0,depthPacking:i.depthPacking||0,index0AttributeName:i.index0AttributeName,extensionCl
358ipCullDistance:ex&&!0===i.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ex&&!0===i.extensions.multiDraw||U)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:i.customProgramCacheKey()};return e_.vertexUv1s=l.has(1),e_.vertexUv2s=l.has(2),e_.vertexUv3s=l.has(3),l.clear(),e_},getProgramCacheKey:function(t){var r,n,i,a;let o=[];if(t.shaderID?o.push(t.shaderID):(o.push(t.customVertexShaderID),o.push(t.customFragmentShaderID)),void 0!==t.defines)for(let e in t.defines)o.push(e),o.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(r=o,n=t,r.push(n.precision),r.push(n.outputColorSpace),r.push(n.envMapMode),r.push(n.envMapCubeUVHeight),r.push(n.mapUv),r.push(n.alphaMapUv),r.push(n.lightMapUv),r.push(n.aoMapUv),r.push(n.bumpMapUv),r.push(n.normalMapUv),r.push(n.displacementMapUv),r.push(n.emissiveMapUv),r.push(n.metalnessMapUv),r.push(n.roughnessMapUv),r.push(n.anisotropyMapUv),r.push(n.clearcoatMapUv),r.push(n.clearcoatNormalMapUv),r.push(n.clearcoatRoughnessMapUv),r.push(n.iridescenceMapUv),r.push(n.iridescenceThicknessMapUv),r.push(n.sheenColorMapUv),r.push(n.sheenRoughnessMapUv),r.push(n.specularMapUv),r.push(n.specularColorMapUv),r.push(n.specularIntensityMapUv),r.push(n.transmissionMapUv),r.push(n.thicknessMapUv),r.push(n.combine),r.push(n.fogExp2),r.push(n.sizeAttenuation),r.push(n.morphTargetsCount),r.push(n.morphAttributeCount),r.push(n.numDirLights),r.push(n.numPointLights),r.push(n.numSpotLights),r.push(n.numSpotLightMaps),r.push(n.numHemiLights),r.push(n.numRectAreaLights),r.push(n.numDirLightShadows),r.push(n.numPointLightShadows),r.push(n.numSpotLightShadows),r.push(n.numSpotLightShadowsWithMaps),r.push(n.numLightProbes),r.push(n.shadowMapType),r.push(n.toneMapping),r.push(n.numClippingPlanes),r.push(n.numClipIntersection),r.push(n.depthPacking),i=o,a=t,s.disableAll(),a.instancing&&s.enable(0),a.instancingColor&&s.enable(1),a.instancingMorph&&s.enable(2),a.matcap&&s.enable(3),a.envMap&&s.enable(4),a.normalMapObjectSpace&&s.enable(5),a.normalMapTangentSpace&&s.enable(6),a.clearcoat&&s.enable(7),a.iridescence&&s.enable(8),a.alphaTest&&s.enable(9),a.vertexColors&&s.enable(10),a.vertexAlphas&&s.enable(11),a.vertexUv1s&&s.enable(12),a.vertexUv2s&&s.enable(13),a.vertexUv3s&&s.enable(14),a.vertexTangents&&s.enable(15),a.anisotropy&&s.enable(16),a.alphaHash&&s.enable(17),a.batching&&s.enable(18),a.dispersion&&s.enable(19),a.batchingColor&&s.enable(20),a.gradientMap&&s.enable(21),a.packedNormalMap&&s.enable(22),a.vertexNormals&&s.enable(23),i.push(s.mask),s.disableAll(),a.fog&&s.enable(0),a.useFog&&s.enable(1),a.flatShading&&s.enable(2),a.logarithmicDepthBuffer&&s.enable(3),a.reversedDepthBuffer&&s.enable(4),a.skinning&&s.enable(5),a.morphTargets&&s.enable(6),a.morphNormals&&s.enable(7),a.morphColors&&s.enable(8),a.premultipliedAlpha&&s.enable(9),a.shadowMapEnabled&&s.enable(10),a.doubleSided&&s.enable(11),a.flipSided&&s.enable(12),a.useDepthPacking&&s.enable(13),a.dithering&&s.enable(14),a.transmission&&s.enable(15),a.sheen&&s.enable(16),a.opaque&&s.enable(17),a.pointsUvs&&s.enable(18),a.decodeVideoTexture&&s.enable(19),a.decodeVideoTextureEmissive&&s.enable(20),a.alphaToCoverage&&s.enable(21),a.numLightProbeGrids>0&&s.enable(22),a.hasPositionAttribute&&s.enable(23),i.push(s.mask),o.push(e.outputColorSpace)),o.push(t.customProgramCacheKey),o.join()},getUniforms:function(e){let t,r=f[e.type];if(r){let e=of[r];t=i7.clone(e.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,r){let n=c.get(r);return void 0!==n?++n.usedTimes:(n=new l8(e,r,t,i),u.push(n),c.set(r,n)),n},releaseProgram:function(e){if(0==--e.usedTimes){let t=u.indexOf(e);u[t]=u[u.length-1],u.pop(),c.delete(e.cacheKey),e.destroy()}},releaseShaderCache:function(e){o.remove(e)},programs:u,dispose:function(){o.dispose()}}}function ur(){let e=new WeakMap;return{has:function(t){return e.has(t)},get:function(t){let r=e.get(t);return void 0===r&&(r={},e.set(t,r)),r},remove:function(t){e.delete(t)},update:function(t,r,n){e.get(t)[r]=n},dispose:function(){e=new WeakMap}}}function un(e,t){if(e.groupOrder!==t.groupOrder)return e.groupOrder-t.groupOrder;if(e.renderOrder!==t.renderOrder)return e.renderOrder-t.renderOrder;if(e.material.id!==t.material.id)return e.material.id-t.material.id;if(e.materialVariant!==t.materialVariant)return e.materialVariant-t.materialVariant;if(e.z!==t.z)return e.z-t.z;else return e.id-t.id}function ui(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function ua(){let e=[],t=0,r=[],n=[],i=[];function a(e){let t=0;return e.isInstancedMesh&&(t+=2),e.isSkinnedMesh&&(t+=1),t}function s(r,n,i,s,o,l){let u=e[t];return void 0===u?(u={id:r.id,object:r,geometry:n,material:i,materialVariant:a(r),groupOrder:s,renderOrder:r.renderOrder,z:o,group:l},e[t]=u):(u.id=r.id,u.object=r,u.geometry=n,u.material=i,u.materialVariant=a(r),u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=o,u.group=l),t++,u}return{opaque:r,transmissive:n,transparent:i,init:function(){t=0,r.length=0,n.length=0,i.length=0},push:function(e,t,a,o,l,u){let c=s(e,t,a,o,l,u);a.transmission>0?n.push(c):!0===a.transparent?i.push(c):r.push(c)},unshift:function(e,t,a,o,l,u){let c=s(e,t,a,o,l,u);a.transmission>0?n.unshift(c):!0===a.transparent?i.unshift(c):r.unshift(c)},finish:function(){for(let r=t,n=e.length;r<n;r++){let t=e[r];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t,a){r.length>1&&r.sort(e||un),n.length>1&&n.sort(t||ui),i.length>1&&i.sort(t||ui),a&&(r.reverse(),n.reverse(),i.reverse())}}}function us(){let e=new WeakMap;return{get:function(t,r){let n,i=e.get(t);return void 0===i?(n=new ua,e.set(t,[n])):r>=i.length?(n=new ua,i.push(n)):n=i[r],n},dispose:function(){e=new WeakMap}}}function uo(){let e={};return{get:function(t){let r;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":r={direction:new Q,color:new e2};break;case"SpotLight":r={position:new Q,direction:new Q,color:new e2,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new Q,color:new e2,distance:0,decay:0};break;case"HemisphereLight":r={direction:new Q,skyColor:new e2,groundColor:new e2};break;case"RectAreaLight":r={color:new e2,position:new Q,halfWidth:new Q,halfHeight:new Q}}return e[t.id]=r,r}}}let ul=0;function uu(e,t){return 2*!!t.castShadow-2*!!e.castShadow+ +!!t.map-!!e.map}function uc(e){let t,r=new uo,n=(t={},{get:function(e){let r;if(void 0!==t[e.id])return t[e.id];switch(e.type){case"DirectionalLight":case"SpotLight":r={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Z};break;case"PointLight":r={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Z,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=r,r}}),i={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++)i.probe.push(new Q);let a=new Q,s=new e_,o=new e_;return{setup:function(t){let a=0,s=0,o=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let l=0,u=0,c=0,d=0,h=0,f=0,p=0,m=0,g=0,v=0,y=0;t.sort(uu);for(let e=0,x=t.length;e<x;e++){let x=t[e],b=x.color,_=x.intensity,S=x.distance,w=null;if(x.shadow&&x.shadow.map&&(w=1030===x.shadow.map.texture.format?x.shadow.map.texture:x.shadow.map.depthTexture||x.shadow.map.texture),x.isAmbientLight)a+=b.r*_,s+=b.g*_,o+=b.b*_;else if(x.isLightProbe){for(let e=0;e<9;e++)i.probe[e].addScaledVector(x.sh.coefficients[e],_);y++}else if(x.isDirectionalLight){let e=r.get(x);if(e.color.copy(x.color).multiplyScalar(x.intensity),x.castShadow){let e=x.shadow,t=n.get(x);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.n
vendor: 4,728 bytes, line 358
358ormalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,i.directionalShadow[l]=t,i.directionalShadowMap[l]=w,i.directionalShadowMatrix[l]=x.shadow.matrix,f++}i.directional[l]=e,l++}else if(x.isSpotLight){let e=r.get(x);e.position.setFromMatrixPosition(x.matrixWorld),e.color.copy(b).multiplyScalar(_),e.distance=S,e.coneCos=Math.cos(x.angle),e.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),e.decay=x.decay,i.spot[c]=e;let t=x.shadow;if(x.map&&(i.spotLightMap[g]=x.map,g++,t.updateMatrices(x),x.castShadow&&v++),i.spotLightMatrix[c]=t.matrix,x.castShadow){let e=n.get(x);e.shadowIntensity=t.intensity,e.shadowBias=t.bias,e.shadowNormalBias=t.normalBias,e.shadowRadius=t.radius,e.shadowMapSize=t.mapSize,i.spotShadow[c]=e,i.spotShadowMap[c]=w,m++}c++}else if(x.isRectAreaLight){let e=r.get(x);e.color.copy(b).multiplyScalar(_),e.halfWidth.set(.5*x.width,0,0),e.halfHeight.set(0,.5*x.height,0),i.rectArea[d]=e,d++}else if(x.isPointLight){let e=r.get(x);if(e.color.copy(x.color).multiplyScalar(x.intensity),e.distance=x.distance,e.decay=x.decay,x.castShadow){let e=x.shadow,t=n.get(x);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,i.pointShadow[u]=t,i.pointShadowMap[u]=w,i.pointShadowMatrix[u]=x.shadow.matrix,p++}i.point[u]=e,u++}else if(x.isHemisphereLight){let e=r.get(x);e.skyColor.copy(x.color).multiplyScalar(_),e.groundColor.copy(x.groundColor).multiplyScalar(_),i.hemi[h]=e,h++}}d>0&&(!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=oh.LTC_FLOAT_1,i.rectAreaLTC2=oh.LTC_FLOAT_2):(i.rectAreaLTC1=oh.LTC_HALF_1,i.rectAreaLTC2=oh.LTC_HALF_2)),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=o;let x=i.hash;(x.directionalLength!==l||x.pointLength!==u||x.spotLength!==c||x.rectAreaLength!==d||x.hemiLength!==h||x.numDirectionalShadows!==f||x.numPointShadows!==p||x.numSpotShadows!==m||x.numSpotMaps!==g||x.numLightProbes!==y)&&(i.directional.length=l,i.spot.length=c,i.rectArea.length=d,i.point.length=u,i.hemi.length=h,i.directionalShadow.length=f,i.directionalShadowMap.length=f,i.pointShadow.length=p,i.pointShadowMap.length=p,i.spotShadow.length=m,i.spotShadowMap.length=m,i.directionalShadowMatrix.length=f,i.pointShadowMatrix.length=p,i.spotLightMatrix.length=m+g-v,i.spotLightMap.length=g,i.numSpotLightShadowsWithMaps=v,i.numLightProbes=y,x.directionalLength=l,x.pointLength=u,x.spotLength=c,x.rectAreaLength=d,x.hemiLength=h,x.numDirectionalShadows=f,x.numPointShadows=p,x.numSpotShadows=m,x.numSpotMaps=g,x.numLightProbes=y,i.version=ul++)},setupView:function(e,t){let r=0,n=0,l=0,u=0,c=0,d=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){let h=e[t];if(h.isDirectionalLight){let e=i.directional[r];e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(d),r++}else if(h.isSpotLight){let e=i.spot[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(d),l++}else if(h.isRectAreaLight){let e=i.rectArea[u];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),o.identity(),s.copy(h.matrixWorld),s.premultiply(d),o.extractRotation(s),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(o),e.halfHeight.applyMatrix4(o),u++}else if(h.isPointLight){let e=i.point[n];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),n++}else if(h.isHemisphereLight){let e=i.hemi[c];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(d),c++}}},state:i}}function ud(e){let t=new uc(e),r=[],n=[],i=[],a={lightsArray:r,shadowsArray:n,lightProbeGridArray:i,camera:null,lights:t,transmissionRenderTarget:{},textureUnits:0};return{init:function(e){a.camera=e,r.length=0,n.length=0,i.length=0},state:a,setupLights:function(){t.setup(r)},setupLightsView:function(e){t.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){n.push(e)},pushLightProbeGrid:function(e){i.push(e)}}}function uh(e){let t=new WeakMap;return{get:function(r,n=0){let i,a=t.get(r);return void 0===a?(i=new ud(e),t.set(r,[i])):n>=a.length?(i=new ud(e),a.push(i)):i=a[n],i},dispose:function(){t=new WeakMap}}}let uf=[new Q(1,0,0),new Q(-1,0,0),new Q(0,1,0),new Q(0,-1,0),new Q(0,0,1),new Q(0,0,-1)],up=[new Q(0,-1,0),new Q(0,-1,0),new Q(0,0,1),new Q(0,0,-1),new Q(0,-1,0),new Q(0,-1,0)],um=new e_,ug=new Q,uv=new Q;function uy(e,t,r){let n=new r6,i=new Z,a=new Z,s=new eg,o=new al,l=new au,u={},c=r.maxTextureSize,d={0:1,1:0,2:2}
358,h=new ae({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Z},radius:{value:4}},vertexShader:"void main() {\n gl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\nvoid main() {\n const float samples = float( VSM_SAMPLES );\n float mean = 0.0;\n float squared_mean = 0.0;\n float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n float uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n for ( float i = 0.0; i < samples; i ++ ) {\n float uvOffset = uvStart + i * uvStride;\n #ifdef HORIZONTAL_PASS\n vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean / samples;\n squared_mean = squared_mean / samples;\n float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );\n gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );\n}"}),f=h.clone();f.defines.HORIZONTAL_PASS=1;let p=new tq;p.setAttribute("position",new tR(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new rA(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let v=this.type;function y(t,r,n,i){let a=null,s=!0===n.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===n.isPointLight?l:o,e.localClippingEnabled&&!0===r.clipShadows&&Array.isArray(r.clippingPlanes)&&0!==r.clippingPlanes.length||r.displacementMap&&0!==r.displacementScale||r.alphaMap&&r.alphaTest>0||r.map&&r.alphaTest>0||!0===r.alphaToCoverage){let e=a.uuid,t=r.uuid,n=u[e];void 0===n&&(n={},u[e]=n);let i=n[t];void 0===i&&(i=a.clone(),n[t]=i,r.addEventListener("dispose",x)),a=i}return a.visible=r.visible,a.wireframe=r.wireframe,3===i?a.side=null!==r.shadowSide?r.shadowSide:r.side:a.side=null!==r.shadowSide?r.shadowSide:d[r.side],a.alphaMap=r.alphaMap,a.alphaTest=!0===r.alphaToCoverage?.5:r.alphaTest,a.map=r.map,a.clipShadows=r.clipShadows,a.clippingPlanes=r.clippingPlanes,a.clipIntersection=r.clipIntersection,a.displacementMap=r.displacementMap,a.displacementScale=r.displacementScale,a.displacementBias=r.displacementBias,a.wireframeLinewidth=r.wireframeLinewidth,a.linewidth=r.linewidth,!0===n.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=n),a}function x(e){for(let t in e.target.removeEventListener("dispose",x),u){let r=u[t],n=e.target.uuid;n in r&&(r[n].dispose(),delete r[n])}}this.render=function(r,o,l){if(!1===g.enabled||!1===g.autoUpdate&&!1===g.needsUpdate||0===r.length)return;2===this.type&&(D("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=1);let u=e.getRenderTarget(),d=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),x=e.state;x.setBlending(0),!0===x.buffers.depth.getReversed()?x.buffers.color.setClear(0,0,0,0):x.buffers.color.setClear(1,1,1,1),x.buffers.depth.setTest(!0),x.setScissorTest(!1);let b=v!==this.type;b&&o.traverse(function(e){e.material&&(Array.isArray(e.material)?e.material.forEach(e=>e.needsUpdate=!0):e.material.needsUpdate=!0)});for(let u=0,d=r.length;u<d;u++){let d=r[u],p=d.shadow;if(void 0===p){D("WebGLShadowMap:",d,"has no shadow.");continue}if(!1===p.autoUpdate&&!1===p.needsUpdate)continue;i.copy(p.mapSize);let g=p.getFrameExtents();i.multiply(g),a.copy(p.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(a.x=Math.floor(c/g.x),i.x=a.x*g.x,p.mapSize.x=a.x),i.y>c&&(a.y=Math.floor(c/g.y),i.y=a.y*g.y,p.mapSize.y=a.y));let v=e.state.buffers.depth.getReversed();if(p.camera._reversedDepth=v,null===p.map||!0===b){if(null!==p.map&&(null!==p.map.depthTexture&&(p.map.depthTexture.dispose(),p.map.depthTexture=null),p.map.dispose()),3===this.type){if(d.isPointLight){D("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}p.map=new ey(i.x,i.y,{format:1030,type:1016,minFilter:1006,magFilter:1006,generateMipmaps:!1}),p.map.texture.name=d.name+".shadowMap",p.map.depthTexture=new nj(i.x,i.y,1015),p.map.depthTexture.name=d.name+".shadowMapDepth",p.map.depthTexture.format=1026,p.map.depthTexture.compareFunction=null,p.map.depthTexture.minFilter=1003,p.map.depthTexture.magFilter=1003}else d.isPointLight?(p.map=new ok(i.x),p.map.depthTexture=new nB(i.x,1014)):(p.map=new ey(i.x,i.y),p.map.depthTexture=new nj(i.x,i.y,1014)),p.map.depthTexture.name=d.name+".shadowMap",p.map.depthTexture.format=1026,1===this.type?(p.map.depthTexture.compareFunction=v?518:515,p.map.depthTexture.minFilter=1006,p.map.depthTexture.magFilter=1006):(p.map.depthTexture.compareFunction=null,p.map.depthTexture.minFilter=1003,p.map.depthTexture.magFilter=1003);p.camera.updateProjectionMatrix()}
358let _=p.map.isWebGLCubeRenderTarget?6:1;for(let r=0;r<_;r++){if(p.map.isWebGLCubeRenderTarget)e.setRenderTarget(p.map,r),e.clear();else{0===r&&(e.setRenderTarget(p.map),e.clear());let t=p.getViewport(r);s.set(a.x*t.x,a.y*t.y,a.x*t.z,a.y*t.w),x.viewport(s)}if(d.isPointLight){let e=p.camera,t=p.matrix,n=d.distance||e.far;n!==e.far&&(e.far=n,e.updateProjectionMatrix()),ug.setFromMatrixPosition(d.matrixWorld),e.position.copy(ug),uv.copy(e.position),uv.add(uf[r]),e.up.copy(up[r]),e.lookAt(uv),e.updateMatrixWorld(),t.makeTranslation(-ug.x,-ug.y,-ug.z),um.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),p._frustum.setFromProjectionMatrix(um,e.coordinateSystem,e.reversedDepth)}else p.updateMatrices(d);n=p.getFrustum(),function r(i,a,s,o,l){if(!1===i.visible)return;if(i.layers.test(a.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&3===l)&&(!i.frustumCulled||n.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,i.matrixWorld);let r=t.update(i),n=i.material;if(Array.isArray(n)){let t=r.groups;for(let u=0,c=t.length;u<c;u++){let c=t[u],d=n[c.materialIndex];if(d&&d.visible){let t=y(i,d,o,l);i.onBeforeShadow(e,i,a,s,r,t,c),e.renderBufferDirect(s,null,r,t,i,c),i.onAfterShadow(e,i,a,s,r,t,c)}}}else if(n.visible){let t=y(i,n,o,l);i.onBeforeShadow(e,i,a,s,r,t,null),e.renderBufferDirect(s,null,r,t,i,null),i.onAfterShadow(e,i,a,s,r,t,null)}}let u=i.children;for(let e=0,t=u.length;e<t;e++)r(u[e],a,s,o,l)}(o,l,p.camera,d,this.type)}!0!==p.isPointLightShadow&&3===this.type&&function(r,n){let a=t.update(m);h.defines.VSM_SAMPLES!==r.blurSamples&&(h.defines.VSM_SAMPLES=r.blurSamples,f.defines.VSM_SAMPLES=r.blurSamples,h.needsUpdate=!0,f.needsUpdate=!0),null===r.mapPass&&(r.mapPass=new ey(i.x,i.y,{format:1030,type:1016})),h.uniforms.shadow_pass.value=r.map.depthTexture,h.uniforms.resolution.value=r.mapSize,h.uniforms.radius.value=r.radius,e.setRenderTarget(r.mapPass),e.clear(),e.renderBufferDirect(n,null,a,h,m,null),f.uniforms.shadow_pass.value=r.mapPass.texture,f.uniforms.resolution.value=r.mapSize,f.uniforms.radius.value=r.radius,e.setRenderTarget(r.map),e.clear(),e.renderBufferDirect(n,null,a,f,m,null)}(p,l),p.needsUpdate=!1}v=this.type,g.needsUpdate=!1,e.setRenderTarget(u,d,p)}}function ux(e,t){let r=new function(){let t=!1,r=new eg,n=null,i=new eg(0,0,0,0);return{setMask:function(r){n===r||t||(e.colorMask(r,r,r,r),n=r)},setLocked:function(e){t=e},setClear:function(t,n,a,s,o){!0===o&&(t*=s,n*=s,a*=s),r.set(t,n,a,s),!1===i.equals(r)&&(e.clearColor(t,n,a,s),i.copy(r))},reset:function(){t=!1,n=null,i.set(-1,0,0,0)}}},n=new function(){let r=!1,n=!1,i=null,a=null,s=null;return{setReversed:function(e){if(n!==e){let r=t.get("EXT_clip_control");e?r.clipControlEXT(r.LOWER_LEFT_EXT,r.ZERO_TO_ONE_EXT):r.clipControlEXT(r.LOWER_LEFT_EXT,r.NEGATIVE_ONE_TO_ONE_EXT),n=e;let i=s;s=null,this.setClear(i)}},getReversed:function(){return n},setTest:function(t){t?V(e.DEPTH_TEST):G(e.DEPTH_TEST)},setMask:function(t){i===t||r||(e.depthMask(t),i=t)},setFunc:function(t){if(n&&(t=z[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:default: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)}a=t}},setLocked:function(e){r=e},setClear:function(t){s!==t&&(s=t,n&&(t=1-t),e.clearDepth(t))},reset:function(){r=!1,i=null,a=null,s=null,n=!1}}},i=new function(){let t=!1,r=null,n=null,i=null,a=null,s=null,o=null,l=null,u=null;return{setTest:function(r){t||(r?V(e.STENCIL_TEST):G(e.STENCIL_TEST))},setMask:function(n){r===n||t||(e.stencilMask(n),r=n)},setFunc:function(t,r,s){(n!==t||i!==r||a!==s)&&(e.stencilFunc(t,r,s),n=t,i=r,a=s)},setOp:function(t,r,n){(s!==t||o!==r||l!==n)&&(e.stencilOp(t,r,n),s=t,o=r,l=n)},setLocked:function(e){t=e},setClear:function(t){u!==t&&(e.clearStencil(t),u=t)},reset:function(){t=!1,r=null,n=null,i=null,a=null,s=null,o=null,l=null,u=null}}},a=new WeakMap,s=new WeakMap,o={},l={},u={},c=new WeakMap,d=[],h=null,f=!1,p=null,m=null,g=null,v=null,y=null,x=null,b=null,_=new e2(0,0,0),S=0,w=!1,M=null,T=null,E=null,A=null,C=null,P=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),I=!1,O=e.getParameter(e.VERSION);-1!==O.indexOf("WebGL")?I=parseFloat(/^WebGL (\d)/.exec(O)[1])>=1:-1!==O.indexOf("OpenGL ES")&&(I=parseFloat(/^OpenGL ES (\d)/.exec(O)[1])>=2);
358let R=null,L={},N=e.getParameter(e.SCISSOR_BOX),D=e.getParameter(e.VIEWPORT),U=new eg().fromArray(N),F=new eg().fromArray(D);function j(t,r,n,i){let a=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let s=0;s<n;s++)t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY?e.texImage3D(r,0,e.RGBA,1,1,i,0,e.RGBA,e.UNSIGNED_BYTE,a):e.texImage2D(r+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a);return s}let B={};function V(t){!0!==o[t]&&(e.enable(t),o[t]=!0)}function G(t){!1!==o[t]&&(e.disable(t),o[t]=!1)}B[e.TEXTURE_2D]=j(e.TEXTURE_2D,e.TEXTURE_2D,1),B[e.TEXTURE_CUBE_MAP]=j(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),B[e.TEXTURE_2D_ARRAY]=j(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),B[e.TEXTURE_3D]=j(e.TEXTURE_3D,e.TEXTURE_3D,1,1),r.setClear(0,0,0,1),n.setClear(1),i.setClear(0),V(e.DEPTH_TEST),n.setFunc(3),q(!1),Y(1),V(e.CULL_FACE),X(0);let H={100:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT};H[103]=e.MIN,H[104]=e.MAX;let W={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 X(t,r,n,i,a,s,o,l,u,c){if(0===t){!0===f&&(G(e.BLEND),f=!1);return}if(!1===f&&(V(e.BLEND),f=!0),5!==t){if(t!==p||c!==w){if((100!==m||100!==y)&&(e.blendEquation(e.FUNC_ADD),m=100,y=100),c)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:k("WebGLState: Invalid blending: ",t)}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:k("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case 4:k("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:k("WebGLState: Invalid blending: ",t)}g=null,v=null,x=null,b=null,_.set(0,0,0),S=0,p=t,w=c}return}a=a||r,s=s||n,o=o||i,(r!==m||a!==y)&&(e.blendEquationSeparate(H[r],H[a]),m=r,y=a),(n!==g||i!==v||s!==x||o!==b)&&(e.blendFuncSeparate(W[n],W[i],W[s],W[o]),g=n,v=i,x=s,b=o),(!1===l.equals(_)||u!==S)&&(e.blendColor(l.r,l.g,l.b,u),_.copy(l),S=u),p=t,w=!1}function q(t){M!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),M=t)}function Y(t){0!==t?(V(e.CULL_FACE),t!==T&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):G(e.CULL_FACE),T=t}function $(t,r,i){t?(V(e.POLYGON_OFFSET_FILL),(A!==r||C!==i)&&(A=r,C=i,n.getReversed()&&(r=-r),e.polygonOffset(r,i))):G(e.POLYGON_OFFSET_FILL)}return{buffers:{color:r,depth:n,stencil:i},enable:V,disable:G,bindFramebuffer:function(t,r){return u[t]!==r&&(e.bindFramebuffer(t,r),u[t]=r,t===e.DRAW_FRAMEBUFFER&&(u[e.FRAMEBUFFER]=r),t===e.FRAMEBUFFER&&(u[e.DRAW_FRAMEBUFFER]=r),!0)},drawBuffers:function(t,r){let n=d,i=!1;if(t){void 0===(n=c.get(r))&&(n=[],c.set(r,n));let a=t.textures;if(n.length!==a.length||n[0]!==e.COLOR_ATTACHMENT0){for(let t=0,r=a.length;t<r;t++)n[t]=e.COLOR_ATTACHMENT0+t;n.length=a.length,i=!0}}else n[0]!==e.BACK&&(n[0]=e.BACK,i=!0);i&&e.drawBuffers(n)},useProgram:function(t){return h!==t&&(e.useProgram(t),h=t,!0)},setBlending:X,setMaterial:function(t,a){2===t.side?G(e.CULL_FACE):V(e.CULL_FACE);let s=1===t.side;a&&(s=!s),q(s),1===t.blending&&!1===t.transparent?X(0):X(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),n.setFunc(t.depthFunc),n.setTest(t.depthTest),n.setMask(t.depthWrite),r.setMask(t.colorWrite);let o=t.stencilWrite;i.setTest(o),o&&(i.setMask(t.stencilWriteMask),i.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),i.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),$(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?V(e.SAMPLE_ALPHA_TO_COVERAGE):G(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:q,setCullFace:Y,setLineWidth:function(t){t!==E&&(I&&e.lineWidth(t),E=t)},setPolygonOffset:$,setScissorTest:function(t){t?V(e.SCISSOR_TEST):G(e.SCISSOR_TEST)},activeTexture:function(t){void 0===t&&(t=e.TEXTURE0+P-1),R!==t&&(e.activeTexture(t),R=t)},bindTexture:function(t,r,n){void 0===n&&(n=null===R?e.TEXTURE0+P-1:R);let i=L[n];void 0===i&&(i={type:void 0,texture:void 0},L[n]=i),(i.type!==t||i.texture!==r)&&(R!==n&&(e.activeTexture(n),R=n),e.bindTexture(t,r||B[t]),i.type=t,i.texture=r)},unbindTexture:function(){let t=L[R];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D(...arguments)}catch(e){k("WebGLState:",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D(...arguments)}catch(e){k("WebGLState:",e)}},texImage2D:function(){try{e.texImage2D(...arguments)}catch(e){k("WebGLState:",e)}},texImage3D:function(){try{e.texImage3D(...arguments)}catch(e){k("WebGLState:",e)}},pixelStorei:function(t,r){l[t]!==r&&(e.pixelStorei(t,r),l[t]=r)},getParameter:function(t){return void 0!==l[t]?l[t]:e.getParameter(t)},updateUBOMapping:function(t,r){let n=s.get(r);void 0===n&&(n=new WeakMap,s.set(r,n));let i=n.get(t);void 0===i&&(i=e.getUniformBlockIndex(r,t.name),n.set(t,i))},uniformBlockBinding:function(t,r){let n=s.get(r).get(t);a.get(r)!==n&&(e.uniformBlockBinding(r,n,t.__bindingPointIndex),a.set(r,n))},texStorage2D:function(){try{e.texStorage2D(...arguments)}catch(e){k("WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D(...arguments)}catch(e){k("WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D(...arguments)}catch(e){k("WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D(...arguments)}catch(e){k("WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D(...arguments)}catch(e){k("WebGLState:",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D(...arguments)}catch(e){k("WebGLState:",e)}},scissor:function(t){!1===U.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),U.copy(t))},viewport:function(t){!1===F.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),F.copy(t))},reset:function(){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
358(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),n.setReversed(!1),e.clearDepth(1),e.stencilMask(0xffffffff),e.stencilFunc(e.ALWAYS,0,0xffffffff),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),o={},l={},R=null,L={},u={},c=new WeakMap,d=[],h=null,f=!1,p=null,m=null,g=null,v=null,y=null,x=null,b=null,_=new e2(0,0,0),S=0,w=!1,M=null,T=null,E=null,A=null,C=null,U.set(0,0,e.canvas.width,e.canvas.height),F.set(0,0,e.canvas.width,e.canvas.height),r.reset(),n.reset(),i.reset()}}}function ub(e,t,r,n,i,a,s){let o,l=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,u="u">typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),c=new Z,d=new WeakMap,h=new Set,f=new WeakMap,p=!1;try{p="u">typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function m(e,t){return p?new OffscreenCanvas(e,t):P("canvas")}function g(e,t,r){let n=1,i=$(e);if((i.width>r||i.height>r)&&(n=r/Math.max(i.width,i.height)),n<1)if("u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof ImageBitmap&&e instanceof ImageBitmap||"u">typeof VideoFrame&&e instanceof VideoFrame){let r=Math.floor(n*i.width),a=Math.floor(n*i.height);void 0===o&&(o=m(r,a));let s=t?m(r,a):o;return s.width=r,s.height=a,s.getContext("2d").drawImage(e,0,0,r,a),D("WebGLRenderer: Texture has been resized from ("+i.width+"x"+i.height+") to ("+r+"x"+a+")."),s}else"data"in e&&D("WebGLRenderer: Image in DataTexture is too big ("+i.width+"x"+i.height+").");return e}function v(e){return e.generateMipmaps}function y(t){e.generateMipmap(t)}function x(r,n,i,a,s,o=!1){let l;if(null!==r){if(void 0!==e[r])return e[r];D("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+r+"'")}a&&((l=t.get("EXT_texture_norm16"))||D("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));let u=n;if(n===e.RED&&(i===e.FLOAT&&(u=e.R32F),i===e.HALF_FLOAT&&(u=e.R16F),i===e.UNSIGNED_BYTE&&(u=e.R8),i===e.UNSIGNED_SHORT&&l&&(u=l.R16_EXT),i===e.SHORT&&l&&(u=l.R16_SNORM_EXT)),n===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(u=e.R8UI),i===e.UNSIGNED_SHORT&&(u=e.R16UI),i===e.UNSIGNED_INT&&(u=e.R32UI),i===e.BYTE&&(u=e.R8I),i===e.SHORT&&(u=e.R16I),i===e.INT&&(u=e.R32I)),n===e.RG&&(i===e.FLOAT&&(u=e.RG32F),i===e.HALF_FLOAT&&(u=e.RG16F),i===e.UNSIGNED_BYTE&&(u=e.RG8),i===e.UNSIGNED_SHORT&&l&&(u=l.RG16_EXT),i===e.SHORT&&l&&(u=l.RG16_SNORM_EXT)),n===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(u=e.RG8UI),i===e.UNSIGNED_SHORT&&(u=e.RG16UI),i===e.UNSIGNED_INT&&(u=e.RG32UI),i===e.BYTE&&(u=e.RG8I),i===e.SHORT&&(u=e.RG16I),i===e.INT&&(u=e.RG32I)),n===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(u=e.RGB8UI),i===e.UNSIGNED_SHORT&&(u=e.RGB16UI),i===e.UNSIGNED_INT&&(u=e.RGB32UI),i===e.BYTE&&(u=e.RGB8I),i===e.SHORT&&(u=e.RGB16I),i===e.INT&&(u=e.RGB32I)),n===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(u=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(u=e.RGBA16UI),i===e.UNSIGNED_INT&&(u=e.RGBA32UI),i===e.BYTE&&(u=e.RGBA8I),i===e.SHORT&&(u=e.RGBA16I),i===e.INT&&(u=e.RGBA32I)),n===e.RGB&&(i===e.UNSIGNED_SHORT&&l&&(u=l.RGB16_EXT),i===e.SHORT&&l&&(u=l.RGB16_SNORM_EXT),i===e.UNSIGNED_INT_5_9_9_9_REV&&(u=e.RGB9_E5),i===e.UNSIGNED_INT_10F_11F_11F_REV&&(u=e.R11F_G11F_B10F)),n===e.RGBA){let t=o?w:es.getTransfer(s);
358i===e.FLOAT&&(u=e.RGBA32F),i===e.HALF_FLOAT&&(u=e.RGBA16F),i===e.UNSIGNED_BYTE&&(u=t===M?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT&&l&&(u=l.RGBA16_EXT),i===e.SHORT&&l&&(u=l.RGBA16_SNORM_EXT),i===e.UNSIGNED_SHORT_4_4_4_4&&(u=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(u=e.RGB5_A1)}return(u===e.R16F||u===e.R32F||u===e.RG16F||u===e.RG32F||u===e.RGBA16F||u===e.RGBA32F)&&t.get("EXT_color_buffer_float"),u}function b(t,r){let n;return t?null===r||1014===r||1020===r?n=e.DEPTH24_STENCIL8:1015===r?n=e.DEPTH32F_STENCIL8:1012===r&&(n=e.DEPTH24_STENCIL8,D("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===r||1014===r||1020===r?n=e.DEPTH_COMPONENT24:1015===r?n=e.DEPTH_COMPONENT32F:1012===r&&(n=e.DEPTH_COMPONENT16),n}function _(e,t){return!0===v(e)||e.isFramebufferTexture&&1003!==e.minFilter&&1006!==e.minFilter?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function T(e){let t=e.target;t.removeEventListener("dispose",T),function(e){let t=n.get(e);if(void 0===t.__webglInit)return;let r=e.source,i=f.get(r);if(i){let n=i[t.__cacheKey];n.usedTimes--,0===n.usedTimes&&A(e),0===Object.keys(i).length&&f.delete(r)}n.remove(e)}(t),t.isVideoTexture&&d.delete(t),t.isHTMLTexture&&h.delete(t)}function E(t){let r=t.target;r.removeEventListener("dispose",E),function(t){let r=n.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),n.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(r.__webglFramebuffer[t]))for(let n=0;n<r.__webglFramebuffer[t].length;n++)e.deleteFramebuffer(r.__webglFramebuffer[t][n]);else e.deleteFramebuffer(r.__webglFramebuffer[t]);r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[t])}else{if(Array.isArray(r.__webglFramebuffer))for(let t=0;t<r.__webglFramebuffer.length;t++)e.deleteFramebuffer(r.__webglFramebuffer[t]);else e.deleteFramebuffer(r.__webglFramebuffer);if(r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer)for(let t=0;t<r.__webglColorRenderbuffer.length;t++)r.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(r.__webglColorRenderbuffer[t]);r.__webglDepthRenderbuffer&&e.deleteRenderbuffer(r.__webglDepthRenderbuffer)}let i=t.textures;for(let t=0,r=i.length;t<r;t++){let r=n.get(i[t]);r.__webglTexture&&(e.deleteTexture(r.__webglTexture),s.memory.textures--),n.remove(i[t])}n.remove(t)}(r)}function A(t){let r=n.get(t);e.deleteTexture(r.__webglTexture);let i=t.source,a=f.get(i);delete a[r.__cacheKey],s.memory.textures--}let C=0;function I(t,i){var a;let o,l=n.get(t);if(t.isVideoTexture&&(a=t,o=s.render.frame,d.get(a)!==o&&(d.set(a,o),a.update())),!1===t.isRenderTargetTexture&&!0!==t.isExternalTexture&&t.version>0&&l.__version!==t.version){let e=t.image;if(null===e)D("WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void z(l,t,i);D("WebGLRenderer: Texture marked for update but image is incomplete")}}else t.isExternalTexture&&(l.__webglTexture=t.sourceTexture?t.sourceTexture:null);r.bindTexture(e.TEXTURE_2D,l.__webglTexture,e.TEXTURE0+i)}let O={1e3:e.REPEAT,1001:e.CLAMP_TO_EDGE,1002:e.MIRRORED_REPEAT},R={1003:e.NEAREST,1004:e.NEAREST_MIPMAP_NEAREST,1005:e.NEAREST_MIPMAP_LINEAR,1006:e.LINEAR,1007:e.LINEAR_MIPMAP_NEAREST,1008:e.LINEAR_MIPMAP_LINEAR},L={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 N(r,a){if((1015===a.type&&!1===t.has("OES_texture_float_linear")&&(1006===a.magFilter||1007===a.magFilter||1005===a.magFilter||1008===a.magFilter||1006===a.minFilter||1007===a.minFilter||1005===a.minFilter||1008===a.minFilter)&&D("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(r,e.TEXTURE_WRAP_S,O[a.wrapS]),e.texParameteri(r,e.TEXTURE_WRAP_T,O[a.wrapT]),(r===e.TEXTURE_3D||r===e.TEXTURE_2D_ARRAY)&&e.texParameteri(r,e.TEXTURE_WRAP_R,O[a.wrapR]),e.texParameteri(r,e.TEXTURE_MAG_FILTER,R[a.magFilter]),e.texParameteri(r,e.TEXTURE_MIN_FILTER,R[a.minFilter]),a.compareFunction&&(e.texParameteri(r,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(r,e.TEXTURE_COMPARE_FUNC,L[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic"))&&1003!==a.magFilter&&(1005===a.minFilter||1008===a.minFilter)&&(1015!==a.type||!1!==t.has("OES_texture_float_linear"))&&(a.anisotropy>1||n.get(a).__currentAnisotropy)){let s=t.get("EXT_texture_filter_anisotropic");e.texParameterf(r,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy}}function U(t,r){let n,i=!1;void 0===t.__webglInit&&(t.__webglInit=!0,r.addEventListener("dispose",T));let a=r.source,o=f.get(a);void 0===o&&(o={},f.set(a,o));let l=((n=[]).push(r.wrapS),n.push(r.wrapT),n.push(r.wrapR||0),n.push(r.magFilter),n.push(r.minFilter),n.push(r.anisotropy),n.push(r.internalFormat),n.push(r.format),n.push(r.type),n.push(r.generateMipmaps),n.push(r.premultiplyAlpha),n.push(r.flipY),n.push(r.unpackAlignment),n.push(r.colorSpace),n.join());if(l!==t.__cacheKey){void 0===o[l]&&(o[l]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,i=!0),o[l].usedTimes++;let n=o[t.__cacheKey];void 0!==n&&(o[t.__cacheKey].usedTimes--,0===n.usedTimes&&A(r)),t.__cacheKey=l,t.__webglTexture=o[l].texture}return i}function F(e,t,r){return Math.floor(Math.floor(e/r)/t)}function z(t,s,o){let l=e.TEXTURE_2D;(s.isDataArrayTexture||s.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),s.isData3DTexture&&(l=e.TEXTURE_3D);let u=U(t,s),c=s.source;r.bindTexture(l,t.__webglTexture,e.TEXTURE0+o);let d=n.get(c);if(c.version!==d.__version||!0===u){let t;if(r.activeTexture(e.TEXTURE0+o),!1==("u">typeof ImageBitmap&&s.image instanceof ImageBitmap)){let t=es.getPrimaries(es.workingColorSpace),n=""===s.colorSpace?null:es.getPrimaries(s.colorSpace),i=""===s.colorSpace||t===n?e.NONE:e.BROWSER_DEFAULT_WEBGL;r.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),r.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),r.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,i)}r.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment);let n=g(s.image,!1,i.maxTextureSize);n=Y(s,n);let f=a.convert(s.format,s.colorSpace),p=a.convert(s.type),m=x(s.internalFormat,f,p,s.normalized,s.colorSpace,s.isVideoTexture);
358N(l,s);let S=s.mipmaps,w=!0!==s.isVideoTexture,M=void 0===d.__version||!0===u,T=c.dataReady,E=_(s,n);if(s.isDepthTexture)m=b(1027===s.format,s.type),M&&(w?r.texStorage2D(e.TEXTURE_2D,1,m,n.width,n.height):r.texImage2D(e.TEXTURE_2D,0,m,n.width,n.height,0,f,p,null));else if(s.isDataTexture)if(S.length>0){w&&M&&r.texStorage2D(e.TEXTURE_2D,E,m,S[0].width,S[0].height);for(let n=0,i=S.length;n<i;n++)t=S[n],w?T&&r.texSubImage2D(e.TEXTURE_2D,n,0,0,t.width,t.height,f,p,t.data):r.texImage2D(e.TEXTURE_2D,n,m,t.width,t.height,0,f,p,t.data);s.generateMipmaps=!1}else w?(M&&r.texStorage2D(e.TEXTURE_2D,E,m,n.width,n.height),T&&function(t,n,i,a){let s=t.updateRanges;if(0===s.length)r.texSubImage2D(e.TEXTURE_2D,0,0,0,n.width,n.height,i,a,n.data);else{s.sort((e,t)=>e.start-t.start);let o=0;for(let e=1;e<s.length;e++){let t=s[o],r=s[e],i=t.start+t.count,a=F(r.start,n.width,4),l=F(t.start,n.width,4);r.start<=i+1&&a===l&&F(r.start+r.count-1,n.width,4)===a?t.count=Math.max(t.count,r.start+r.count-t.start):s[++o]=r}s.length=o+1;let l=r.getParameter(e.UNPACK_ROW_LENGTH),u=r.getParameter(e.UNPACK_SKIP_PIXELS),c=r.getParameter(e.UNPACK_SKIP_ROWS);r.pixelStorei(e.UNPACK_ROW_LENGTH,n.width);for(let t=0,o=s.length;t<o;t++){let o=s[t],l=Math.floor(o.start/4),u=Math.ceil(o.count/4),c=l%n.width,d=Math.floor(l/n.width);r.pixelStorei(e.UNPACK_SKIP_PIXELS,c),r.pixelStorei(e.UNPACK_SKIP_ROWS,d),r.texSubImage2D(e.TEXTURE_2D,0,c,d,u,1,i,a,n.data)}t.clearUpdateRanges(),r.pixelStorei(e.UNPACK_ROW_LENGTH,l),r.pixelStorei(e.UNPACK_SKIP_PIXELS,u),r.pixelStorei(e.UNPACK_SKIP_ROWS,c)}}(s,n,f,p)):r.texImage2D(e.TEXTURE_2D,0,m,n.width,n.height,0,f,p,n.data);else if(s.isCompressedTexture)if(s.isCompressedArrayTexture){w&&M&&r.texStorage3D(e.TEXTURE_2D_ARRAY,E,m,S[0].width,S[0].height,n.depth);for(let i=0,a=S.length;i<a;i++)if(t=S[i],1023!==s.format)if(null!==f)if(w){if(T)if(s.layerUpdates.size>0){let n=os(t.width,t.height,s.format,s.type);for(let a of s.layerUpdates){let s=t.data.subarray(a*n/t.data.BYTES_PER_ELEMENT,(a+1)*n/t.data.BYTES_PER_ELEMENT);r.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,a,t.width,t.height,1,f,s)}s.clearLayerUpdates()}else r.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,t.width,t.height,n.depth,f,t.data)}else r.compressedTexImage3D(e.TEXTURE_2D_ARRAY,i,m,t.width,t.height,n.depth,0,t.data,0,0);else D("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else w?T&&r.texSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,t.width,t.height,n.depth,f,p,t.data):r.texImage3D(e.TEXTURE_2D_ARRAY,i,m,t.width,t.height,n.depth,0,f,p,t.data)}else{w&&M&&r.texStorage2D(e.TEXTURE_2D,E,m,S[0].width,S[0].height);for(let n=0,i=S.length;n<i;n++)t=S[n],1023!==s.format?null!==f?w?T&&r.compressedTexSubImage2D(e.TEXTURE_2D,n,0,0,t.width,t.height,f,t.data):r.compressedTexImage2D(e.TEXTURE_2D,n,m,t.width,t.height,0,t.data):D("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):w?T&&r.texSubImage2D(e.TEXTURE_2D,n,0,0,t.width,t.height,f,p,t.data):r.texImage2D(e.TEXTURE_2D,n,m,t.width,t.height,0,f,p,t.data)}else if(s.isDataArrayTexture)if(w){if(M&&r.texStorage3D(e.TEXTURE_2D_ARRAY,E,m,n.width,n.height,n.depth),T)if(s.layerUpdates.size>0){let t=os(n.width,n.height,s.format,s.type);for(let i of s.layerUpdates){let a=n.data.subarray(i*t/n.data.BYTES_PER_ELEMENT,(i+1)
358*t/n.data.BYTES_PER_ELEMENT);r.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,i,n.width,n.height,1,f,p,a)}s.clearLayerUpdates()}else r.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,n.width,n.height,n.depth,f,p,n.data)}else r.texImage3D(e.TEXTURE_2D_ARRAY,0,m,n.width,n.height,n.depth,0,f,p,n.data);else if(s.isData3DTexture)w?(M&&r.texStorage3D(e.TEXTURE_3D,E,m,n.width,n.height,n.depth),T&&r.texSubImage3D(e.TEXTURE_3D,0,0,0,0,n.width,n.height,n.depth,f,p,n.data)):r.texImage3D(e.TEXTURE_3D,0,m,n.width,n.height,n.depth,0,f,p,n.data);else if(s.isFramebufferTexture){if(M)if(w)r.texStorage2D(e.TEXTURE_2D,E,m,n.width,n.height);else{let t=n.width,i=n.height;for(let n=0;n<E;n++)r.texImage2D(e.TEXTURE_2D,n,m,t,i,0,f,p,null),t>>=1,i>>=1}}else if(s.isHTMLTexture){if("texElementImage2D"in e){let t=e.canvas;if(t.hasAttribute("layoutsubtree")||t.setAttribute("layoutsubtree","true"),n.parentNode!==t){t.appendChild(n),h.add(s),t.onpaint=e=>{let t=e.changedElements;for(let e of h)t.includes(e.image)&&(e.needsUpdate=!0)},t.requestPaint();return}if(3===e.texElementImage2D.length)e.texElementImage2D(e.TEXTURE_2D,e.RGBA8,n);else{let t=e.RGBA,r=e.RGBA,i=e.UNSIGNED_BYTE;e.texElementImage2D(e.TEXTURE_2D,0,t,r,i,n)}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(S.length>0){if(w&&M){let t=$(S[0]);r.texStorage2D(e.TEXTURE_2D,E,m,t.width,t.height)}for(let n=0,i=S.length;n<i;n++)t=S[n],w?T&&r.texSubImage2D(e.TEXTURE_2D,n,0,0,f,p,t):r.texImage2D(e.TEXTURE_2D,n,m,f,p,t);s.generateMipmaps=!1}else if(w){if(M){let t=$(n);r.texStorage2D(e.TEXTURE_2D,E,m,t.width,t.height)}T&&r.texSubImage2D(e.TEXTURE_2D,0,0,0,f,p,n)}else r.texImage2D(e.TEXTURE_2D,0,m,f,p,n);v(s)&&y(l),d.__version=c.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}function j(t,i,s,o,u,c){let d=a.convert(s.format,s.colorSpace),h=a.convert(s.type),f=x(s.internalFormat,d,h,s.normalized,s.colorSpace),p=n.get(i),m=n.get(s);if(m.__renderTarget=i,!p.__hasExternalTextures){let t=Math.max(1,i.width>>c),n=Math.max(1,i.height>>c);u===e.TEXTURE_3D||u===e.TEXTURE_2D_ARRAY?r.texImage3D(u,c,f,t,n,i.depth,0,d,h,null):r.texImage2D(u,c,f,t,n,0,d,h,null)}r.bindFramebuffer(e.FRAMEBUFFER,t),q(i)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,u,m.__webglTexture,0,X(i)):(u===e.TEXTURE_2D||u>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&u<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,u,m.__webglTexture,c),r.bindFramebuffer(e.FRAMEBUFFER,null)}function B(t,r,n){if(e.bindRenderbuffer(e.RENDERBUFFER,t),r.depthBuffer){let i=r.depthTexture,a=i&&i.isDepthTexture?i.type:null,s=b(r.stencilBuffer,a),o=r.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;q(r)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,X(r),s,r.width,r.height):n?e.renderbufferStorageMultisample(e.RENDERBUFFER,X(r),s,r.width,r.height):e.renderbufferStorage(e.RENDERBUFFER,s,r.width,r.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,o,e.RENDERBUFFER,t)}else{let t=r.textures;for(let i=0;i<t.length;i++){let s=t[i],o=a.convert(s.format,s.colorSpace),u=a.convert(s.type),c=x(s.internalFormat,o,u,s.normalized,s.colorSpace);q(r)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,X(r),c,r.width,r.height):n?e.renderbufferStorageMultisample(e.RENDERBUFFER,X(r),c,r.width,r.height):e.renderbufferStorage(e.RENDERBUFFER,c,r.width,r.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function V(t,i,s){let o=!0===i.isWebGLCubeRenderTarget;if(r.bindFramebuffer(e.FRAMEBUFFER,t),!(i.depthTexture&&i.depthTexture.isDepthTexture))throw Error("THREE.WebGLTextures: renderTarget.depthTexture must be an instance of THREE.DepthTexture.");let u=n.get(i.depthTexture);if(u.__renderTarget=i,u.__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),o){if(void 0===u.__webglInit&&(u.__webglInit=!0,i.depthTexture.addEventListener("dispose",T)),void 0===u.__webglTexture){let t;u.__webglTexture=e.createTexture(),r.bindTexture(e.TEXTURE_CUBE_MAP,u.__webglTexture),N(e.TEXTURE_CUBE_MAP,i.depthTexture);let n=a.convert(i.depthTexture.format),s=a.convert(i.depthTexture.type);1026===i.depthTexture.format?t=e.DEPTH_COMPONENT24:1027===i.depthTexture.format&&(t=e.DEPTH24_STENCIL8);for(let r=0;r<6;r++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,t,i.width,i.height,0,n,s,null)}}else I(i.depthTexture,0);let c=u.__webglTexture,d=X(i),h=o?e.TEXTURE_CUBE_MAP_POSITIVE_X+s:e.TEXTURE_2D,f=1027===i.depthTexture.format?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;if(1026===i.depthTexture.format)q(i)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,f,h,
358c,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,f,h,c,0);else if(1027===i.depthTexture.format)q(i)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,f,h,c,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,f,h,c,0);else throw Error("THREE.WebGLTextures: Unknown depthTexture format.")}function G(t){let i=n.get(t),a=!0===t.isWebGLCubeRenderTarget;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++)V(i.__webglFramebuffer[e],t,e);else{let e=t.texture.mipmaps;e&&e.length>0?V(i.__webglFramebuffer[0],t,0):V(i.__webglFramebuffer,t,0)}else if(a){i.__webglDepthbuffer=[];for(let n=0;n<6;n++)if(r.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[n]),void 0===i.__webglDepthbuffer[n])i.__webglDepthbuffer[n]=e.createRenderbuffer(),B(i.__webglDepthbuffer[n],t,!1);else{let r=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[n];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,r,e.RENDERBUFFER,a)}}else{let n=t.texture.mipmaps;if(n&&n.length>0?r.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):r.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),void 0===i.__webglDepthbuffer)i.__webglDepthbuffer=e.createRenderbuffer(),B(i.__webglDepthbuffer,t,!1);else{let r=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,n=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,n),e.framebufferRenderbuffer(e.FRAMEBUFFER,r,e.RENDERBUFFER,n)}}r.bindFramebuffer(e.FRAMEBUFFER,null)}let H=[],W=[];function X(e){return Math.min(i.maxSamples,e.samples)}function q(e){let r=n.get(e);return e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==r.__useRenderToTexture}function Y(e,t){let r=e.colorSpace,n=e.format,i=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||r!==S&&""!==r&&(es.getTransfer(r)===M?(1023!==n||1009!==i)&&D("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):k("WebGLTextures: Unsupported texture color space:",r)),t}function $(e){return"u">typeof HTMLImageElement&&e instanceof HTMLImageElement?(c.width=e.naturalWidth||e.width,c.height=e.naturalHeight||e.height):"u">typeof VideoFrame&&e instanceof VideoFrame?(c.width=e.displayWidth,c.height=e.displayHeight):(c.width=e.width,c.height=e.height),c}this.allocateTextureUnit=function(){let e=C;return e>=i.maxTextures&&D("WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+i.maxTextures),C+=1,e},this.resetTextureUnits=function(){C=0},this.getTextureUnits=function(){return C},this.setTextureUnits=function(e){C=e},this.setTexture2D=I,this.setTexture2DArray=function(t,i){let a=n.get(t);!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version?z(a,t,i):(t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null),r.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i))},this.setTexture3D=function(t,i){let a=n.get(t);!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version?z(a,t,i):r.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,s){let o=n.get(t);!0!==t.isCubeDepthTexture&&t.version>0&&o.__version!==t.version?function(t,s,o){if(6!==s.image.length)return;let l=U(t,s),u=s.source;r.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);let c=n.get(u);if(u.version!==c.__version||!0===l){let t;r.activeTexture(e.TEXTURE0+o);let n=es.getPrimaries(es.workingColorSpace),d=""===s.colorSpace?null:es.getPrimaries(s.colorSpace),h=""===s.colorSpace||n===d?e.NONE:e.BROWSER_DEFAULT_WEBGL;r.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),r.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),r.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),r.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,h);let f=s.isCompressedTexture||s.image[0].isCompressedTexture,p=s.image[0]&&s.image[0].isDataTexture,m=[];for(let e=0;e<6;e++)f||p?m[e]=p?s.image[e].image:s.image[e]:m[e]=g(s.image[e],!0,i.maxCubemapSize),m[e]=Y(s,m[e]);let b=m[0],S=a.convert(s.format,s.colorSpace),w=a.convert(s.type),M=x(s.internalFormat,S,w,s.normalized,s.colorSpace),T=!0!==s.isVideoTexture,E=void 0===c.__version||!0===l,A=u.dataReady,C=_(s,b);if(N(e.TEXTURE_CUBE_MAP,s),f){T&&E&&r.texStorage2D(e.TEXTURE_CUBE_MAP,C,M,b.width,b.height);for(let n=0;n<6;n++){t=m[n].mipmaps;for(let i=0;i<t.length;i++){let a=t[i];1023!==s.format?null!==S?T?A&&r.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i,0,0,a.width,a.height,S,a.data):r.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i,M,a.width,a.height,0,a.data):D("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):T?A&&r.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i,0,0,a.width,a.height,S,w,a.data):r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i,M,a.width,a.height,0,S,w,a.data)}}}else{if(t=s.mipmaps,T&&E){t.length>0&&C++;let n=$(m[0]);r.texStorage2D(e.TEXTURE_CUBE_MAP,C,M,n.width,n.height)}for(let n=0;n<6;n++)if(p){T?A&&r.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,0,0,m[n].width,m[n].height,S,w,m[n].data):r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,M,m[n].width,m[n].height,0,S,w,m[n].data);for(let i=0;i<t.length;i++){let a=t[i].image[n].image;T?A&&r.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i+1,0,0,a.width,a.height,S,w,a.data):r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i+1,M,a.width,a.height,0,S,w,a.data)}}else{T?A&&r.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,0,0,S,w,m[n]):r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,M,S,w,m[n]);for(let i=0;i<t.length;i++){let a=t[i];T?A&&r.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i+1,0,0,S,w,a.image[n]):r.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i+1,M,S,w,a.image[n])}}}
vendor: 4,530 bytes, line 358
358v(s)&&y(e.TEXTURE_CUBE_MAP),c.__version=u.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}(o,t,s):r.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture,e.TEXTURE0+s)},this.rebindTextures=function(t,r,i){let a=n.get(t);void 0!==r&&j(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),void 0!==i&&G(t)},this.setupRenderTarget=function(t){let i=t.texture,o=n.get(t),l=n.get(i);t.addEventListener("dispose",E);let u=t.textures,c=!0===t.isWebGLCubeRenderTarget,d=u.length>1;if(!d&&(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=i.version,s.memory.textures++),c){o.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){o.__webglFramebuffer[t]=[];for(let r=0;r<i.mipmaps.length;r++)o.__webglFramebuffer[t][r]=e.createFramebuffer()}else o.__webglFramebuffer[t]=e.createFramebuffer()}else{if(i.mipmaps&&i.mipmaps.length>0){o.__webglFramebuffer=[];for(let t=0;t<i.mipmaps.length;t++)o.__webglFramebuffer[t]=e.createFramebuffer()}else o.__webglFramebuffer=e.createFramebuffer();if(d)for(let t=0,r=u.length;t<r;t++){let r=n.get(u[t]);void 0===r.__webglTexture&&(r.__webglTexture=e.createTexture(),s.memory.textures++)}if(t.samples>0&&!1===q(t)){o.__webglMultisampledFramebuffer=e.createFramebuffer(),o.__webglColorRenderbuffer=[],r.bindFramebuffer(e.FRAMEBUFFER,o.__webglMultisampledFramebuffer);for(let r=0;r<u.length;r++){let n=u[r];o.__webglColorRenderbuffer[r]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,o.__webglColorRenderbuffer[r]);let i=a.convert(n.format,n.colorSpace),s=a.convert(n.type),l=x(n.internalFormat,i,s,n.normalized,n.colorSpace,!0===t.isXRRenderTarget),c=X(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,c,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+r,e.RENDERBUFFER,o.__webglColorRenderbuffer[r])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(o.__webglDepthRenderbuffer=e.createRenderbuffer(),B(o.__webglDepthRenderbuffer,t,!0)),r.bindFramebuffer(e.FRAMEBUFFER,null)}}if(c){r.bindTexture(e.TEXTURE_CUBE_MAP,l.__webglTexture),N(e.TEXTURE_CUBE_MAP,i);for(let r=0;r<6;r++)if(i.mipmaps&&i.mipmaps.length>0)for(let n=0;n<i.mipmaps.length;n++)j(o.__webglFramebuffer[r][n],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+r,n);else j(o.__webglFramebuffer[r],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0);v(i)&&y(e.TEXTURE_CUBE_MAP),r.unbindTexture()}else if(d){for(let i=0,a=u.length;i<a;i++){let a=u[i],s=n.get(a),l=e.TEXTURE_2D;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(l=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),r.bindTexture(l,s.__webglTexture),N(l,a),j(o.__webglFramebuffer,t,a,e.COLOR_ATTACHMENT0+i,l,0),v(a)&&y(l)}r.unbindTexture()}else{let n=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(n=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),r.bindTexture(n,l.__webglTexture),N(n,i),i.mipmaps&&i.mipmaps.length>0)for(let r=0;r<i.mipmaps.length;r++)j(o.__webglFramebuffer[r],t,i,e.COLOR_ATTACHMENT0,n,r);else j(o.__webglFramebuffer,t,i,e.COLOR_ATTACHMENT0,n,0);v(i)&&y(n),r.unbindTexture()}t.depthBuffer&&G(t)},this.updateRenderTargetMipmap=function(t){let i=t.textures;for(let a=0,s=i.length;a<s;a++){let s=i[a];if(v(s)){let i=t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D,a=n.get(s).__webglTexture;r.bindTexture(i,a),y(i),r.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(t.samples>0){if(!1===q(t)){let i=t.textures,a=t.width,s=t.height,o=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,c=n.get(t),d=i.length>1;if(d)for(let t=0;t<i.length;t++)r.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),r.bindFramebuffer(e.FRAMEBUFFER,c.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);r.bindFramebuffer(e.READ_FRAMEBUFFER,c.__webglMultisampledFramebuffer);let h=t.texture.mipmaps;h&&h.length>0?r.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer[0]):r.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer);for(let r=0;r<i.length;r++){if(t.resolveDepthBuffer&&(t.depthBuffer&&(o|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&t.resolveStencilBuffer&&(o|=e.STENCIL_BUFFER_BIT)),d){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,c.__webglColorRen
358derbuffer[r]);let t=n.get(i[r]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,a,s,0,0,a,s,o,e.NEAREST),!0===u&&(H.length=0,W.length=0,H.push(e.COLOR_ATTACHMENT0+r),t.depthBuffer&&!1===t.resolveDepthBuffer&&(H.push(l),W.push(l),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,W)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,H))}if(r.bindFramebuffer(e.READ_FRAMEBUFFER,null),r.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<i.length;t++){r.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,c.__webglColorRenderbuffer[t]);let a=n.get(i[t]).__webglTexture;r.bindFramebuffer(e.FRAMEBUFFER,c.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}r.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglMultisampledFramebuffer)}else if(t.depthBuffer&&!1===t.resolveDepthBuffer&&u){let r=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[r])}}},this.setupDepthRenderbuffer=G,this.setupFrameBufferTexture=j,this.useMultisampledRTT=q,this.isReversedDepthBuffer=function(){return r.buffers.depth.getReversed()}}function u_(e,t){return{convert:function(r,n=""){let i,a=es.getTransfer(n);if(1009===r)return e.UNSIGNED_BYTE;if(1017===r)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===r)return e.UNSIGNED_SHORT_5_5_5_1;if(35902===r)return e.UNSIGNED_INT_5_9_9_9_REV;if(35899===r)return e.UNSIGNED_INT_10F_11F_11F_REV;if(1010===r)return e.BYTE;if(1011===r)return e.SHORT;if(1012===r)return e.UNSIGNED_SHORT;if(1013===r)return e.INT;if(1014===r)return e.UNSIGNED_INT;if(1015===r)return e.FLOAT;if(1016===r)return e.HALF_FLOAT;if(1021===r)return e.ALPHA;if(1022===r)return e.RGB;if(1023===r)return e.RGBA;if(1026===r)return e.DEPTH_COMPONENT;if(1027===r)return e.DEPTH_STENCIL;if(1028===r)return e.RED;if(1029===r)return e.RED_INTEGER;if(1030===r)return e.RG;if(1031===r)return e.RG_INTEGER;if(1033===r)return e.RGBA_INTEGER;if(33776===r||33777===r||33778===r||33779===r)if(a===M){if(null===(i=t.get("WEBGL_compressed_texture_s3tc_srgb")))return null;if(33776===r)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===r)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===r)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(33779===r)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(i=t.get("WEBGL_compressed_texture_s3tc")))return null;if(33776===r)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===r)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===r)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===r)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===r||35841===r||35842===r||35843===r){if(null===(i=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(35840===r)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===r)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===r)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===r)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===r||37492===r||37496===r||37488===r||37489===r||37490===r||37491===r){if(null===(i=t.get("WEBGL_compressed_texture_etc")))return null;if(36196===r||37492===r)return a===M?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(37496===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC;if(37488===r)return i.COMPRESSED_R11_EAC;if(37489===r)return i.COMPRESSED_SIGNED_R11_EAC;if(37490===r)return i.COMPRESSED_RG11_EAC;if(37491===r)return i.COMPRESSED_SIGNED_RG11_EAC}if(37808===r||37809===r||37810===r||37811===r||37812===r||37813===r||37814===r||37815===r||37816===r||37817===r||37818===r||37819===r||37820===r||37821===r){if(null===(i=t.get("WEBGL_compressed_texture_astc")))return null;if(37808===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===r)return a===M?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===r||36494===r||36495===r){if(null===(i=t.get("EXT_texture_compression_bptc")))return null;if(36492===r)return a===M?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(36494===r)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(36495===r)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===r||36284===r||36285===r||36286===r){if(null===(i=t.get("EXT_texture_compression_rgtc")))return null;
358if(36283===r)return i.COMPRESSED_RED_RGTC1_EXT;if(36284===r)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===r)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===r)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return 1020===r?e.UNSIGNED_INT_24_8:void 0!==e[r]?e[r]:null}}}let uS=` 359void main() { 360 361 gl_Position = vec4( position, 1.0 ); 362 363}`,uw=` 364uniform sampler2DArray depthColor; 365uniform float depthWidth; 366uniform float depthHeight; 367 368void main() { 369 370 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 371 372 if ( coord.x >= 1.0 ) { 373 374 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 375 376 } else { 377 378 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 379 380 } 381 382}`;class uM{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(null===this.texture){let r=new nV(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=r}}getMesh(e){if(null!==this.texture&&null===this.mesh){let t=e.cameras[0].viewport,r=new ae({vertexShader:uS,fragmentShader:uw,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new rA(new iq(20,20),r)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class uT extends j{constructor(e,t){super();const r=this;let n=null,i=1,a=null,s="local-floor",o=1,l=null,u=null,c=null,d=null,h=null,f=null;const p="u">typeof XRWebGLBinding,m=new uM,g={},v=t.getContextAttributes();let y=null,x=null;const b=[],_=[],S=new Z;let w=null;const M=new aQ;M.viewport=new eg;const T=new aQ;T.viewport=new eg;const E=[M,T],A=new sg;let C=null,P=null;function I(e){let t=_.indexOf(e.inputSource);if(-1===t)return;let r=b[t];void 0!==r&&(r.update(e.inputSource,e.frame,l||a),r.dispatchEvent({type:e.type,data:e.inputSource}))}function O(){n.removeEventListener("select",I),n.removeEventListener("selectstart",I),n.removeEventListener("selectend",I),n.removeEventListener("squeeze",I),n.removeEventListener("squeezestart",I),n.removeEventListener("squeezeend",I),n.removeEventListener("end",O),n.removeEventListener("inputsourceschange",R);for(let e=0;e<b.length;e++){let t=_[e];null!==t&&(_[e]=null,b[e].disconnect(t))}for(let e in C=null,P=null,m.reset(),g)delete g[e];e.setRenderTarget(y),h=null,d=null,c=null,n=null,x=null,F.stop(),r.isPresenting=!1,e.setPixelRatio(w),e.setSize(S.width,S.height,!1),r.dispatchEvent({type:"sessionend"})}function R(e){for(let t=0;t<e.removed.length;t++){let r=e.removed[t],n=_.indexOf(r);n>=0&&(_[n]=null,b[n].disconnect(r))}for(let t=0;t<e.added.length;t++){let r=e.added[t],n=_.indexOf(r);if(-1===n){for(let e=0;e<b.length;e++)if(e>=_.length){_.push(r),n=e;break}else if(null===_[e]){_[e]=r,n=e;break}if(-1===n)break}let i=b[n];i&&i.connect(r)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=b[e];return void 0===t&&(t=new eZ,b[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=b[e];return void 0===t&&(t=new eZ,b[e]=t),t.getGripSpace()},this.getHand=function(e){let t=b[e];return void 0===t&&(t=new eZ,b[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===r.isPresenting&&D("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===r.isPresenting&&D("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==d?d:h},this.getBinding=function(){return null===c&&p&&(c=new XRWebGLBinding(n,t)),c},this.getFrame=function(){return f},this.getSession=function(){return n},this.setSession=async function(u){if(null!==(n=u)){if(y=e.getRenderTarget(),n.addEventListener("select",I),n.addEventListener("selectstart",I),n.addEventListener("selectend",I),n.addEventListener("squeeze",I),n.addEventListener("squeezestart",I),n.addEventListener("squeezeend",I),n.addEventListener("end",O),n.addEventListener("inputsourceschange",R),!0!==v.xrC
382ompatible&&await t.makeXRCompatible(),w=e.getPixelRatio(),e.getSize(S),p&&"createProjectionLayer"in XRWebGLBinding.prototype){let r=null,a=null,s=null;v.depth&&(s=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,r=v.stencil?1027:1026,a=v.stencil?1020:1014);let o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:i};d=(c=this.getBinding()).createProjectionLayer(o),n.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),x=new ey(d.textureWidth,d.textureHeight,{format:1023,type:1009,depthTexture:new nj(d.textureWidth,d.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,r),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:4*!!v.antialias,resolveDepthBuffer:!1===d.ignoreDepthValues,resolveStencilBuffer:!1===d.ignoreDepthValues})}else{let r={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:i};h=new XRWebGLLayer(n,t,r),n.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),x=new ey(h.framebufferWidth,h.framebufferHeight,{format:1023,type:1009,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:!1===h.ignoreDepthValues,resolveStencilBuffer:!1===h.ignoreDepthValues})}x.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await n.requestReferenceSpace(s),F.setContext(n),F.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};const L=new Q,N=new Q;function k(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){var t,r,i;if(null===n)return;let a=e.near,s=e.far;null!==m.texture&&(m.depthNear>0&&(a=m.depthNear),m.depthFar>0&&(s=m.depthFar)),A.near=T.near=M.near=a,A.far=T.far=M.far=s,(C!==A.near||P!==A.far)&&(n.updateRenderState({depthNear:A.near,depthFar:A.far}),C=A.near,P=A.far),A.layers.mask=6|e.layers.mask,M.layers.mask=-5&A.layers.mask,T.layers.mask=-3&A.layers.mask;let o=e.parent,l=A.cameras;k(A,o);for(let e=0;e<l.length;e++)k(l[e],o);2===l.length?function(e,t,r){L.setFromMatrixPosition(t.matrixWorld),N.setFromMatrixPosition(r.matrixWorld);let n=L.distanceTo(N),i=t.projectionMatrix.elements,a=r.projectionMatrix.elements,s=i[14]/(i[10]-1),o=i[14]/(i[10]+1),l=(i[9]+1)/i[5],u=(i[9]-1)/i[5],c=(i[8]-1)/i[0],d=(a[8]+1)/a[0],h=n/(-c+d),f=-(h*c);if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(f),e.translateZ(h),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),-1===i[10])e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=s+h,r=o+h;e.projectionMatrix.makePerspective(s*c-f,s*d+(n-f),l*o/r*t,u*o/r*t,t,r),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}(A,M,T):A.projectionMatrix.copy(M.projectionMatrix),t=e,r=A,null===(i=o)?t.matrix.copy(r.matrixWorld):(t.matrix.copy(i.matrixWorld),t.matrix.invert(),t.matrix.multiply(r.matrixWorld)),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.projectionMatrix.copy(r.projectionMatrix),t.projectionMatrixInverse.copy(r.projectionMatrixInverse),t.isPerspectiveCamera&&(t.fov=2*H*Math.atan(1/t.projectionMatrix.elements[5]),t.zoom=1)},this.getCamera=function(){return A},this.getFoveation=function(){if(null!==d||null!==h)return o},this.setFoveation=function(e){o=e,null!==d&&(d.fixedFoveation=e),null!==h&&void 0!==h.fixedFoveation&&(h.fixedFoveation=e)},this.hasDepthSensing=function(){return null!==m.texture},this.getDepthSensingMesh=function(){return m.getMesh(A)},this.getCameraTexture=function(e){return g[e]};let U=null;const F=new ou;F.setAnimationLoop(function(t,i){if(u=i.getViewerPose(l||a),f=i,null!==u){let t=u.views;null!==h&&(e.setRenderTargetFramebuffer(x,h.framebuffer),e.setRenderTarget(x));let i=!1;t.length!==A.cameras.length&&(A.cameras.length=0,i=!0);for(let r=0;r<t.length;r++){let n=t[r],a=null;if(null!==h)a=h.getViewport(n);else{let t=c.getViewSubImage(d,n);a=t.viewport,0===r&&(e.setRenderTargetTextures(x,t.colorTexture,t.depthStencilTexture),e.setRenderTarget(x))}let s=E[r];void 0===s&&((s=new aQ).layers.enable(r),s.viewport=new eg,E[r]=s),s.matrix.fromArray(n.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(n.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(a.x,a.y,a.width,a.height),0===r&&(A.matrix.copy(s.matrix
382),A.matrix.decompose(A.position,A.quaternion,A.scale)),!0===i&&A.cameras.push(s)}let a=n.enabledFeatures;if(a&&a.includes("depth-sensing")&&"gpu-optimized"==n.depthUsage&&p){let e=(c=r.getBinding()).getDepthInformation(t[0]);e&&e.isValid&&e.texture&&m.init(e,n.renderState)}if(a&&a.includes("camera-access")&&p){e.state.unbindTexture(),c=r.getBinding();for(let e=0;e<t.length;e++){let r=t[e].camera;if(r){let e=g[r];e||(e=new nV,g[r]=e);let t=c.getCameraImage(r);e.sourceTexture=t}}}}for(let e=0;e<b.length;e++){let t=_[e],r=b[e];null!==t&&void 0!==r&&r.update(t,i,l||a)}U&&U(t,i),i.detectedPlanes&&r.dispatchEvent({type:"planesdetected",data:i}),f=null}),this.setAnimationLoop=function(e){U=e},this.dispose=function(){}}}let uE=new e_,uA=new er;function uC(e,t){function r(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function n(e,n){e.opacity.value=n.opacity,n.color&&e.diffuse.value.copy(n.color),n.emissive&&e.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(e.map.value=n.map,r(n.map,e.mapTransform)),n.alphaMap&&(e.alphaMap.value=n.alphaMap,r(n.alphaMap,e.alphaMapTransform)),n.bumpMap&&(e.bumpMap.value=n.bumpMap,r(n.bumpMap,e.bumpMapTransform),e.bumpScale.value=n.bumpScale,1===n.side&&(e.bumpScale.value*=-1)),n.normalMap&&(e.normalMap.value=n.normalMap,r(n.normalMap,e.normalMapTransform),e.normalScale.value.copy(n.normalScale),1===n.side&&e.normalScale.value.negate()),n.displacementMap&&(e.displacementMap.value=n.displacementMap,r(n.displacementMap,e.displacementMapTransform),e.displacementScale.value=n.displacementScale,e.displacementBias.value=n.displacementBias),n.emissiveMap&&(e.emissiveMap.value=n.emissiveMap,r(n.emissiveMap,e.emissiveMapTransform)),n.specularMap&&(e.specularMap.value=n.specularMap,r(n.specularMap,e.specularMapTransform)),n.alphaTest>0&&(e.alphaTest.value=n.alphaTest);let i=t.get(n),a=i.envMap,s=i.envMapRotation;a&&(e.envMap.value=a,e.envMapRotation.value.setFromMatrix4(uE.makeRotationFromEuler(s)).transpose(),a.isCubeTexture&&!1===a.isRenderTargetTexture&&e.envMapRotation.value.premultiply(uA),e.reflectivity.value=n.reflectivity,e.ior.value=n.ior,e.refractionRatio.value=n.refractionRatio),n.lightMap&&(e.lightMap.value=n.lightMap,e.lightMapIntensity.value=n.lightMapIntensity,r(n.lightMap,e.lightMapTransform)),n.aoMap&&(e.aoMap.value=n.aoMap,e.aoMapIntensity.value=n.aoMapIntensity,r(n.aoMap,e.aoMapTransform))}return{refreshFogUniforms:function(t,r){r.color.getRGB(t.fogColor.value,i9(e)),r.isFog?(t.fogNear.value=r.near,t.fogFar.value=r.far):r.isFogExp2&&(t.fogDensity.value=r.density)},refreshMaterialUniforms:function(e,i,a,s,o){var l,u,c,d,h,f,p,m,g,v,y,x,b,_,S,w,M,T,E,A,C,P,I;let O;i.isNodeMaterial?i.uniformsNeedUpdate=!1:i.isMeshBasicMaterial?n(e,i):i.isMeshLambertMaterial?(n(e,i),i.envMap&&(e.envMapIntensity.value=i.envMapIntensity)):i.isMeshToonMaterial?(n(e,i),l=e,(u=i).gradientMap&&(l.gradientMap.value=u.gradientMap)):i.isMeshPhongMaterial?(n(e,i),c=e,d=i,c.specular.value.copy(d.specular),c.shininess.value=Math.max(d.shininess,1e-4),i.envMap&&(e.envMapIntensity.value=i.envMapIntensity)):i.isMeshStandardMaterial?(n(e,i),h=e,f=i,h.metalness.value=f.metalness,f.metalnessMap&&(h.metalnessMap.value=f.metalnessMap,r(f.metalnessMap,h.metalnessMapTransform)),h.roughness.value=f.roughness,f.roughnessMap&&(h.roughnessMap.value=f.roughnessMap,r(f.roughnessMap,h.roughnessMapTransform)),f.envMap&&(h.envMapIntensity.value=f.envMapIntensity),i.isMeshPhysicalMaterial&&(p=e,m=i,g=o,p.ior.value=m.ior,m.sheen>0&&(p.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),p.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(p.sheenColorMap.value=m.sheenColorMap,r(m.sheenColorMap,p.sheenColorMapTransform)),m.sheenRoughnessMap&&(p.sheenRoughnessMap.value=m.sheenRoughnessMap,r(m.sheenRoughnessMap,p.sheenRoughnessMapTransform))),m.clearcoat>0&&(p.clearcoat.value=m.clearcoat,p.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(p.clearcoatMap.value=m.clearcoatMap,r(m.clearcoatMap,p.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,r(m.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(p.clearcoatNormalMap.value=m.clearcoatNormalMap,r(m.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),1===m.side&&p.clearcoatNormalScale.value.negate())),m.dispersion>
3820&&(p.dispersion.value=m.dispersion),m.iridescence>0&&(p.iridescence.value=m.iridescence,p.iridescenceIOR.value=m.iridescenceIOR,p.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(p.iridescenceMap.value=m.iridescenceMap,r(m.iridescenceMap,p.iridescenceMapTransform)),m.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=m.iridescenceThicknessMap,r(m.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),m.transmission>0&&(p.transmission.value=m.transmission,p.transmissionSamplerMap.value=g.texture,p.transmissionSamplerSize.value.set(g.width,g.height),m.transmissionMap&&(p.transmissionMap.value=m.transmissionMap,r(m.transmissionMap,p.transmissionMapTransform)),p.thickness.value=m.thickness,m.thicknessMap&&(p.thicknessMap.value=m.thicknessMap,r(m.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=m.attenuationDistance,p.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(p.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(p.anisotropyMap.value=m.anisotropyMap,r(m.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=m.specularIntensity,p.specularColor.value.copy(m.specularColor),m.specularColorMap&&(p.specularColorMap.value=m.specularColorMap,r(m.specularColorMap,p.specularColorMapTransform)),m.specularIntensityMap&&(p.specularIntensityMap.value=m.specularIntensityMap,r(m.specularIntensityMap,p.specularIntensityMapTransform)))):i.isMeshMatcapMaterial?(n(e,i),v=e,(y=i).matcap&&(v.matcap.value=y.matcap)):i.isMeshDepthMaterial?n(e,i):i.isMeshDistanceMaterial?(n(e,i),x=e,b=i,O=t.get(b).light,x.referencePosition.value.setFromMatrixPosition(O.matrixWorld),x.nearDistance.value=O.shadow.camera.near,x.farDistance.value=O.shadow.camera.far):i.isMeshNormalMaterial?n(e,i):i.isLineBasicMaterial?(_=e,S=i,_.diffuse.value.copy(S.color),_.opacity.value=S.opacity,S.map&&(_.map.value=S.map,r(S.map,_.mapTransform)),i.isLineDashedMaterial&&(w=e,M=i,w.dashSize.value=M.dashSize,w.totalSize.value=M.dashSize+M.gapSize,w.scale.value=M.scale)):i.isPointsMaterial?(T=e,E=i,A=a,C=s,T.diffuse.value.copy(E.color),T.opacity.value=E.opacity,T.size.value=E.size*A,T.scale.value=.5*C,E.map&&(T.map.value=E.map,r(E.map,T.uvTransform)),E.alphaMap&&(T.alphaMap.value=E.alphaMap,r(E.alphaMap,T.alphaMapTransform)),E.alphaTest>0&&(T.alphaTest.value=E.alphaTest)):i.isSpriteMaterial?(P=e,I=i,P.diffuse.value.copy(I.color),P.opacity.value=I.opacity,P.rotation.value=I.rotation,I.map&&(P.map.value=I.map,r(I.map,P.mapTransform)),I.alphaMap&&(P.alphaMap.value=I.alphaMap,r(I.alphaMap,P.alphaMapTransform)),I.alphaTest>0&&(P.alphaTest.value=I.alphaTest)):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function uP(e,t,r,n){let i={},a={},s=[],o=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function l(t,r,n,i){if(!0===function(e,t,r,n){let i=e.value,a=t+"_"+r;if(void 0===n[a])return"number"==typeof i||"boolean"==typeof i?n[a]=i:ArrayBuffer.isView(i)?n[a]=i.slice():n[a]=i.clone(),!0;{let e=n[a];if("number"==typeof i||"boolean"==typeof i){if(e!==i)return n[a]=i,!0}else if(ArrayBuffer.isView(i))return!0;else if(!1===e.equals(i))return e.copy(i),!0}return!1}(t,r,n,i)){let r=t.__offset,n=t.value;if(Array.isArray(n)){let e=0;for(let r=0;r<n.length;r++){let i=n[r],a=c(i);u(i,t.__data,e),"number"==typeof i||"boolean"==typeof i||i.isMatrix3||ArrayBuffer.isView(i)||(e+=a.storage/Float32Array.BYTES_PER_ELEMENT)}}else u(n,t.__data,0);e.bufferSubData(e.UNIFORM_BUFFER,r,t.__data)}}function u(e,t,r){"number"==typeof e||"boolean"==typeof e?t[0]=e:e.isMatrix3?(t[0]=e.elements[0],t[1]=e.elements[1],t[2]=e.elements[2],t[3]=0,t[4]=e.elements[3],t[5]=e.elements[4],t[6]=e.elements[5],t[7]=0,t[8]=e.elements[6],t[9]=e.elements[7],t[10]=e.elements[8],t[11]=0):ArrayBuffer.isView(e)?t.set(new e.constructor(e.buffer,e.byteOffset,t.length)):e.toArray(t,r)}function c(e){let t={boundary:0,storage:0};
382return"number"==typeof e||"boolean"==typeof e?(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?D("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ArrayBuffer.isView(e)?(t.boundary=16,t.storage=e.byteLength):D("WebGLRenderer: Unsupported uniform value type.",e),t}function d(t){let r=t.target;r.removeEventListener("dispose",d);let n=s.indexOf(r.__bindingPointIndex);s.splice(n,1),e.deleteBuffer(i[r.id]),delete i[r.id],delete a[r.id]}return{bind:function(e,t){let r=t.program;n.uniformBlockBinding(e,r)},update:function(r,u){var h;let f,p,m,g,v=i[r.id];void 0===v&&(function(e){let t=e.uniforms,r=0;for(let e=0,n=t.length;e<n;e++){let n=Array.isArray(t[e])?t[e]:[t[e]];for(let e=0,t=n.length;e<t;e++){let t=n[e],i=Array.isArray(t.value)?t.value:[t.value];for(let e=0,n=i.length;e<n;e++){let n=c(i[e]),a=r%16,s=a%n.boundary,o=a+s;r+=s,0!==o&&16-o<n.storage&&(r+=16-o),t.__data=new Float32Array(n.storage/Float32Array.BYTES_PER_ELEMENT),t.__offset=r,r+=n.storage}}}let n=r%16;n>0&&(r+=16-n),e.__size=r,e.__cache={}}(r),(h=r).__bindingPointIndex=f=function(){for(let e=0;e<o;e++)if(-1===s.indexOf(e))return s.push(e),e;return k("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}(),p=e.createBuffer(),m=h.__size,g=h.usage,e.bindBuffer(e.UNIFORM_BUFFER,p),e.bufferData(e.UNIFORM_BUFFER,m,g),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,f,p),v=p,i[r.id]=v,r.addEventListener("dispose",d));let y=u.program;n.updateUBOMapping(r,y);let x=t.render.frame;a[r.id]!==x&&(function(t){let r=i[t.id],n=t.uniforms,a=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,r);for(let e=0,t=n.length;e<t;e++){let t=n[e];if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)l(t[r],e,r,a);else l(t,e,0,a)}e.bindBuffer(e.UNIFORM_BUFFER,null)}(r),a[r.id]=x)},dispose:function(){for(let t in i)e.deleteBuffer(i[t]);s=[],i={},a={}}}}uA.set(-1,0,0,0,1,0,0,0,1);let uI=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,
38214942,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]),uO=null;class uR{constructor(e={}){let t,r,n,i,a,s,o,l,u,c,d,h,f,p,m,g,v,y,x,b,S,w,M,T;const{canvas:E=I(),context:A=null,depth:C=!0,stencil:P=!1,alpha:O=!1,antialias:R=!1,premultipliedAlpha:N=!0,preserveDrawingBuffer:U=!1,powerPreference:z="default",failIfMajorPerformanceCaveat:j=!1,reversedDepthBuffer:B=!1,outputBufferType:V=1009}=e;if(this.isWebGLRenderer=!0,null!==A){if("u">typeof WebGLRenderingContext&&A instanceof WebGLRenderingContext)throw Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");t=A.getContextAttributes().alpha}else t=O;const G=new Set([1033,1031,1029]),H=new Set([1009,1014,1012,1020,1017,1018]),W=new Uint32Array(4),X=new Int32Array(4),q=new Q;let Y=null,$=null;const K=[],Z=[];let J=null;this.domElement=E,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;const ee=this;let et=!1,er=null,en=null,ei=null,ea=null;this._outputColorSpace=_;let eo=0,el=0,eu=null,ec=-1,ed=null;const eh=new eg,ef=new eg;let ep=null;const em=new e2(0);let ev=0,ex=E.width,eb=E.height,eS=1,ew=null,eM=null;const eT=new eg(0,0,ex,eb),eE=new eg(0,0,ex,eb);let eA=!1;const eC=new r6;let eP=!1,eI=!1;const eO=new e_,eR=new Q,eL=new eg,eN={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let eD=!1;function ek(){return null===eu?eS:1}let eU=A;function eF(e,t){return E.getContext(e,t)}try{if("setAttribute"in E&&E.setAttribute("data-engine","three.js r185"),E.addEventListener("webglcontextlost",eB,!1),E.addEventListener("webglcontextrestored",eV,!1),E.addEventListener("webglcontextcreationerror",eG,!1),null===eU){const e="webgl2";if(eU=eF(e,{alpha:!0,depth:C,stencil:P,antialias:R,premultipliedAlpha:N,preserveDrawingBuffer:U,powerPreference:z,failIfMajorPerformanceCaveat:j}),null===eU)if(eF(e))throw Error("THREE.WebGLRenderer: Error creating WebGL context with your selected attributes.");else throw Error("THREE.WebGLRenderer: Error creating WebGL context.")}}catch(e){throw k("WebGLRenderer: "+e.message),e}function ez(){(r=new oF(eU)).init(),w=new u_(eU,r),n=new ob(eU,r,e,w),i=new ux(eU,r),n.reversedDepthBuffer&&B&&i.buffers.depth.setReversed(!0),en=eU.createFramebuffer(),ei=eU.createFramebuffer(),ea=eU.createFramebuffer(),a=new oB(eU),s=new ur,o=new ub(eU,r,i,s,n,w,a),l=new oU(ee),u=new oc(eU),M=new oy(eU,u),
382c=new oz(eU,u,a,M),d=new oG(eU,c,u,M,a),x=new oV(eU,n,o),g=new o_(s),h=new ut(ee,l,r,n,M,g),f=new uC(ee,s),p=new us,m=new uh(r),y=new ov(ee,l,i,d,t,N),v=new uy(ee,d,n),T=new uP(eU,a,n,i),b=new ox(eU,r,a),S=new oj(eU,r,a),a.programs=h.programs,ee.capabilities=n,ee.extensions=r,ee.properties=s,ee.renderLists=p,ee.shadowMap=v,ee.state=i,ee.info=a}ez(),1009!==V&&(J=new oW(V,E.width,E.height,R,C,P));const ej=new uT(ee,eU);function eB(e){e.preventDefault(),L("WebGLRenderer: Context Lost."),et=!0}function eV(){L("WebGLRenderer: Context Restored."),et=!1;let e=a.autoReset,t=v.enabled,r=v.autoUpdate,n=v.needsUpdate,i=v.type;ez(),a.autoReset=e,v.enabled=t,v.autoUpdate=r,v.needsUpdate=n,v.type=i}function eG(e){k("WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function eH(e){var t,r;let n,i=e.target;i.removeEventListener("dispose",eH),r=t=i,void 0!==(n=s.get(r).programs)&&(n.forEach(function(e){h.releaseProgram(e)}),r.isShaderMaterial&&h.releaseShaderCache(r)),s.remove(t)}function eW(e,t,r){!0===e.transparent&&2===e.side&&!1===e.forceSinglePass?(e.side=1,e.needsUpdate=!0,e1(e,t,r),e.side=0,e.needsUpdate=!0,e1(e,t,r),e.side=2):e1(e,t,r)}this.xr=ej,this.getContext=function(){return eU},this.getContextAttributes=function(){return eU.getContextAttributes()},this.forceContextLoss=function(){let e=r.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){let e=r.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return eS},this.setPixelRatio=function(e){void 0!==e&&(eS=e,this.setSize(ex,eb,!1))},this.getSize=function(e){return e.set(ex,eb)},this.setSize=function(e,t,r=!0){ej.isPresenting?D("WebGLRenderer: Can't change size while VR device is presenting."):(ex=e,eb=t,E.width=Math.floor(e*eS),E.height=Math.floor(t*eS),!0===r&&(E.style.width=e+"px",E.style.height=t+"px"),null!==J&&J.setSize(E.width,E.height),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return e.set(ex*eS,eb*eS).floor()},this.setDrawingBufferSize=function(e,t,r){ex=e,eb=t,eS=r,E.width=Math.floor(e*r),E.height=Math.floor(t*r),this.setViewport(0,0,e,t)},this.setEffects=function(e){if(1009===V)return void k("WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");if(e){for(let t=0;t<e.length;t++)if(!0===e[t].isOutputPass){D("WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}J.setEffects(e||[])},this.getCurrentViewport=function(e){return e.copy(eh)},this.getViewport=function(e){return e.copy(eT)},this.setViewport=function(e,t,r,n){e.isVector4?eT.set(e.x,e.y,e.z,e.w):eT.set(e,t,r,n),i.viewport(eh.copy(eT).multiplyScalar(eS).round())},this.getScissor=function(e){return e.copy(eE)},this.setScissor=function(e,t,r,n){e.isVector4?eE.set(e.x,e.y,e.z,e.w):eE.set(e,t,r,n),i.scissor(ef.copy(eE).multiplyScalar(eS).round())},this.getScissorTest=function(){return eA},this.setScissorTest=function(e){i.setScissorTest(eA=e)},this.setOpaqueSort=function(e){ew=e},this.setTransparentSort=function(e){eM=e},this.getClearColor=function(e){return e.copy(y.getClearColor())},this.setClearColor=function(){y.setClearColor(...arguments)},this.getClearAlpha=function(){return y.getClearAlpha()},this.setClearAlpha=function(){y.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,r=!0){let n=0;if(e){let e=!1;if(null!==eu){let t=eu.texture.format;e=G.has(t)}if(e){let e=eu.texture.type,t=H.has(e),r=y.getClearColor(),n=y.getClearAlpha(),i=r.r,a=r.g,s=r.b;t?(W[0]=i,W[1]=a,W[2]=s,W[3]=n,eU.clearBufferuiv(eU.COLOR,0,W)):(X[0]=i,X[1]=a,X[2]=s,X[3]=n,eU.clearBufferiv(eU.COLOR,0,X))}else n|=eU.COLOR_BUFFER_BIT}t&&(n|=eU.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),r&&(n|=eU.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(0xffffffff)),0!==n&&eU.clear(n)},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),er=e},this.dispose=function(){E.removeEventListener("webglcontextlost",eB,!1),E.removeEventListener("webglcontextrestored",eV,!1),E.removeEventListener("webglcontextcreationerror",eG,!1),y.dispose(),p.dispose(),m.dispose(),s.dispose(),l.dispose(),d.dispose(),M.dispose(),T.dispose(),h.dispose(),ej.dispose(),ej.removeEventListener("sessionstart",eq),ej.removeEventListener("sessionend",eY),e$.stop()},this.renderBufferDirect=function(e,t,a,d,h,p){let m;null===t&&(t=eN);let v=h.isMesh&&0>h.matrixWorld.determinantAffine(),y=function(e,t,r,a,u){!0!==t.isScene&&(t=eN),o.resetTextureUnits();let c=t.fog,d=a.isMeshStandardMaterial||a.isMeshLambertMaterial||a.isMeshPhongMaterial?t.environment:null,h=null===eu?ee.outputColorSpace:!0===eu.isXRRenderTarget?eu.texture.colorSpace:es.workingColorSpace,p=a.isMeshStandardMaterial||a.isMeshLambertMaterial&&!a.envMap||a.isMeshPhongMaterial&&!a.envMap,m=l.get(a.envMap||d,p),v=!0===a.vertexColors&&!!r.attributes.color&&4===r.attributes.color.itemSize,y=!!r.attributes.tangent&&(!!a.normalMap||a.anisotropy>0),b=!!r.morphAttributes.position,_=!!r.morphAttributes.normal,S=!!r.morphAttributes.color,w=0;a.toneMapped&&(null===eu||!0===eu.isXRRenderTarget)&&(w=ee.toneMapping);let M=r.morphAttributes.position||r.morphAttributes.normal||r.morphAttributes.color,E=void 0!==M?M.length:0,A=s.get(a),C=$.state.lights;if(!0===eP&&(!0===eI||e!==ed)){let t=e===ed&&a.id===ec;g.setState(a,e,t)}let P=!1;a.version===A.__version?A.needsLights&&A.lightsStateVersion!==C.state.ver
382sion||A.outputColorSpace!==h||u.isBatchedMesh&&!1===A.batching?P=!0:u.isBatchedMesh||!0!==A.batching?u.isBatchedMesh&&!0===A.batchingColor&&null===u.colorTexture||u.isBatchedMesh&&!1===A.batchingColor&&null!==u.colorTexture||u.isInstancedMesh&&!1===A.instancing?P=!0:u.isInstancedMesh||!0!==A.instancing?u.isSkinnedMesh&&!1===A.skinning?P=!0:u.isSkinnedMesh||!0!==A.skinning?u.isInstancedMesh&&!0===A.instancingColor&&null===u.instanceColor||u.isInstancedMesh&&!1===A.instancingColor&&null!==u.instanceColor||u.isInstancedMesh&&!0===A.instancingMorph&&null===u.morphTexture||u.isInstancedMesh&&!1===A.instancingMorph&&null!==u.morphTexture||A.envMap!==m||!0===a.fog&&A.fog!==c||void 0!==A.numClippingPlanes&&(A.numClippingPlanes!==g.numPlanes||A.numIntersection!==g.numIntersection)||A.vertexAlphas!==v||A.vertexTangents!==y||A.morphTargets!==b||A.morphNormals!==_||A.morphColors!==S||A.toneMapping!==w||A.morphTargetsCount!==E?P=!0:!!A.lightProbeGrid!=$.state.lightProbeGridArray.length>0&&(P=!0):P=!0:P=!0:P=!0:(P=!0,A.__version=a.version);let I=A.currentProgram;!0===P&&(I=e1(a,t,u),er&&a.isNodeMaterial&&er.onUpdateProgram(a,I,A));let O=!1,R=!1,L=!1,N=I.getUniforms(),D=A.uniforms;if(i.useProgram(I.program)&&(O=!0,R=!0,L=!0),a.id!==ec&&(ec=a.id,R=!0),A.needsLights){let e=function(e,t){if(0===e.length)return null;if(1===e.length)return null!==e[0].texture?e[0]:null;q.setFromMatrixPosition(t.matrixWorld);for(let t=0,r=e.length;t<r;t++){let r=e[t];if(null!==r.texture&&r.boundingBox.containsPoint(q))return r}return null}($.state.lightProbeGridArray,u);A.lightProbeGrid!==e&&(A.lightProbeGrid=e,R=!0)}if(O||ed!==e){i.buffers.depth.getReversed()&&!0!==e.reversedDepth&&(e._reversedDepth=!0,e.updateProjectionMatrix()),N.setValue(eU,"projectionMatrix",e.projectionMatrix),N.setValue(eU,"viewMatrix",e.matrixWorldInverse);let t=N.map.cameraPosition;void 0!==t&&t.setValue(eU,eR.setFromMatrixPosition(e.matrixWorld)),n.logarithmicDepthBuffer&&N.setValue(eU,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(a.isMeshPhongMaterial||a.isMeshToonMaterial||a.isMeshLambertMaterial||a.isMeshBasicMaterial||a.isMeshStandardMaterial||a.isShaderMaterial)&&N.setValue(eU,"isOrthographic",!0===e.isOrthographicCamera),ed!==e&&(ed=e,R=!0,L=!0)}if(A.needsLights&&(C.state.directionalShadowMap.length>0&&N.setValue(eU,"directionalShadowMap",C.state.directionalShadowMap,o),C.state.spotShadowMap.length>0&&N.setValue(eU,"spotShadowMap",C.state.spotShadowMap,o),C.state.pointShadowMap.length>0&&N.setValue(eU,"pointShadowMap",C.state.pointShadowMap,o)),u.isSkinnedMesh){N.setOptional(eU,u,"bindMatrix"),N.setOptional(eU,u,"bindMatrixInverse");let e=u.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),N.setValue(eU,"boneTexture",e.boneTexture,o))}u.isBatchedMesh&&(N.setOptional(eU,u,"batchingTexture"),N.setValue(eU,"batchingTexture",u._matricesTexture,o),N.setOptional(eU,u,"batchingIdTexture"),N.setValue(eU,"batchingIdTexture",u._indirectTexture,o),N.setOptional(eU,u,"batchingColorTexture"),null!==u._colorsTexture&&N.setValue(eU,"batchingColorTexture",u._colorsTexture,o));let k=r.morphAttributes;if((void 0!==k.position||void 0!==k.normal||void 0!==k.color)&&x.update(u,r,I),(R||A.receiveShadow!==u.receiveShadow)&&(A.receiveShadow=u.receiveShadow,N.setValue(eU,"receiveShadow",u.receiveShadow)),(a.isMeshStandardMaterial||a.isMeshLambertMaterial||a.isMeshPhongMaterial)&&null===a.envMap&&null!==t.environment&&(D.envMapIntensity.value=t.environmentIntensity),void 0!==D.dfgLUT&&(D.dfgLUT.value=(null===uO&&((uO=new rj(uI,16,16,1030,1016)).name="DFG_LUT",uO.minFilter=1006,uO.magFilter=1006,uO.wrapS=1001,uO.wrapT=1001,uO.generateMipmaps=!1,uO.needsUpdate=!0),uO)),R){var U,F;if(N.setValue(eU,"toneMappingExposure",ee.toneMappingExposure),A.needsLights&&(U=D,F=L,U.ambientLightColor.needsUpdate=F,U.lightProbe.needsUpdate=F,U.directionalLights.needsUpdate=F,U.directionalLightShadows.needsUpdate=F,U.pointLights.needsUpdate=F,U.pointLightShadows.needsUpdate=F,U.spotLights.needsUpdate=F,U.spotLightShadows.needsUpdate=F,U.rectAreaLights.needsUpdate=F,U.hemisphereLights.needsUpdate=F),c&&!0===a.fog&&f.refreshFogUniforms(D,c),f.refreshMaterialUniforms(D,a,eS,eb,$.state.transmissionRenderTarget[e.id]),A.needsLights&&A.lightProbeGrid){let e=A.lightProbeGrid;D.probesSH.value=e.texture,D.probesMin.value.copy(e.boundingBox.min),D.probesMax.value.copy(e.boundingBox.max),D.probesResolution.value.copy(e.resolution)}lz.upload(eU,e3(A),D,o)}if(a.isShaderMaterial&&!0===a.uniformsNeedUpdate&&(lz.upload(eU,e3(A),D,o),a.uniformsNeedUpdate=!1),a.isSpriteMaterial&&N.setValue(eU,"center",u.center),N.setValue(eU,"modelViewMatrix",u.modelViewMatrix),N.setValue(eU,"normalMatrix",u.normalMatrix),N.setValue(eU,"modelMatrix",u.matrixWorld),void 0!==a.uniformsGroups){let e=a.uniformsGroups;for(let t=0,r=e.length;t<r;t++){let r=e[t];T.update(r,I),T.bind(r,I)}}return I}(e,t,a,d,h);i.setMaterial(d,v);let _=a.index,w=1;if(!0===d.wireframe){if(void 0===(_=c.getWireframeAttribute(a)))return;w=2}let E=a.drawRange,A=a.attributes.position,C=E.start*w,P=(E.start+E.count)*w;null!==p&&(C=Math.max(C,p.start*w),P=Math.min(P,(p.start+p.count)*w)),null!==_?(C=Math.max(C,0),P=Math.min(P,_.count)):null!=A&&(C=Math.max(C,0),P=Math.min(P,A.count));let I=P-C;if(I<0||I===1/0)return;M.setup(h,d,y,a,_);let O=b;if(null!==_&&(m=u.get(_),(O=S).setIndex(m)),h.isMesh)!0===d.wireframe?(i.setLineWidth(d.wireframeLinewidth*ek()),O.setMode(eU.LINES)):O.setMode(eU.TRIANGLES);else if(h.isLine){let e=d.linewidth;void 0===e&&(e=1),i.setLineWidth(e*ek()),h.isLineSegments?O.setMode(eU.LINES):h.isLine
382Loop?O.setMode(eU.LINE_LOOP):O.setMode(eU.LINE_STRIP)}else h.isPoints?O.setMode(eU.POINTS):h.isSprite&&O.setMode(eU.TRIANGLES);if(h.isBatchedMesh)if(r.get("WEBGL_multi_draw"))O.renderMultiDraw(h._multiDrawStarts,h._multiDrawCounts,h._multiDrawCount);else{let e=h._multiDrawStarts,t=h._multiDrawCounts,r=h._multiDrawCount,n=_?u.get(_).bytesPerElement:1,i=s.get(d).currentProgram.getUniforms();for(let a=0;a<r;a++)i.setValue(eU,"_gl_DrawID",a),O.render(e[a]/n,t[a])}else if(h.isInstancedMesh)O.renderInstances(C,I,h.count);else if(a.isInstancedBufferGeometry){let e=void 0!==a._maxInstanceCount?a._maxInstanceCount:1/0,t=Math.min(a.instanceCount,e);O.renderInstances(C,I,t)}else O.render(C,I)},this.compile=function(e,t,r=null){null===r&&(r=e),($=m.get(r)).init(t),Z.push($),r.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&($.pushLight(e),e.castShadow&&$.pushShadow(e))}),e!==r&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&($.pushLight(e),e.castShadow&&$.pushShadow(e))}),$.setupLights();let n=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];eW(a,r,e),n.add(a)}else eW(t,r,e),n.add(t)}),$=Z.pop(),n},this.compileAsync=function(e,t,n=null){let i=this.compile(e,t,n);return new Promise(t=>{function n(){(i.forEach(function(e){s.get(e).currentProgram.isReady()&&i.delete(e)}),0===i.size)?t(e):setTimeout(n,10)}null!==r.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)})};let eX=null;function eq(){e$.stop()}function eY(){e$.start()}const e$=new ou;function eK(e,t,r,n){if(!1===e.visible)return;if(e.layers.test(t.layers)){if(e.isGroup)r=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLightProbeGrid)$.pushLightProbeGrid(e);else if(e.isLight)$.pushLight(e),e.castShadow&&$.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||eC.intersectsSprite(e)){n&&eL.setFromMatrixPosition(e.matrixWorld).applyMatrix4(eO);let t=d.update(e),i=e.material;i.visible&&Y.push(e,t,i,r,eL.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||eC.intersectsObject(e))){let t=d.update(e),i=e.material;if(n&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),eL.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),eL.copy(t.boundingSphere.center)),eL.applyMatrix4(e.matrixWorld).applyMatrix4(eO)),Array.isArray(i)){let n=t.groups;for(let a=0,s=n.length;a<s;a++){let s=n[a],o=i[s.materialIndex];o&&o.visible&&Y.push(e,t,o,r,eL.z,s)}}else i.visible&&Y.push(e,t,i,r,eL.z,null)}}let i=e.children;for(let e=0,a=i.length;e<a;e++)eK(i[e],t,r,n)}function eZ(e,t,r,n){let{opaque:a,transmissive:s,transparent:o}=e;$.setupLightsView(r),!0===eP&&g.setGlobalState(ee.clippingPlanes,r),n&&i.viewport(eh.copy(n)),a.length>0&&eQ(a,t,r),s.length>0&&eQ(s,t,r),o.length>0&&eQ(o,t,r),i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),i.setPolygonOffset(!1)}function eJ(e,t,i,a){if(null!==(!0===i.isScene?i.overrideMaterial:null))return;if(void 0===$.state.transmissionRenderTarget[a.id]){let e=r.has("EXT_color_buffer_half_float")||r.has("EXT_color_buffer_float");$.state.transmissionRenderTarget[a.id]=new ey(1,1,{generateMipmaps:!0,type:e?1016:1009,minFilter:1008,samples:Math.max(4,n.samples),stencilBuffer:P,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:es.workingColorSpace})}let s=$.state.transmissionRenderTarget[a.id],l=a.viewport||eh;s.setSize(l.z*ee.transmissionResolutionScale,l.w*ee.transmissionResolutionScale);let u=ee.getRenderTarget(),c=ee.getActiveCubeFace(),d=ee.getActiveMipmapLevel();ee.setRenderTarget(s),ee.getClearColor(em),(ev=ee.getClearAlpha())<1&&ee.setClearColor(0xffffff,.5),ee.clear(),eD&&y.render(i);let h=ee.toneMapping;ee.toneMapping=0;let f=a.viewport;if(void 0!==a.viewport&&(a.viewport=void 0),$.setupLightsView(a),!0===eP&&g.setGlobalState(ee.clippingPlanes,a),eQ(e,i,a),o.updateMultisampleRenderTarget(s),o.updateRenderTargetMipmap(s),!1===r.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let r=0,n=t.length;r<n;r++){let{object:n,geometry:s,material:o,group:l}=t[r];
382if(2===o.side&&n.layers.test(a.layers)){let t=o.side;o.side=1,o.needsUpdate=!0,e0(n,i,a,s,o,l),o.side=t,o.needsUpdate=!0,e=!0}}!0===e&&(o.updateMultisampleRenderTarget(s),o.updateRenderTargetMipmap(s))}ee.setRenderTarget(u,c,d),ee.setClearColor(em,ev),void 0!==f&&(a.viewport=f),ee.toneMapping=h}function eQ(e,t,r){let n=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i<a;i++){let a=e[i],{object:s,geometry:o,group:l}=a,u=a.material;!0===u.allowOverride&&null!==n&&(u=n),s.layers.test(r.layers)&&e0(s,t,r,o,u,l)}}function e0(e,t,r,n,i,a){e.onBeforeRender(ee,t,r,n,i,a),e.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(ee,t,r,n,e,a),!0===i.transparent&&2===i.side&&!1===i.forceSinglePass?(i.side=1,i.needsUpdate=!0,ee.renderBufferDirect(r,t,n,i,e,a),i.side=0,i.needsUpdate=!0,ee.renderBufferDirect(r,t,n,i,e,a),i.side=2):ee.renderBufferDirect(r,t,n,i,e,a),e.onAfterRender(ee,t,r,n,i,a)}function e1(e,t,r){var n;!0!==t.isScene&&(t=eN);let i=s.get(e),a=$.state.lights,o=$.state.shadowsArray,u=a.state.version,c=h.getParameters(e,a.state,o,t,r,$.state.lightProbeGridArray),d=h.getProgramCacheKey(c),f=i.programs;i.environment=e.isMeshStandardMaterial||e.isMeshLambertMaterial||e.isMeshPhongMaterial?t.environment:null,i.fog=t.fog;let p=e.isMeshStandardMaterial||e.isMeshLambertMaterial&&!e.envMap||e.isMeshPhongMaterial&&!e.envMap;i.envMap=l.get(e.envMap||i.environment,p),i.envMapRotation=null!==i.environment&&null===e.envMap?t.environmentRotation:e.envMapRotation,void 0===f&&(e.addEventListener("dispose",eH),i.programs=f=new Map);let m=f.get(d);if(void 0!==m){if(i.currentProgram===m&&i.lightsStateVersion===u)return e4(e,c),m}else c.uniforms=h.getUniforms(e),null!==er&&e.isNodeMaterial&&er.build(e,r,c),e.onBeforeCompile(c,ee),m=h.acquireProgram(c,d),f.set(d,m),i.uniforms=c.uniforms;let v=i.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(v.clippingPlanes=g.uniform),e4(e,c),i.needsLights=(n=e).isMeshLambertMaterial||n.isMeshToonMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.isShadowMaterial||n.isShaderMaterial&&!0===n.lights,i.lightsStateVersion=u,i.needsLights&&(v.ambientLightColor.value=a.state.ambient,v.lightProbe.value=a.state.probe,v.directionalLights.value=a.state.directional,v.directionalLightShadows.value=a.state.directionalShadow,v.spotLights.value=a.state.spot,v.spotLightShadows.value=a.state.spotShadow,v.rectAreaLights.value=a.state.rectArea,v.ltc_1.value=a.state.rectAreaLTC1,v.ltc_2.value=a.state.rectAreaLTC2,v.pointLights.value=a.state.point,v.pointLightShadows.value=a.state.pointShadow,v.hemisphereLights.value=a.state.hemi,v.directionalShadowMatrix.value=a.state.directionalShadowMatrix,v.spotLightMatrix.value=a.state.spotLightMatrix,v.spotLightMap.value=a.state.spotLightMap,v.pointShadowMatrix.value=a.state.pointShadowMatrix),i.lightProbeGrid=$.state.lightProbeGridArray.length>0,i.currentProgram=m,i.uniformsList=null,m}function e3(e){if(null===e.uniformsList){let t=e.currentProgram.getUniforms();e.uniformsList=lz.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function e4(e,t){let r=s.get(e);r.outputColorSpace=t.outputColorSpace,r.batching=t.batching,r.batchingColor=t.batchingColor,r.instancing=t.instancing,r.instancingColor=t.instancingColor,r.instancingMorph=t.instancingMorph,r.skinning=t.skinning,r.morphTargets=t.morphTargets,r.morphNormals=t.morphNormals,r.morphColors=t.morphColors,r.morphTargetsCount=t.morphTargetsCount,r.numClippingPlanes=t.numClippingPlanes,r.numIntersection=t.numClipIntersection,r.vertexAlphas=t.vertexAlphas,r.vertexTangents=t.vertexTangents,r.toneMapping=t.toneMapping}e$.setAnimationLoop(function(e){eX&&eX(e)}),"u">typeof self&&e$.setContext(self),this.setAnimationLoop=function(e){eX=e,ej.setAnimationLoop(e),null===e?e$.stop():e$.start()},ej.addEventListener("sessionstart",eq),ej.addEventListener("sessionend",eY),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void k("WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===et)return;null!==er&&er.renderStart(e,t);let r=!0===ej.enabled&&!0===ej.isPresenting,n=null!==J&&(null===eu||r)&&J.begin(ee,eu);if(!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===ej.enabled&&!0===ej.isPresenting&&(null===J||!1===J.isCompositing(
382))&&(!0===ej.cameraAutoUpdate&&ej.updateCamera(t),t=ej.getCamera()),!0===e.isScene&&e.onBeforeRender(ee,e,t,eu),($=m.get(e,Z.length)).init(t),$.state.textureUnits=o.getTextureUnits(),Z.push($),eO.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),eC.setFromProjectionMatrix(eO,2e3,t.reversedDepth),eI=this.localClippingEnabled,eP=g.init(this.clippingPlanes,eI),(Y=p.get(e,K.length)).init(),K.push(Y),!0===ej.enabled&&!0===ej.isPresenting){let e=ee.xr.getDepthSensingMesh();null!==e&&eK(e,t,-1/0,ee.sortObjects)}eK(e,t,0,ee.sortObjects),Y.finish(),!0===ee.sortObjects&&Y.sort(ew,eM,t.reversedDepth),(eD=!1===ej.enabled||!1===ej.isPresenting||!1===ej.hasDepthSensing())&&y.addToRenderList(Y,e),this.info.render.frame++,!0===this.info.autoReset&&this.info.reset(),!0===eP&&g.beginShadows();let i=$.state.shadowsArray;if(v.render(i,e,t),!0===eP&&g.endShadows(),!1===(n&&J.hasRenderPass())){let r=Y.opaque,n=Y.transmissive;if($.setupLights(),t.isArrayCamera){let i=t.cameras;if(n.length>0)for(let t=0,a=i.length;t<a;t++)eJ(r,n,e,i[t]);eD&&y.render(e);for(let t=0,r=i.length;t<r;t++){let r=i[t];eZ(Y,e,r,r.viewport)}}else n.length>0&&eJ(r,n,e,t),eD&&y.render(e),eZ(Y,e,t)}null!==eu&&0===el&&(o.updateMultisampleRenderTarget(eu),o.updateRenderTargetMipmap(eu)),n&&J.end(ee),!0===e.isScene&&e.onAfterRender(ee,e,t),M.resetDefaultState(),ec=-1,ed=null,Z.pop(),Z.length>0?($=Z[Z.length-1],o.setTextureUnits($.state.textureUnits),!0===eP&&g.setGlobalState(ee.clippingPlanes,$.state.camera)):$=null,K.pop(),Y=K.length>0?K[K.length-1]:null,null!==er&&er.renderEnd()},this.getActiveCubeFace=function(){return eo},this.getActiveMipmapLevel=function(){return el},this.getRenderTarget=function(){return eu},this.setRenderTargetTextures=function(e,t,r){let n=s.get(e);n.__autoAllocateDepthBuffer=!1===e.resolveDepthBuffer,!1===n.__autoAllocateDepthBuffer&&(n.__useRenderToTexture=!1),s.get(e.texture).__webglTexture=t,s.get(e.depthTexture).__webglTexture=n.__autoAllocateDepthBuffer?void 0:r,n.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,t){let r=s.get(e);r.__webglFramebuffer=t,r.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,r=0){eu=e,eo=t,el=r;let n=null,a=!1,l=!1;if(e){let u=s.get(e);if(void 0!==u.__useDefaultFramebuffer){i.bindFramebuffer(eU.FRAMEBUFFER,u.__webglFramebuffer),eh.copy(e.viewport),ef.copy(e.scissor),ep=e.scissorTest,i.viewport(eh),i.scissor(ef),i.setScissorTest(ep),ec=-1;return}if(void 0===u.__webglFramebuffer)o.setupRenderTarget(e);else if(u.__hasExternalTextures)o.rebindTextures(e,s.get(e.texture).__webglTexture,s.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let t=e.depthTexture;if(u.__boundDepthTexture!==t){if(null!==t&&s.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw Error("THREE.WebGLRenderer: Attached DepthTexture is initialized to the incorrect size.");o.setupDepthRenderbuffer(e)}}let c=e.texture;(c.isData3DTexture||c.isDataArrayTexture||c.isCompressedArrayTexture)&&(l=!0);let d=s.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(n=Array.isArray(d[t])?d[t][r]:d[t],a=!0):n=e.samples>0&&!1===o.useMultisampledRTT(e)?s.get(e).__webglMultisampledFramebuffer:Array.isArray(d)?d[r]:d,eh.copy(e.viewport),ef.copy(e.scissor),ep=e.scissorTest}else eh.copy(eT).multiplyScalar(eS).floor(),ef.copy(eE).multiplyScalar(eS).floor(),ep=eA;if(0!==r&&(n=en),i.bindFramebuffer(eU.FRAMEBUFFER,n)&&i.drawBuffers(e,n),i.viewport(eh),i.scissor(ef),i.setScissorTest(ep),a){let n=s.get(e.texture);eU.framebufferTexture2D(eU.FRAMEBUFFER,eU.COLOR_ATTACHMENT0,eU.TEXTURE_CUBE_MAP_POSITIVE_X+t,n.__webglTexture,r)}else if(l)for(let n=0;n<e.textures.length;n++){let i=s.get(e.textures[n]);eU.framebufferTextureLayer(eU.FRAMEBUFFER,eU.COLOR_ATTACHMENT0+n,i.__webglTexture,r,t)}else if(null!==e&&0!==r){let t=s.get(e.texture);eU.framebufferTexture2D(eU.FRAMEBUFFER,eU.COLOR_ATTACHMENT0,eU.TEXTURE_2D,t.__webglTexture,r)}ec=-1},this.readRenderTargetPixels=function(e,t,r,a,o,l,u,c=0){if(!(e&&e.isWebGLRenderTarget))return void k("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let d=s.get(e).__webglFramebuffer;
vendor: 5,221 bytes, line 382
382if(e.isWebGLCubeRenderTarget&&void 0!==u&&(d=d[u]),d){i.bindFramebuffer(eU.FRAMEBUFFER,d);try{let i=e.textures[c],s=i.format,u=i.type;if(e.textures.length>1&&eU.readBuffer(eU.COLOR_ATTACHMENT0+c),!n.textureFormatReadable(s))return void k("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!n.textureTypeReadable(u))return void k("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-a&&r>=0&&r<=e.height-o&&eU.readPixels(t,r,a,o,w.convert(s),w.convert(u),l)}finally{let e=null!==eu?s.get(eu).__webglFramebuffer:null;i.bindFramebuffer(eU.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,r,a,o,l,u,c=0){if(!(e&&e.isWebGLRenderTarget))throw Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let d=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(d=d[u]),d)if(t>=0&&t<=e.width-a&&r>=0&&r<=e.height-o){i.bindFramebuffer(eU.FRAMEBUFFER,d);let u=e.textures[c],h=u.format,f=u.type;if(e.textures.length>1&&eU.readBuffer(eU.COLOR_ATTACHMENT0+c),!n.textureFormatReadable(h))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!n.textureTypeReadable(f))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let p=eU.createBuffer();eU.bindBuffer(eU.PIXEL_PACK_BUFFER,p),eU.bufferData(eU.PIXEL_PACK_BUFFER,l.byteLength,eU.STREAM_READ),eU.readPixels(t,r,a,o,w.convert(h),w.convert(f),0);let m=null!==eu?s.get(eu).__webglFramebuffer:null;i.bindFramebuffer(eU.FRAMEBUFFER,m);let g=eU.fenceSync(eU.SYNC_GPU_COMMANDS_COMPLETE,0);return eU.flush(),await F(eU,g,4),eU.bindBuffer(eU.PIXEL_PACK_BUFFER,p),eU.getBufferSubData(eU.PIXEL_PACK_BUFFER,0,l),eU.deleteBuffer(p),eU.deleteSync(g),l}else throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(e,t=null,r=0){let n=Math.pow(2,-r),a=Math.floor(e.image.width*n),s=Math.floor(e.image.height*n),l=null!==t?t.x:0,u=null!==t?t.y:0;o.setTexture2D(e,0),eU.copyTexSubImage2D(eU.TEXTURE_2D,r,0,0,l,u,a,s),i.unbindTexture()},this.copyTextureToTexture=function(e,t,r=null,n=null,a=0,l=0){let u,c,d,h,f,p,m,g,v,y,x=e.isCompressedTexture?e.mipmaps[l]:e.image;if(null!==r)u=r.max.x-r.min.x,c=r.max.y-r.min.y,d=r.isBox3?r.max.z-r.min.z:1,h=r.min.x,f=r.min.y,p=r.isBox3?r.min.z:0;else{let t=Math.pow(2,-a);u=Math.floor(x.width*t),c=Math.floor(x.height*t),d=e.isDataArrayTexture?x.depth:e.isData3DTexture?Math.floor(x.depth*t):1,h=0,f=0,p=0}null!==n?(m=n.x,g=n.y,v=n.z):(m=0,g=0,v=0);let b=w.convert(t.format),_=w.convert(t.type);t.isData3DTexture?(o.setTexture3D(t,0),y=eU.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(o.setTexture2DArray(t,0),y=eU.TEXTURE_2D_ARRAY):(o.setTexture2D(t,0),y=eU.TEXTURE_2D),i.activeTexture(eU.TEXTURE0),i.pixelStorei(eU.UNPACK_FLIP_Y_WEBGL,t.flipY),i.pixelStorei(eU.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),i.pixelStorei(eU.UNPACK_ALIGNMENT,t.unpackAlignment);let S=i.getParameter(eU.UNPACK_ROW_LENGTH),M=i.getParameter(eU.UNPACK_IMAGE_HEIGHT),T=i.getParameter(eU.UNPACK_SKIP_PIXELS),E=i.getParameter(eU.UNPACK_SKIP_ROWS),A=i.getParameter(eU.UNPACK_SKIP_IMAGES);i.pixelStorei(eU.UNPACK_ROW_LENGTH,x.width),i.pixelStorei(eU.UNPACK_IMAGE_HEIGHT,x.height),i.pixelStorei(eU.UNPACK_SKIP_PIXELS,h),i.pixelStorei(eU.UNPACK_SKIP_ROWS,f),i.pixelStorei(eU.UNPACK_SKIP_IMAGES,p);let C=e.isDataArrayTexture||e.isData3DTexture,P=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let r=s.get(e),n=s.get(t),o=s.get(r.__renderTarget),y=s.get(n.__renderTarget);i.bindFramebuffer(eU.READ_FRAMEBUFFER,o.__webglFramebuffer),i.bindFramebuffer(eU.DRAW_FRAMEBUFFER,y.__webglFramebuffer);for(let r=0;r<d;r++)C&&(eU.framebufferTextureLayer(eU.READ_FRAMEBUFFER,eU.COLOR_ATTACHMENT0,s.get(e).__webglTexture,a,p+r),eU.framebufferTextureLayer(eU.DRAW_FRAMEBUFFER,eU.COLOR_ATTACHMENT0,s.get(t).__webglTexture,l,v+r)),eU.blitFramebuffer(h,f,u,c,m,g,u,c,eU.DEPTH_BUFFER_BIT,eU.NEAREST);i.bindFramebuffer(eU.READ_FRAMEBUFFER,null),i.bindFramebuffer(eU.DRAW_FRAMEBUFFER,null)}else if(0!==a||e.isRenderTargetTexture||s.has(e)){let r=s.get(e),n=s.get(t);i.bindFramebuffer(eU.READ_FRAMEBUFFER,ei),i.bindFramebuffer(eU.DRAW_FRAMEBUFFER,ea);for(let e=0;e<d;e++)C?eU.framebufferTextureLayer(eU.READ_FRAMEBUFFER,eU.COLOR_ATTACHMENT0,r.__webglTexture,a,p+e):eU.framebufferTexture2D(eU.READ_FRAMEBUFFER,eU.COLOR_ATTACHMENT0,eU.TEXTURE_2D,r.__webglTexture,a),P?eU.framebufferTextureLayer(eU.DRAW_FRAMEBUFFER,eU.COLOR_ATTACHMENT0,n.__webglTexture,l,v+e):eU.framebufferTexture2D(eU.DRAW_FRAMEBUFFER,eU.COLOR_ATTACHMENT0,eU.TEXTURE_2D,n.__webglTexture,l),0!==a?eU.blitFramebuffer(h,f,u,c,m,g,u,c,eU.COLOR_BUFFER_BIT,eU.NEAREST):P?eU.copyTexSubImage3D(y,l,m,g,v+e,h,f,u,c):eU.copyTexSubImage2D(y,l,m,g,h,f,u,c);i.bindFramebuffer(eU.READ_FRAMEBUFFER,null),i.bindFramebuffer(eU.DRAW_FRAMEBUFFER,null)}else P?e.isDataTexture||e.isData3DTexture?eU.texSubImage3D(y,l,m,g,v,u,c,d,b,_,x.data):t.isCompressedArrayTexture?eU.c
382ompressedTexSubImage3D(y,l,m,g,v,u,c,d,b,x.data):eU.texSubImage3D(y,l,m,g,v,u,c,d,b,_,x):e.isDataTexture?eU.texSubImage2D(eU.TEXTURE_2D,l,m,g,u,c,b,_,x.data):e.isCompressedTexture?eU.compressedTexSubImage2D(eU.TEXTURE_2D,l,m,g,x.width,x.height,b,x.data):eU.texSubImage2D(eU.TEXTURE_2D,l,m,g,u,c,b,_,x);i.pixelStorei(eU.UNPACK_ROW_LENGTH,S),i.pixelStorei(eU.UNPACK_IMAGE_HEIGHT,M),i.pixelStorei(eU.UNPACK_SKIP_PIXELS,T),i.pixelStorei(eU.UNPACK_SKIP_ROWS,E),i.pixelStorei(eU.UNPACK_SKIP_IMAGES,A),0===l&&t.generateMipmaps&&eU.generateMipmap(y),i.unbindTexture()},this.initRenderTarget=function(e){void 0===s.get(e).__webglFramebuffer&&o.setupRenderTarget(e)},this.initTexture=function(e){e.isCubeTexture?o.setTextureCube(e,0):e.isData3DTexture?o.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?o.setTexture2DArray(e,0):o.setTexture2D(e,0),i.unbindTexture()},this.resetState=function(){eo=0,el=0,eu=null,i.reset(),M.reset()},"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return 2e3}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=es._getDrawingBufferColorSpace(e),t.unpackColorSpace=es._getUnpackColorSpace()}}e.s(["PMREMGenerator",0,oI,"ShaderChunk",0,od,"ShaderLib",0,of,"UniformsLib",0,oh,"WebGLCubeRenderTarget",0,ok,"WebGLRenderer",0,uR,"WebGLUtils",0,u_],8560);var uL=e.i(30224);let uN=e=>{let t,r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,a={setState:n,getState:i,getInitialState:()=>s,subscribe:e=>(r.add(e),()=>r.delete(e))},s=t=e(n,i,a);return a},{useSyncExternalStoreWithSelector:uD}=uL.default,uk=(e,t)=>{let r=e?uN(e):uN,n=(e,n=t)=>(function(e,t=e=>e,r){let n=uD(e.subscribe,e.getState,e.getInitialState,t,r);return ol.default.useDebugValue(n),n})(r,e,n);return Object.assign(n,r),n},uU=[];function uF(e,t,r=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;let n=e.length;if(t.length!==n)return!1;for(let i=0;i<n;i++)if(!r(e[i],t[i]))return!1;return!0}function uz(e,t=null,r=!1,n={}){for(let i of(null===t&&(t=[e]),uU))if(uF(t,i.keys,i.equal)){if(r)return;if(Object.prototype.hasOwnProperty.call(i,"error"))throw i.error;if(Object.prototype.hasOwnProperty.call(i,"response"))return n.lifespan&&n.lifespan>0&&(i.timeout&&clearTimeout(i.timeout),i.timeout=setTimeout(i.remove,n.lifespan)),i.response;if(!r)throw i.promise}let i={keys:t,equal:n.equal,remove:()=>{let e=uU.indexOf(i);-1!==e&&uU.splice(e,1)},promise:("object"==typeof e&&"function"==typeof e.then?e:e(...t)).then(e=>{i.response=e,n.lifespan&&n.lifespan>0&&(i.timeout=setTimeout(i.remove,n.lifespan))}).catch(e=>i.error=e)};if(uU.push(i),!r)throw i.promise}var uj=e.i(89499),uB=e.i(43476),uV=ol;function uG(e,t,r){if(!e)return;if(!0===r(e))return e;let n=t?e.return:e.child;for(;n;){let e=uG(n,t,r);if(e)return e;n=t?null:n.sibling}}function uH(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}"u">typeof window&&((null==(ih=window.document)?void 0:ih.createElement)||(null==(ip=window.navigator)?void 0:ip.product)==="ReactNative")?uV.useLayoutEffect:uV.useEffect;let uW=uH(uV.createContext(null));class uX extends uV.Component{render(){return uV.createElement(uW.Provider,{value:this._reactInternals},this.props.children)}}function uq(){let e=uV.useContext(uW);if(null===e)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let t=uV.useId();return uV.useMemo(()=>{for(let r of[e,null==e?void 0:e.alternate]){if(!r)continue;let e=uG(r,!1,e=>{let r=e.memoizedState;for(;r;){if(r.memoizedState===t)return!0;r=r.next}});if(e)return e}},[e,t])}let uY=Symbol.for("react.context"),u$=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===uY;function uK(){let e=function(){let e=uq(),[t]=uV.useState(()=>new Map);t.clear();let r=e;for(;r;){let e=r.type;u$(e)&&e!==uW&&!t.has(e)&&t.set(e,uV.use(uH(e))),r=r.return}return t}();return uV.useMemo(()=>Array.from(e.keys()).reduce((t,r)=>n=>uV.createElement(t,null,uV.createElement(r.Provider,{...n,value:e.get(r)})),e=>uV.createElement(uX,{...e})),[e])}function uZ(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}e.s(["FiberProvider",0,uX,"traverseFiber",0,uG,"useContextBridge",0,uK,"useFiber",0,uq],46791),ol.act;let uJ=e=>null!=e&&("string"==typeof e||"number"==typeof e||e.isColor),uQ="u">typeof window&&((null==(m=window.document)?void 0:m.createElement)||(null==(g=window.navigator)?void 0:g.product)==="ReactNative")?ol.useLayoutEffect:ol.useEffect;function u0(e){let t=ol.useRef(e);return uQ(()=>void(t.current=e),[e]),t}let u1=((v=class extends ol.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}).getDerivedStateFromError=()=>({error:!0}),v);function u2(e){var t;let r="u">typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],r),e[1]):e}function u3(e){var t;return null==(t=e.__r3f)?void 0:t.root.getState()}let u4={obj:e=>e===Object(e)&&!u4.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,nul:e=>null===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:r="shallow",objects:n="reference",strict:i=!0}={}){let a;if(typeof e!=typeof t||!!e!=!!t)return!1;if(u4.str(e)||u4.num(e)||u4.boo(e))return e===t;let s=u4.obj(e);if(s&&"reference"===n)return e===t;let o=u4.arr(e);if(o&&"reference"===r)return e===t;if((o||s)&&e===t)return!0;for(a in e)if(!(a in t))return!1;if(s&&"shallow"===r&&"shallow"===n){for(a in i?t:e)if(!u4.equ(e[a],t[a],{strict:i,objects:"reference"}))return!1}else for(a in i?t:e)if(e[a]!==t[a])return!1;if(u4.und(a)){if(o&&0===e.length&&0===t.length||s&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;
382if(e!==t)return!1}return!0}},u5=["children","key","ref"];function u6(e,t,r,n){let i=null==e?void 0:e.__r3f;return!i&&(i={root:t,type:r,parent:null,children:[],props:function(e){let t={};for(let r in e)u5.includes(r)||(t[r]=e[r]);return t}(n),object:e,eventCount:0,handlers:{},isHidden:!1},e&&(e.__r3f=i)),i}function u8(e,t){if(!t.includes("-")||t in e)return{root:e,key:t,target:e[t]};let r=e,n=t.split("-");for(let i of n){if("object"!=typeof r||null===r){if(void 0!==r)return{root:r,key:n.slice(n.indexOf(i)).join("-"),target:void 0};return{root:e,key:t,target:void 0}}t=i,e=r,r=r[t]}return{root:e,key:t,target:r}}let u9=/-\d+$/;function u7(e,t){if(u4.str(t.props.attach)){if(u9.test(t.props.attach)){let r=t.props.attach.replace(u9,""),{root:n,key:i}=u8(e.object,r);Array.isArray(n[i])||(n[i]=[])}let{root:r,key:n}=u8(e.object,t.props.attach);t.previousAttach=r[n],r[n]=t.object}else u4.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function ce(e,t){if(u4.str(t.props.attach)){let{root:r,key:n}=u8(e.object,t.props.attach),i=t.previousAttach;void 0===i?delete r[n]:r[n]=i}else null==t.previousAttach||t.previousAttach(e.object,t.object);delete t.previousAttach}let ct=[...u5,"args","dispose","attach","object","onUpdate","dispose"],cr=new Map,cn=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],ci=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function ca(e,t){var r,n;let i=e.__r3f,a=i&&uZ(i).getState(),s=null==i?void 0:i.eventCount;for(let r in t){let s=t[r];if(ct.includes(r))continue;if(i&&ci.test(r)){"function"==typeof s?i.handlers[r]=s:delete i.handlers[r],i.eventCount=Object.keys(i.handlers).length;continue}if(void 0===s)continue;let{root:o,key:l,target:u}=u8(e,r);if(void 0===u&&("object"!=typeof o||null===o))throw Error(`R3F: Cannot set "${r}". Ensure it is an object before setting "${l}".`);if(u instanceof eR&&s instanceof eR)u.mask=s.mask;else if(u instanceof e2&&uJ(s))u.set(s);else if(null!==u&&"object"==typeof u&&"function"==typeof u.set&&"function"==typeof u.copy&&null!=s&&s.constructor&&u.constructor===s.constructor)u.copy(s);else if(null!==u&&"object"==typeof u&&"function"==typeof u.set&&Array.isArray(s))"function"==typeof u.fromArray?u.fromArray(s):u.set(...s);else if(null!==u&&"object"==typeof u&&"function"==typeof u.set&&"number"==typeof s)"function"==typeof u.setScalar?u.setScalar(s):u.set(s);else if(o instanceof ae&&"uniforms"===l&&u4.obj(s)){u4.obj(o.uniforms)||(o.uniforms={});let e=o.uniforms;for(let t in s){let r=s[t],n=e[t];n?Object.assign(n,r):e[t]={...r}}}else o[l]=s,a&&!a.linear&&cn.includes(l)&&null!=(n=o[l])&&n.isTexture&&1023===o[l].format&&1009===o[l].type&&(o[l].colorSpace=_)}if(null!=i&&i.parent&&null!=a&&a.internal&&null!=(r=i.object)&&r.isObject3D&&s!==i.eventCount){let e=i.object,t=a.internal.interaction.indexOf(e);t>-1&&a.internal.interaction.splice(t,1),i.eventCount&&null!==e.raycast&&a.internal.interaction.push(e)}return i&&void 0===i.props.attach&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&cs(i),e}function cs(e){var t;if(!e.parent)return;null==e.props.onUpdate||e.props.onUpdate(e.object);let r=null==(t=e.root)||null==t.getState?void 0:t.getState();r&&0===r.internal.frames&&r.invalidate()}let co=e=>null==e?void 0:e.isObject3D;function cl(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function cu(e,t,r,n){let i=r.get(t);i&&(r.delete(t),0===r.size&&(e.delete(n),i.target.releasePointerCapture(n)))}let cc=e=>!!(null!=e&&e.render),cd=ol.createContext(null);function ch(){let e=ol.useContext(cd);if(!e)throw Error("R3F: Hooks can only be used within the Canvas component!");return e}function cf(e=e=>e,t){return ch()(e,t)}function cp(e,t=0){let r=ch(),n=r.getState().internal.subscribe,i=u0(e);return uQ(()=>n(i,t,r),[t,n,r]),null}let cm=new WeakMap;function cg(e,t){return function(r,...n){var i;let a;return"function"==typeof r&&(null==r||null==(i=r.prototype)?void 0:i.constructor)===r?(a=cm.get(r))||(a=new r,cm.set(r,a)):a=r,e&&e(a),Promise.all(n.map(e=>new Promise((r,n)=>a.load(e,e=>{var t;let n;co(null==e?void 0:e.scene)&&Object.assign(e,(t=e.scene,n={nodes:{},materials:{},meshes:{}},t&&t.traverse(e=>{e.name&&(n.nodes[e.name]=e),e.material&&!n.materials[e.material.name]&&(n.materials[e.material.name]=e.material),e.isMesh&&!n.meshes[e.name]&&(n.meshes[e.name]=e)}),n)),r(e)},t,t=>n(Error(`Could not load ${e}: ${null==t?void 0:t.message}`))))))}}function cv(e,t,r,n){let i=Array.isArray(t)?t:[t],a=uz(cg(r,n),[e,...i],!1,{equal:u4.equ});return Array.isArray(t)?a:a[0]}cv.preload=function(e,t,r){let n=Array.isArray(t)?t:[t];uz(cg(r),[e,...n],!0,void 0)},cv.clear=function(e,t){var r=[e,...Array.isArray(t)?t:[t]];if(void 0===r||0===r.length)uU.splice(0,uU.length);else{let e=uU.find(e=>uF(r,e.keys,e.equal));e&&e.remove()}};var cy={exports:{}},cx={exports:{}};cx.exports;let cb=(iv||(iv=1,ig||(ig=1,cx.exports=function(e){function t(e,t,r,n){return new nX(e,t,r,n)}function r(){}function n(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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."}function i(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do(4098&(t=e).flags)!=0&&(r=t.return),e=t.return;while(e)}return 3===t.tag?r:null}function a(e){if(i(e)!==e)throw Error(n(188))}function s(e){var t=e.alternate;if(!t){if(null===(t=i(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,s=t;;){var o=r.return;if(null===o)break;var l=o.alternate;if(null===l){if(null!==(s=o.return)){r=s;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===r)return a(o),e;if(l===s)return a(o),t;l=l.sibling}throw Error(n(188))}if(r.return!==s.return)r=o,s=l;else{for(var u=!1,c=o.child;c;){if(c===r){u=!0,r=o,s=l;break}if(c===s){u=!0,s=o,r=l;break}c=c.sibling}if(!u){for(c=l.child;c;){if(c===r){u=!0,r=l,s=o;break}if(c===s){u=!0,s=l,r=o;break}c=c.sibling}if(!u)throw Error(n(189))}}if(r.alternate!==s)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}function o(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=iy&&e[iy]||e["@@iterator"])?e:null}function l(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===ix?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ia:return"Fragment";case io:return"Profiler";case is:return"StrictMode";case id:return"Suspense";case ih:return"SuspenseList";case ig:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case ii:return"Portal";case iu:return e.displayName||"Context";case il:return(e._context.displayName||"Context")+".Consumer";case ic:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ip:return null!==(t=e.displayName||null)?t:l(e.type)||"Memo";case im:t=e._payload,e=e._init;try{return l(e(t))}catch{}}return null}function u(e){return{current:e}}function c(e){0>
382sS||(e.current=s_[sS],s_[sS]=null,sS--)}function d(e,t){s_[++sS]=e.current,e.current=t}function h(e){var t=42&e;if(0!==t)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function f(e,t,r){var n=e.pendingLanes;if(0===n)return 0;var i=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=0x7ffffff&n;return 0!==o?0!=(n=o&~a)?i=h(n):0!=(s&=o)?i=h(s):r||0!=(r=o&~e)&&(i=h(r)):0!=(o=n&~a)?i=h(o):0!==s?i=h(s):r||0!=(r=n&~e)&&(i=h(r)),0===i?0:0!==t&&t!==i&&(t&a)==0&&((a=i&-i)>=(r=t&-t)||32===a&&(4194048&r)!=0)?t:i}function p(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)==0}function m(){var e=sP;return(0x3c00000&(sP<<=1))==0&&(sP=4194304),e}function g(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function v(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function y(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-sM(t);e.entangledLanes|=t,e.entanglements[n]=0x40000000|e.entanglements[n]|261930&r}function x(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-sM(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}function b(e,t){var r=t&-t;return((r=(42&r)!=0?1:_(r))&(e.suspendedLanes|t))!=0?0:r}function _(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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 0x1000000:case 0x2000000:e=128;break;case 0x10000000:e=0x8000000;break;default:e=0}return e}function S(e){return 2<(e&=-e)?8<e?(0x7ffffff&e)!=0?32:0x10000000:8:2}function w(e){if("function"==typeof sz&&sj(e),sV&&"function"==typeof sV.setStrictMode)try{sV.setStrictMode(sB,e)}catch{}}function M(e){if(void 0===a8)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);a8=t&&t[1]||"",a9=-1<e.stack.indexOf(` 383 at`)?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return` 384`+a8+e+a9}function T(e,t){if(!e||sX)return"";sX=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var r=function(){throw Error()};if(Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(r,[])}catch(e){var n=e}Reflect.construct(e,[],r)}else{try{r.call()}catch(e){n=e}e.call(r.prototype)}}else{try{throw Error()}catch(e){n=e}(r=e())&&"function"==typeof r.catch&&r.catch(function(){})}}catch(e){if(e&&n&&"string"==typeof e.stack)return[e.stack,n.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=n.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split(` 385`),u=o.split(` 386`);for(i=n=0;n<l.length&&!l[n].includes("DetermineComponentFrameRoot");)n++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(n===l.length||i===u.length)for(n=l.length-1,i=u.length-1;1<=n&&0<=i&&l[n]!==u[i];)i--;for(;1<=n&&0<=i;n--,i--)if(l[n]!==u[i]){if(1!==n||1!==i)do if(n--,i--,0>i||l[n]!==u[i]){var c=` 387`+l[n].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=n&&0<=i)break}}}finally{sX=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?M(r):""}function E(e){try{var t="",r=null;do t+=function(e,t){switch(e.tag){case 26:case 27:case 5:return M(e.type);case 16:return M("Lazy");case 13:return e.child!==t&&null!==t?M("Suspense Fallback"):M("Suspense");case 19:return M("SuspenseList");case 0:case 15:return T(e.type,!1);case 11:return T(e.type.render,!1);case 1:return T(e.type,!0);case 31:return M("Activity");default:return""}}(e,r),r=e,e=e.return;while(e)return t}catch(e){return` 388Error generating stack: `+e.message+` 389`+e.stack}}function A(e,t){if("object"==typeof e&&null!==e){var r=sq.get(e);return void 0!==r?r:(t={value:e,source:t,stack:E(t)},sq.set(e,t),t)}return{value:e,source:t,stack:E(t)}}function C(e,t){sY[s$++]=sZ,sY[s$++]=sK,sK=e,sZ=t}function P(e,t,r){sJ[sQ++]=s1,sJ[sQ++]=s2,sJ[sQ++]=s0,s0=e;var n=s1;e=s2;var i=32-sM(n)-1;n&=~(1<<i),r+=1;var a=32-sM(t)+i;if(30<a){var s=i-i%5;a=(n&(1<<s)-1).toString(32),n>>=s,i-=s,s1=1<<32-sM(t)+i|r<<i|n,s2=a+e}else s1=1<<a|r<<i|n,s2=e}
389function I(e){null!==e.return&&(C(e,1),P(e,1,0))}function O(e){for(;e===sK;)sK=sY[--s$],sY[s$]=null,sZ=sY[--s$],sY[s$]=null;for(;e===s0;)s0=sJ[--sQ],sJ[sQ]=null,s2=sJ[--sQ],sJ[sQ]=null,s1=sJ[--sQ],sJ[sQ]=null}function R(e,t){sJ[sQ++]=s1,sJ[sQ++]=s2,sJ[sQ++]=s0,s1=t.id,s2=t.overflow,s0=e}function L(e,t){d(s5,t),d(s4,e),d(s3,null),e=iE(t),c(s3),d(s3,e)}function N(){c(s3),c(s4),c(s5)}function D(e){null!==e.memoizedState&&d(s6,e);var t=s3.current,r=iA(t,e.type);t!==r&&(d(s4,e),d(s3,r))}function k(e){s4.current===e&&(c(s3),c(s4)),s6.current===e&&(c(s6),iF?i3._currentValue=i2:i3._currentValue2=i2)}function U(e){var t=Error(n(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML",""));throw G(A(t,e)),or}function F(e,t){if(!iB)throw Error(n(175));aH(e.stateNode,e.type,e.memoizedProps,t,e)||U(e,!0)}function z(e){for(s8=e.return;s8;)switch(s8.tag){case 5:case 31:case 13:ot=!1;return;case 27:case 3:ot=!0;return;default:s8=s8.return}}function j(e){if(!iB||e!==s8)return!1;if(!s7)return z(e),s7=!0,!1;var t=e.tag;if(sm?3!==t&&27!==t&&(5!==t||a6(e.type)&&!iL(e.type,e.memoizedProps))&&s9&&U(e):3!==t&&(5!==t||a6(e.type)&&!iL(e.type,e.memoizedProps))&&s9&&U(e),z(e),13===t){if(!iB)throw Error(n(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));s9=a$(e)}else if(31===t){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));s9=aY(e)}else s9=sm&&27===t?aN(e.type,s9):s8?aL(e.stateNode):null;return!0}function B(){iB&&(s9=s8=null,s7=!1)}function V(){var e=oe;return null!==e&&(null===lR?lR=e:lR.push.apply(lR,e),oe=null),e}function G(e){null===oe?oe=[e]:oe.push(e)}function H(e,t,r){iF?(d(on,t._currentValue),t._currentValue=r):(d(on,t._currentValue2),t._currentValue2=r)}function W(e){var t=on.current;iF?e._currentValue=t:e._currentValue2=t,c(on)}function X(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function q(e,t,r,i){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var s=a.dependencies;if(null!==s){var o=a.child;s=s.firstContext;l:for(;null!==s;){var l=s;s=a;for(var u=0;u<t.length;u++)if(l.context===t[u]){s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),X(s.return,r,e),i||(o=null);break l}s=l.next}}else if(18===a.tag){if(null===(o=a.return))throw Error(n(341));o.lanes|=r,null!==(s=o.alternate)&&(s.lanes|=r),X(o,r,e),o=null}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===e){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}}function Y(e,t,r,i){e=null;for(var a=t,s=!1;null!==a;){if(!s){if((524288&a.flags)!=0)s=!0;else if((262144&a.flags)!=0)break}if(10===a.tag){var o=a.alternate;if(null===o)throw Error(n(387));if(null!==(o=o.memoizedProps)){var l=a.type;sG(a.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(a===s6.current){if(null===(o=a.alternate))throw Error(n(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(i3):e=[i3])}a=a.return}null!==e&&q(t,e,r,i),t.flags|=262144}function $(e){for(e=e.firstContext;null!==e;){var t=e.context;
389if(!sG(iF?t._currentValue:t._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}function K(e){oi=e,oa=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Z(e){return Q(oi,e)}function J(e,t){return null===oi&&K(e),Q(e,t)}function Q(e,t){var r=iF?t._currentValue:t._currentValue2;if(t={context:t,memoizedValue:r,next:null},null===oa){if(null===e)throw Error(n(308));oa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else oa=oa.next=t;return r}function ee(){return{controller:new os,data:new Map,refCount:0}}function et(e){e.refCount--,0===e.refCount&&ou(oc,function(){e.controller.abort()})}function er(){}function en(e){e!==of&&null===e.next&&(null===of?oh=of=e:of=of.next=e),om=!0,op||(op=!0,i5?i6(function(){(6&lm)!=0?sI(sD,ea):es()}):sI(sD,ea))}function ei(e,t){if(!og&&om){og=!0;do for(var r=!1,n=oh;null!==n;){if(!t)if(0!==e){var i=n.pendingLanes;if(0===i)var a=0;else{var s=n.suspendedLanes,o=n.pingedLanes;a=0xc000095&(a=(1<<31-sM(42|e)+1)-1&(i&~(s&~o)))?0xc000095&a|1:a?2|a:0}0!==a&&(r=!0,eu(n,a))}else a=ly,(3&(a=f(n,n===lg?a:0,null!==n.cancelPendingCommit||n.timeoutHandle!==iU)))==0||p(n,a)||(r=!0,eu(n,a));n=n.next}while(r)og=!1}}function ea(){es()}function es(){om=op=!1;var e=0;0!==ov&&iq()&&(e=ov);for(var t=sN(),r=null,n=oh;null!==n;){var i=n.next,a=eo(n,t);0===a?(n.next=null,null===r?oh=i:r.next=i,null===i&&(of=r)):(r=n,(0!==e||(3&a)!=0)&&(om=!0)),n=i}0!==lz&&5!==lz||ei(e,!1),0!==ov&&(ov=0)}function eo(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=-0x3c00001&e.pendingLanes;0<a;){var s=31-sM(a),o=1<<s,l=i[s];-1===l?((o&r)==0||(o&n)!=0)&&(i[s]=function(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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;default:return -1}}(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}if(t=lg,r=ly,r=f(e,e===t?r:0,null!==e.cancelPendingCommit||e.timeoutHandle!==iU),n=e.callbackNode,0===r||e===t&&(2===lx||9===lx)||null!==e.cancelPendingCommit)return null!==n&&null!==n&&sO(n),e.callbackNode=null,e.callbackPriority=0;if((3&r)==0||p(e,r)){if((t=r&-r)===e.callbackPriority)return t;switch(null!==n&&sO(n),S(r)){case 2:case 8:r=sk;break;case 32:default:r=sU;break;case 0x10000000:r=sF}return r=sI(r,n=el.bind(null,e)),e.callbackPriority=t,e.callbackNode=r,t}return null!==n&&null!==n&&sO(n),e.callbackPriority=2,e.callbackNode=null,2}function el(e,t){if(0!==lz&&5!==lz)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(nU()&&e.callbackNode!==r)return null;var n=ly;return 0===(n=f(e,e===lg?n:0,null!==e.cancelPendingCommit||e.timeoutHandle!==iU))?null:(nm(e,n,t),eo(e,sN()),null!=e.callbackNode&&e.callbackNode===r?el.bind(null,e):null)}function eu(e,t){if(nU())return null;nm(e,t,!0)}function ec(){if(0===ov){var e=ob;0===e&&(e=sA,(261888&(sA<<=1))==0&&(sA=256)),ov=e}return ov}function ed(){if(0==--ox&&null!==oy){null!==o_&&(o_.status="fulfilled");var e=oy;oy=null,ob=0,o_=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eh(){var e=ow.current;return null!==e?e:lg.pooledCache}function ef(e,t){null===t?d(ow,ow.current):d(ow,t.pool)}function ep(){var e=eh();return null===e?null:{parent:iF?od._currentValue:od._currentValue2,pool:e}}function em(e,t){if(sG(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!sW.call(t,i)||!sG(e[i],t[i]))return!1}return!0}function eg(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ev(e,t,r){switch(void 0===(r=e[r])?e.push(t):r!==t&&(t.then(er,er),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw eb(e=t.reason),e;default:if("string"==typeof t.status)t.then(er,er);else{if(null!==(e=lg)&&100<e.shellSuspendCounter)throw Error(n(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var r=t;r.status="fulfilled",r.value=e}},function(e){if("pending"===t.status){var r=t;r.status="rejected",r.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw eb(e=t.reason),e}throw oC=t,oM}}function ey(e){try{return(0,e._init)(e._payload)}catch(e){throw null!==e&&"object"==typeof e&&"function"==typeof e.then?(oC=e,oM):e}}function ex(){if(null===oC)throw Error(n(459));var e=oC;return oC=null,e}function eb(e){if(e===oM||e===oE)throw Error(n(483))}function e_(e){var t=oI;return oI+=1,null===oP&&(oP=[]),ev(oP,e,t)}function eS(e,t){e.ref=void 0!==(t=t.props.ref)?t:null}function ew(e,t){throw t.$$typeof===it?Error(n(525)):Error(n(31,"[object Object]"===(e=Object.prototype.toString.call(t))?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function eM(e){function r(t,r){if(e){var n=t.deletions;null===n?(t.deletions=[r],t.flags|=16):n.push(r)}}function i(t,n){if(!e)return null;for(;null!==n;)r(t,n),n=n.sibling;return null}function a(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function s(e,t){return(e=nY(e,t)).index=0,e.sibling=null,e}function l(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.flags|=0x4000002,r):n:(t.flags|=0x4000002,r):(t.flags|=1048576,r)}function u(t){return e&&null===t.alternate&&(t.flags|=0x4000002),t}function c(e,t,r,n){return null===t||6!==t.tag?(t=nJ(r,e.mode,n)).return=e:(t=s(t,r)).return=e,t}function d(e,t,r,n){var i=r.type;return i===ia?f(e,t,r.props.children,n,r.key):(null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===im&&ey(i)===t.type)?eS(t=s(t,r.props),r):eS(t=nK(r.type,r.key,r.props,null,e.mode,n),r),t.return=e,t)}function h(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?(t=n0(r,e.mode,n)).return=e:(t=s(t,r.children||[])).return=e,t}function f(e,t,r,n,i){return null===t||7!==t.tag?(t=nZ(r,e.mode,n,i)
vendor: 4,342 bytes, line 389
389).return=e:(t=s(t,r)).return=e,t}function p(e,t,r){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=nJ(""+t,e.mode,r)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ir:return eS(r=nK(t.type,t.key,t.props,null,e.mode,r),t),r.return=e,r;case ii:return(t=n0(t,e.mode,r)).return=e,t;case im:return p(e,t=ey(t),r)}if(ib(t)||o(t))return(t=nZ(t,e.mode,r,null)).return=e,t;if("function"==typeof t.then)return p(e,e_(t),r);if(t.$$typeof===iu)return p(e,J(e,t),r);ew(e,t)}return null}function m(e,t,r,n){var i=null!==t?t.key:null;if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return null!==i?null:c(e,t,""+r,n);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ir:return r.key===i?d(e,t,r,n):null;case ii:return r.key===i?h(e,t,r,n):null;case im:return m(e,t,r=ey(r),n)}if(ib(r)||o(r))return null!==i?null:f(e,t,r,n,null);if("function"==typeof r.then)return m(e,t,e_(r),n);if(r.$$typeof===iu)return m(e,t,J(e,r),n);ew(e,r)}return null}function g(e,t,r,n,i){if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return c(t,e=e.get(r)||null,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ir:return d(t,e=e.get(null===n.key?r:n.key)||null,n,i);case ii:return h(t,e=e.get(null===n.key?r:n.key)||null,n,i);case im:return g(e,t,r,n=ey(n),i)}if(ib(n)||o(n))return f(t,e=e.get(r)||null,n,i,null);if("function"==typeof n.then)return g(e,t,r,e_(n),i);if(n.$$typeof===iu)return g(e,t,r,J(t,n),i);ew(t,n)}return null}return function(c,d,h,f){try{oI=0;var v=function t(c,d,h,f){if("object"==typeof h&&null!==h&&h.type===ia&&null===h.key&&(h=h.props.children),"object"==typeof h&&null!==h){switch(h.$$typeof){case ir:l:{for(var v=h.key;null!==d;){if(d.key===v){if((v=h.type)===ia){if(7===d.tag){i(c,d.sibling),(f=s(d,h.props.children)).return=c,c=f;break l}}else if(d.elementType===v||"object"==typeof v&&null!==v&&v.$$typeof===im&&ey(v)===d.type){i(c,d.sibling),eS(f=s(d,h.props),h),f.return=c,c=f;break l}i(c,d);break}r(c,d),d=d.sibling}h.type===ia?(f=nZ(h.props.children,c.mode,f,h.key)).return=c:(eS(f=nK(h.type,h.key,h.props,null,c.mode,f),h),f.return=c),c=f}return u(c);case ii:l:{for(v=h.key;null!==d;){if(d.key===v)if(4===d.tag&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){i(c,d.sibling),(f=s(d,h.children||[])).return=c,c=f;break l}else{i(c,d);break}r(c,d),d=d.sibling}(f=n0(h,c.mode,f)).return=c,c=f}return u(c);case im:return t(c,d,h=ey(h),f)}if(ib(h))return function(t,n,s,o){for(var u=null,c=null,d=n,h=n=0,f=null;null!==d&&h<s.length;h++){d.index>h?(f=d,d=null):f=d.sibling;var v=m(t,d,s[h],o);if(null===v){null===d&&(d=f);break}e&&d&&null===v.alternate&&r(t,d),n=l(v,n,h),null===c?u=v:c.sibling=v,c=v,d=f}if(h===s.length)return i(t,d),s7&&C(t,h),u;if(null===d){for(;h<s.length;h++)null!==(d=p(t,s[h],o))&&(n=l(d,n,h),null===c?u=d:c.sibling=d,c=d);return s7&&C(t,h),u}for(d=a(d);h<s.length;h++)null!==(f=g(d,t,h,s[h],o))&&(e&&null!==f.alternate&&d.delete(null===f.key?h:f.key),n=l(f,n,h),null===c?u=f:c.sibling=f,c=f);return e&&d.forEach(function(e){return r(t,e)}),s7&&C(t,h),u}(c,d,h,f);if(o(h)){if("function"!=typeof(v=o(h)))throw Error(n(150));return function(t,s,o,u){if(null==o)throw Error(n(151));for(var c=null,d=null,h=s,f=s=0,v=null,y=o.next();null!==h&&!y.done;f++,y=o.next()){h.index>f?(v=h,h=null):v=h.sibling;var x=m(t,h,y.value,u);if(null===x){null===h&&(h=v);break}e&&h&&null===x.alternate&&r(t,h),s=l(x,s,f),null===d?c=x:d.sibling=x,d=x,h=v}if(y.done)return i(t,h),s7&&C(t,f),c;if(null===h){for(;!y.done;f++,y=o.next())null!==(y=p(t,y.value,u))&&(s=l(y,s,f),null===d?c=y:d.sibling=y,d=y);return s7&&C(t,f),c}for(h=a(h);!y.done;f++,y=o.next())null!==(y=g(h,t,f,y.value,u))&&(e&&null!==y.alternate&&h.delete(null===y.key?f:y.key),s=l(y,s,f),null===d?c=y:d.sibling=y,d=y);return e&&h.forEach(function(e){return r(t,e)}),s7&&C(t,f),c}(c,d,h=v.call(h),f)}if("function"==typeof h.then)return t(c,d,e_(h),f);if(h.$$typeof===iu)return t(c,d,J(c,h),f);ew(c,h)}return"string"==typeof h&&""!==h||"number"==typeof h||"bigint"==typeof h?(h=""+h,null!==d&&6===d.tag?(i(c,d.sibling),(f=s(d,h)).return=c):(i(c,d),(f=nJ(h,c.mode,f)).return=c),u(c=f)):i(c,d)}(c,d,h,f);return oP=null,v}catch(e){if(e===oM||e===oE)throw e;var y=t(29,e,null,c.mode);return y.lanes=f,y.return=c,y}finally{}}}
vendor: 5,289 bytes, line 389
389function eT(){for(var e=oN,t=oD=oN=0;t<e;){var r=oL[t];oL[t++]=null;var n=oL[t];oL[t++]=null;var i=oL[t];oL[t++]=null;var a=oL[t];if(oL[t++]=null,null!==n&&null!==i){var s=n.pending;null===s?i.next=i:(i.next=s.next,s.next=i),n.pending=i}0!==a&&eP(r,i,a)}}function eE(e,t,r,n){oL[oN++]=e,oL[oN++]=t,oL[oN++]=r,oL[oN++]=n,oD|=n,e.lanes|=n,null!==(e=e.alternate)&&(e.lanes|=n)}function eA(e,t,r,n){return eE(e,t,r,n),eI(e)}function eC(e,t){return eE(e,null,null,t),eI(e)}function eP(e,t,r){e.lanes|=r;var n=e.alternate;null!==n&&(n.lanes|=r);for(var i=!1,a=e.return;null!==a;)a.childLanes|=r,null!==(n=a.alternate)&&(n.childLanes|=r),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,i&&null!==t&&(i=31-sM(r),null===(n=(e=a.hiddenUpdates)[i])?e[i]=[t]:n.push(t),t.lane=0x20000000|r),a):null}function eI(e){if(50<lX)throw lX=0,lq=null,Error(n(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}function eO(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eR(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function eL(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function eN(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,(2&lm)!=0){var i=n.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=eI(e),eP(e,null,r),t}return eE(e,n,t,r),eI(e)}function eD(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,(4194048&r)!=0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,x(e,r)}}function ek(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,a=null;if(null!==(r=r.firstBaseUpdate)){do{var s={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};null===a?i=a=s:a=a.next=s,r=r.next}while(null!==r)null===a?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,callbacks:n.callbacks},e.updateQueue=r;return}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function eU(){if(oU){var e=o_;if(null!==e)throw e}}function eF(e,t,r,n){oU=!1;var i=e.updateQueue;ok=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,u=l.next;l.next=null,null===s?a=u:s.next=u,s=l;var c=e.alternate;null!==c&&(o=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===o?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l)}if(null!==a){var d=i.baseState;for(s=0,c=u=l=null,o=a;;){var h=-0x20000001&o.lane,f=h!==o.lane;if(f?(ly&h)===h:(n&h)===h){0!==h&&h===ob&&(oU=!0),null!==c&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});l:{var p=e,m=o;switch(h=t,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(r,d,h);break l}d=p;break l;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(r,d,h):p))break l;d=ie({},d,h);break l;case 2:ok=!0}}null!==(h=o.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=i.callbacks)?i.callbacks=[h]:f.push(h))}else f={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(u=c=f,l=d):c=c.next=f,s|=h;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(f=o).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null===a&&(i.shared.lanes=0),lE|=s,e.lanes=s,e.memoizedState=d}}function ez(e,t){if("function"!=typeof e)throw Error(n(191,e));e.call(t)}function ej(e,t){var r=e.callbacks;if(null!==r)for(e.callbacks=null,e=0;e<r.length;e++)ez(r[e],t)}function eB(e,t){d(oz,e=lM),d(oF,t),lM=e|t.baseLanes}function eV(){d(oz,lM),d(oF,oF.current)}function eG(){lM=oz.current,c(oF),c(oz)}function eH(e){var t=e.alternate;d(oV,1&oV.current),d(oj,e),null===oB&&(null===t||null!==oF.current||null!==t.memoizedState)&&(oB=e)}function eW(e){d(oV,oV.current),d(oj,e),null===oB&&(oB=e)}function eX(e){22===e.tag?(d(oV,oV.current),d(oj,e),null===oB&&(oB=e)):eq()}function eq(){d(oV,oV.current),d(oj,oj.current)}function eY(e){c(oj),oB===e&&(oB=null),c(oV)}function e$(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||aA(r)||aC(r)))return t}else if(19===t.tag&&("forwards"===t.memoizedProps.revealOrder||"backwards"===t.memoizedProps.revealOrder||"unstable_legacy-backwards"===t.memoizedProps.revealOrder||"together"===t.memoizedProps.revealOrder)){if((128&t.flags)!=0)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function eK(){throw Error(n(321))}function eZ(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!sG(e[r],t[r]))return!1;return!0}function eJ(e,t,r,n,i,a){return oG=a,oH=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,i_.H=null===e||null===e.memoizedState?o1:o2,o$=!1,a=r(n,i),o$=!1,oY&&(a=e0(t,r,n,i)),eQ(e),a}function eQ(e){i_.H=o0;var t=null!==oW&&null!==oW.next;if(oG=0,oX=oW=oH=null,oq=!1,oZ=0,oJ=null,t)throw Error(n(300));
389null===e||o6||null!==(e=e.dependencies)&&$(e)&&(o6=!0)}function e0(e,t,r,i){oH=e;var a=0;do{if(oY&&(oJ=null),oZ=0,oY=!1,25<=a)throw Error(n(301));if(a+=1,oX=oW=null,null!=e.updateQueue){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,null!=s.memoCache&&(s.memoCache.index=0)}i_.H=o3,s=t(r,i)}while(oY)return s}function e1(){var e=i_.H,t=e.useState()[0];return t="function"==typeof t.then?e9(t):t,e=e.useState()[0],(null!==oW?oW.memoizedState:null)!==e&&(oH.flags|=1024),t}function e2(){var e=0!==oK;return oK=0,e}function e3(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function e4(e){if(oq){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}oq=!1}oG=0,oX=oW=oH=null,oY=!1,oZ=oK=0,oJ=null}function e5(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===oX?oH.memoizedState=oX=e:oX=oX.next=e,oX}function e6(){if(null===oW){var e=oH.alternate;e=null!==e?e.memoizedState:null}else e=oW.next;var t=null===oX?oH.memoizedState:oX.next;if(null!==t)oX=t,oW=e;else{if(null===e)throw null===oH.alternate?Error(n(467)):Error(n(310));e={memoizedState:(oW=e).memoizedState,baseState:oW.baseState,baseQueue:oW.baseQueue,queue:oW.queue,next:null},null===oX?oH.memoizedState=oX=e:oX=oX.next=e}return oX}function e8(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function e9(e){var t=oZ;return oZ+=1,null===oJ&&(oJ=[]),e=ev(oJ,e,t),t=oH,(null===oX?t.memoizedState:oX.next)===null&&(i_.H=null===(t=t.alternate)||null===t.memoizedState?o1:o2),e}function e7(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return e9(e);if(e.$$typeof===iu)return Z(e)}throw Error(n(438,String(e)))}function te(e){var t=null,r=oH.updateQueue;if(null!==r&&(t=r.memoCache),null==t){var n=oH.alternate;null!==n&&null!==(n=n.updateQueue)&&null!=(n=n.memoCache)&&(t={data:n.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===r&&(r=e8(),oH.updateQueue=r),r.memoCache=t,void 0===(r=t.data[t.index]))for(r=t.data[t.index]=Array(e),n=0;n<e;n++)r[n]=iv;return t.index++,r}function tt(e,t){return"function"==typeof t?t(e):t}function tr(e){return tn(e6(),oW,e)}function tn(e,t,r){var i=e.queue;if(null===i)throw Error(n(311));i.lastRenderedReducer=r;var a=e.baseQueue,s=i.pending;if(null!==s){if(null!==a){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,i.pending=null}if(s=e.baseState,null===a)e.memoizedState=s;else{t=a.next;var l=o=null,u=null,c=t,d=!1;do{var h=-0x20000001&c.lane;if(h!==c.lane?(ly&h)===h:(oG&h)===h){var f=c.revertLane;if(0===f)null!==u&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===ob&&(d=!0);else if((oG&f)===f){c=c.next,f===ob&&(d=!0);continue}else h={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=h,o=s):u=u.next=h,oH.lanes|=f,lE|=f;h=c.action,o$&&r(s,h),s=c.hasEagerState?c.eagerState:r(s,h)}else f={lane:h,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=f,o=s):u=u.next=f,oH.lanes|=h,lE|=h;c=c.next}while(null!==c&&c!==t)if(null===u?o=s:u.next=l,!sG(s,e.memoizedState)&&(o6=!0,d&&null!==(r=o_)))throw r;e.memoizedState=s,e.baseState=o,e.baseQueue=u,i.lastRenderedState=s}return null===a&&(i.lanes=0),[e.memoizedState,i.dispatch]}function ti(e){var t=e6(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=r.dispatch,a=r.pending,s=t.memoizedState;if(null!==a){r.pending=null;var o=a=a.next;do s=e(s,o.action),o=o.next;while(o!==a)sG(s,t.memoizedState)||(o6=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),r.lastRenderedState=s}return[s,i]}function ta(e,t,r){var i=oH,a=e6(),s=s7;if(s){if(void 0===r)throw Error(n(407));r=r()}else r=t();var o=!sG((oW||a).memoizedState,r);if(o&&(a.memoizedState=r,o6=!0),a=a.queue,tI(tl.bind(null,i,a,e),[e]),a.getSnapshot!==t||o||null!==oX&&1&oX.memoizedState.tag){if(i.flags|=2048,tT(9,{destroy:void 0},to.bind(null,i,a,r,t),null),null===lg)throw Error(n(349));s||(127&oG)!=0||ts(i,t,r)}return r}function ts(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},null===(t=oH.updateQueue)?(t=e8(),oH.updateQueue=t,t.stores=[e]):null===(r=t.stores)?t.stores=[e]:r.push(e)}function to(e,t,r,n){t.value=r,t.getSnapshot=n,tu(t)&&tc(e)}function tl(e,t,r){return r(function(){tu(t)&&tc(e)})}function tu(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!sG(e,r)}catch{return!0}}function tc(e){var t=eC(e,2);null!==t&&np(t,e,2)}function td(e){var t=e5();if("function"==typeof e){var r=e;if(e=r(),o$){w(!0);try{r()}finally{w(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tt,lastRenderedState:e},t}function th(e,t,r,n){return e.baseState=r,tn(e,oW,"function"==typeof n?n:tt)}function tf(e,t,r,i,a){if(tZ(e))throw Error(n(485));if(null!==(e=t.action)){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){s.listeners.push(e)}};null!==i_.T?r(!0):s.isTransition=!1,i(s),null===(r=t.pending)?(s.next=t.pending=s,tp(t,s)):(s.next=r.next,t.pending=r.next=s)}}function tp(e,t){var r=t.action,n=t.payload,i=e.state;if(t.isTransition){var a=i_.T,s={};i_.T=s;try{var o=r(i,n),l=i_.S;null!==l&&l(s,o),tm(e,t,o)}catch(r){tv(e,t,r)}finally{null!==a&&null!==s.types&&(a.types=s.types),i_.T=a}}
389else try{a=r(i,n),tm(e,t,a)}catch(r){tv(e,t,r)}}function tm(e,t,r){null!==r&&"object"==typeof r&&"function"==typeof r.then?r.then(function(r){tg(e,t,r)},function(r){return tv(e,t,r)}):tg(e,t,r)}function tg(e,t,r){t.status="fulfilled",t.value=r,ty(t),e.state=r,null!==(t=e.pending)&&((r=t.next)===t?e.pending=null:(r=r.next,t.next=r,tp(e,r)))}function tv(e,t,r){var n=e.pending;if(e.pending=null,null!==n){n=n.next;do t.status="rejected",t.reason=r,ty(t),t=t.next;while(t!==n)}e.action=null}function ty(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function tx(e,t){return t}function tb(e,t){if(s7){var r=lg.formState;if(null!==r){l:{var n=oH;if(s7){if(s9){var i=aO(s9,ot);if(i){s9=aL(i),n=aR(i);break l}}U(n)}n=!1}n&&(t=r[0])}}(r=e5()).memoizedState=r.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tx,lastRenderedState:t},r.queue=n,r=tY.bind(null,oH,n),n.dispatch=r,n=td(!1);var a=tK.bind(null,oH,!1,n.queue);return n=e5(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,r=tf.bind(null,oH,i,a,r),i.dispatch=r,n.memoizedState=e,[t,r,!1]}function t_(e){return tS(e6(),oW,e)}function tS(e,t,r){if(t=tn(e,t,tx)[0],e=tr(tt)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var n=e9(t)}catch(e){throw e===oM?oE:e}else n=t;var i=(t=e6()).queue,a=i.dispatch;return r!==t.memoizedState&&(oH.flags|=2048,tT(9,{destroy:void 0},tw.bind(null,i,r),null)),[n,a,e]}function tw(e,t){e.action=t}function tM(e){var t=e6(),r=oW;if(null!==r)return tS(t,r,e);e6(),t=t.memoizedState;var n=(r=e6()).queue.dispatch;return r.memoizedState=e,[t,n,!1]}function tT(e,t,r,n){return e={tag:e,create:r,deps:n,inst:t,next:null},null===(t=oH.updateQueue)&&(t=e8(),oH.updateQueue=t),null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function tE(){return e6().memoizedState}function tA(e,t,r,n){var i=e5();oH.flags|=e,i.memoizedState=tT(1|t,{destroy:void 0},r,void 0===n?null:n)}function tC(e,t,r,n){var i=e6();n=void 0===n?null:n;var a=i.memoizedState.inst;null!==oW&&null!==n&&eZ(n,oW.memoizedState.deps)?i.memoizedState=tT(t,a,r,n):(oH.flags|=e,i.memoizedState=tT(1|t,a,r,n))}function tP(e,t){tA(8390656,8,e,t)}function tI(e,t){tC(2048,8,e,t)}function tO(e){var t=e6().memoizedState;return function(e){oH.flags|=4;var t=oH.updateQueue;if(null===t)t=e8(),oH.updateQueue=t,t.events=[e];else{var r=t.events;null===r?t.events=[e]:r.push(e)}}({ref:t,nextImpl:e}),function(){if((2&lm)!=0)throw Error(n(440));return t.impl.apply(void 0,arguments)}}function tR(e,t){return tC(4,2,e,t)}function tL(e,t){return tC(4,4,e,t)}function tN(e,t){if("function"==typeof t){var r=t(e=e());return function(){"function"==typeof r?r():t(null)}}if(null!=t)return t.current=e=e(),function(){t.current=null}}function tD(e,t,r){r=null!=r?r.concat([e]):null,tC(4,4,tN.bind(null,t,e),r)}function tk(){}function tU(e,t){var r=e6();t=void 0===t?null:t;var n=r.memoizedState;return null!==t&&eZ(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function tF(e,t){var r=e6();t=void 0===t?null:t;var n=r.memoizedState;if(null!==t&&eZ(t,n[1]))return n[0];if(n=e(),o$){w(!0);try{e()}finally{w(!1)}}return r.memoizedState=[n,t],n}function tz(e,t,r){return void 0===r||(0x40000000&oG)!=0&&(261930&ly)==0?e.memoizedState=t:(e.memoizedState=r,e=nf(),oH.lanes|=e,lE|=e,r)}function tj(e,t,r,n){return sG(r,t)?r:null!==oF.current?(sG(e=tz(e,r,n),t)||(o6=!0),e):(42&oG)==0||(0x40000000&oG)!=0&&(261930&ly)==0?(o6=!0,e.memoizedState=r):(e=nf(),oH.lanes|=e,lE|=e,t)}function tB(e,t,r,n,i){var a=iW();iH(0!==a&&8>a?a:8);var s=i_.T,o={};i_.T=o,tK(e,!1,t,r);try{var l=i(),u=i_.S;if(null!==u&&u(o,l),null!==l&&"object"==typeof l&&"function"==typeof l.then){var c,d,h=(c=[],d={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},l.then(function(){d.status="fulfilled",d.value=n;for(var e=0;e<c.length;e++)(0,c[e])(n)},function(e){for(d.status="rejected",d.reason=e,e=0;e<c.length;e++)(0,c[e])(void 0)}),d);t$(e,t,h,nh())}else t$(e,t,n,nh())}catch(r){t$(e,t,{then:function(){},status:"rejected",reason:r},nh())}finally{iH(a),null!==s&&null!==o.types&&(s.types=o.types),i_.T=s}}function tV(e){var t=e.memoizedState;if(null!==t)return t;var r={};return(t={memoizedState:i2,baseState:i2,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tt,lastRenderedState:i2},next:null}).next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tt,lastRenderedState:r},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function tG(){return Z(i3)}function tH(){return e6().memoizedState}function tW(){return e6().memoizedState}function tX(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var r=nh(),n=eN(t,e=eL(r),r);null!==n&&(np(n,t,r),eD(n,t,r)),t={cache:ee()},e.payload=t;return}t=t.return}}function tq(e,t,r){var n=nh();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},tZ(e)?tJ(t,r):null!==(r=eA(e,t,r,n))&&(np(r,e,n),tQ(r,t,n))}function tY(e,t,r){t$(e,t,r,nh())}function t$(e,t,r,n){var i={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(tZ(e))tJ(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,r);if(i.hasEagerState=!0,i.eagerState=o,sG(o,s))return eE(e,t,i,0),null===lg&&eT(),!1}catch{}finally{}if(null!==(r=eA(e,t,i,n)))return np(r,e,n),tQ(r,t,n),!0}return!1}function tK(e,t,r,i){if(i={lane:2,revertLane:ec(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null}
389,tZ(e)){if(t)throw Error(n(479))}else null!==(t=eA(e,r,i,2))&&np(t,e,2)}function tZ(e){var t=e.alternate;return e===oH||null!==t&&t===oH}function tJ(e,t){oY=oq=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function tQ(e,t,r){if((4194048&r)!=0){var n=t.lanes;n&=e.pendingLanes,t.lanes=r|=n,x(e,r)}}function t0(e,t,r,n){r=null==(r=r(n,t=e.memoizedState))?t:ie({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}function t1(e,t,r,n,i,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,a,s):!t.prototype||!t.prototype.isPureReactComponent||!em(r,n)||!em(i,a)}function t2(e,t,r,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&o4.enqueueReplaceState(t,t.state,null)}function t3(e,t){var r=t;if("ref"in t)for(var n in r={},t)"ref"!==n&&(r[n]=t[n]);if(e=e.defaultProps)for(var i in r===t&&(r=ie({},r)),e)void 0===r[i]&&(r[i]=e[i]);return r}function t4(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function t5(e,t,r){try{(0,e.onCaughtError)(r.value,{componentStack:r.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function t6(e,t,r){return(r=eL(r)).tag=3,r.payload={element:null},r.callback=function(){t4(e,t)},r}function t8(e){return(e=eL(e)).tag=3,e}function t9(e,t,r,n){var i=r.type.getDerivedStateFromError;if("function"==typeof i){var a=n.value;e.payload=function(){return i(a)},e.callback=function(){t5(t,r,n)}}var s=r.stateNode;null!==s&&"function"==typeof s.componentDidCatch&&(e.callback=function(){t5(t,r,n),"function"!=typeof i&&(null===lF?lF=new Set([this]):lF.add(this));var e=n.stack;this.componentDidCatch(n.value,{componentStack:null!==e?e:""})})}function t7(e,t,r,n){t.child=null===e?oR(t,null,r,n):oO(t,e.child,r,n)}function re(e,t,r,n,i){r=r.render;var a=t.ref;if("ref"in n){var s={};for(var o in n)"ref"!==o&&(s[o]=n[o])}else s=n;return K(t),n=eJ(e,t,r,s,a,i),o=e2(),null===e||o6?(s7&&o&&I(t),t.flags|=1,t7(e,t,n,i),t.child):(e3(e,t,i),rS(e,t,i))}function rt(e,t,r,n,i){if(null===e){var a=r.type;return"function"!=typeof a||nq(a)||void 0!==a.defaultProps||null!==r.compare?((e=nK(r.type,null,n,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,rr(e,t,a,n,i))}if(a=e.child,!rw(e,i)){var s=a.memoizedProps;if((r=null!==(r=r.compare)?r:em)(s,n)&&e.ref===t.ref)return rS(e,t,i)}return t.flags|=1,(e=nY(a,n)).ref=t.ref,e.return=t,t.child=e}function rr(e,t,r,n,i){if(null!==e){var a=e.memoizedProps;if(em(a,n)&&e.ref===t.ref)if(o6=!1,t.pendingProps=n=a,!rw(e,i))return t.lanes=e.lanes,rS(e,t,i);else(131072&e.flags)!=0&&(o6=!0)}return ru(e,t,r,n,i)}function rn(e,t,r,n){var i=n.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===n.mode){if((128&t.flags)!=0){if(a=null!==a?a.baseLanes|r:r,null!==e){for(n=t.child=e.child,i=0;null!==n;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~a}else n=0,t.child=null;return ra(e,t,a,r,n)}if((0x20000000&r)==0)return n=t.lanes=0x20000000,ra(e,t,null!==a?a.baseLanes|r:r,r,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&ef(t,null!==a?a.cachePool:null),null!==a?eB(t,a):eV(),eX(t)}else null!==a?(ef(t,a.cachePool),eB(t,a),eq(),t.memoizedState=null):(null!==e&&ef(t,null),eV(),eq());return t7(e,t,i,r),t.child}function ri(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ra(e,t,r,n,i){var a=eh();return t.memoizedState={baseLanes:r,cachePool:a=null===a?null:{parent:iF?od._currentValue:od._currentValue2,pool:a}},null!==e&&ef(t,null),eV(),eX(t),null!==e&&Y(e,t,n,!0),t.childLanes=i,null}function rs(e,t){return(t=rv({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function ro(e,t,r){return oO(t,e.child,null,r),e=rs(t,t.pendingProps),e.flags|=2,eY(t),t.memoizedState=null,e}function rl(e,t){var r=t.ref;if(null===r)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof r&&"object"!=typeof r)throw Error(n(284));(null===e||e.ref!==r)&&(t.flags|=4194816)}}function ru(e,t,r,n,i){return K(t),r=eJ(e,t,r,n,void 0,i),n=e2(),null===e||o6?(s7&&n&&I(t),t.flags|=1,t7(e,t,r,i),t.child):(e3(e,t,i),rS(e,t,i))}function rc(e,t,r,n,i,a){return K(t),t.updateQueue=null,r=e0(t,n,r,i),eQ(e),n=e2(),null===e||o6?(s7&&n&&I(t),t.flags|=1,t7(e,t,r,a),t.child):(e3(e,t,a),rS(e,t,a))}function rd(e,t,r,n,i){if(K(t),null===t.stateNode){var a=sw,s=r.contextType;"object"==typeof s&&null!==s&&(a=Z(s)),t.memoizedState=null!==(a=new r(n,a)).state&&void 0!==a.state?a.state:null,a.updater=o4,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=n,a.state=t.memoizedState,a.refs={}
389,eO(t),s=r.contextType,a.context="object"==typeof s&&null!==s?Z(s):sw,a.state=t.memoizedState,"function"==typeof(s=r.getDerivedStateFromProps)&&(t0(t,r,s,n),a.state=t.memoizedState),"function"==typeof r.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(s=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),s!==a.state&&o4.enqueueReplaceState(a,a.state,null),eF(t,n,a,i),eU(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!0}else if(null===e){a=t.stateNode;var o=t.memoizedProps,l=t3(r,o);a.props=l;var u=a.context,c=r.contextType;s=sw,"object"==typeof c&&null!==c&&(s=Z(c));var d=r.getDerivedStateFromProps;c="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,o=t.pendingProps!==o,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o||u!==s)&&t2(t,a,n,s),ok=!1;var h=t.memoizedState;a.state=h,eF(t,n,a,i),eU(),u=t.memoizedState,o||h!==u||ok?("function"==typeof d&&(t0(t,r,d,n),u=t.memoizedState),(l=ok||t1(t,r,l,n,h,u,s))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=s,n=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,eR(e,t),c=t3(r,s=t.memoizedProps),a.props=c,d=t.pendingProps,h=a.context,u=r.contextType,l=sw,"object"==typeof u&&null!==u&&(l=Z(u)),(u="function"==typeof(o=r.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&t2(t,a,n,l),ok=!1,h=t.memoizedState,a.state=h,eF(t,n,a,i),eU();var f=t.memoizedState;s!==d||h!==f||ok||null!==e&&null!==e.dependencies&&$(e.dependencies)?("function"==typeof o&&(t0(t,r,o,n),f=t.memoizedState),(c=ok||t1(t,r,c,n,h,f,l)||null!==e&&null!==e.dependencies&&$(e.dependencies))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(n,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=f),a.props=n,a.state=f,a.context=l,n=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return a=n,rl(e,t),n=(128&t.flags)!=0,a||n?(a=t.stateNode,r=n&&"function"!=typeof r.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&n?(t.child=oO(t,e.child,null,i),t.child=oO(t,null,r,i)):t7(e,t,r,i),t.memoizedState=a.state,e=t.child):e=rS(e,t,i),e}function rh(e,t,r,n){return B(),t.flags|=256,t7(e,t,r,n),t.child}function rf(e){return{baseLanes:e,cachePool:ep()}}function rp(e,t,r){return e=null!==e?e.childLanes&~r:0,t&&(e|=lP),e}function rm(e,t,r){var i,a=t.pendingProps,s=!1,o=(128&t.flags)!=0;if((i=o)||(i=(null===e||null!==e.memoizedState)&&(2&oV.current)!=0),i&&(s=!0,t.flags&=-129),i=(32&t.flags)!=0,t.flags&=-33,null===e){if(s7){if(s?eH(t):eq(),(e=s9)?null!==(e=aG(e,ot))&&(t.memoizedState={dehydrated:e,treeContext:null!==s0?{id:s1,overflow:s2}:null,retryLane:0x20000000,hydrationErrors:null},(r=nQ(e)).return=t,t.child=r,s8=t,s9=null):e=null,null===e)throw U(t);return aC(e)?t.lanes=32:t.lanes=0x20000000,null}var l=a.children;return a=a.fallback,s?(eq(),l=rv({mode:"hidden",children:l},s=t.mode),a=nZ(a,s,r,null),l.return=t,a.return=t,l.sibling=a,t.child=l,(a=t.child).memoizedState=rf(r),a.childLanes=rp(e,i,r),t.memoizedState=o8,ri(null,a)):(eH(t),rg(t,l))}var u=e.memoizedState;if(null!==u&&null!==(l=u.dehydrated)){if(o)256&t.flags?(eH(t),t.flags&=-257,t=ry(e,t,r)):null!==t.memoizedState?(eq(),t.child=e.child,t.flags|=128,t=null):(eq(),l=a.fallback,s=t.mode,a=rv({mode:"visible",children:a.children},s),l=nZ(l,s,r,null),l.flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,oO(t,e.child,null,r),(a=t.child).memoizedState=rf(r),a.childLanes=rp(e,i,r),t.memoizedState=o8,t=ri(null,a));else if(eH(t),aC(l))i=aP(l).digest,(a=Error(n(419))).stack="",a.digest=i,G({value:a,source:null,stack:null}),t=ry(e,t,r);else if(o6||Y(e,t,r,!1),i=(r&e.childLanes)!=0,o6||i){if(null!==(i=lg)&&0!==(a=b(i,r))&&a!==u.retryLane)throw u.retryLane=a,eC(e,a),np(i,e,a),o5;aA(l)||nT(),t=ry(e,t,r)}else aA(l)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,iB&&(s9=aF(l),s8=t,s7=!0,oe=null,ot=!1,null!==e&&R(t,e)),t=rg(t,a.children),t.flags|=4096);return t}return s?(eq(),l=a.fallback,s=t.mode,o=(u=e.child).sibling,(a=nY(u,{mode:"hidden",children:a.children})).subtreeFlags=0x3e00000&u.subtreeFlags,null!==o?l=nY(o,l):(l=nZ(l,s,r,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,ri(null,a),a=t.child,null===(l=e.child.memoizedState)?l=rf(r):(null!==(s=l.cachePool)?(u=iF?od._currentValue:od._currentValue2,s=s.parent!==u?{parent:u,pool:u}
389:s):s=ep(),l={baseLanes:l.baseLanes|r,cachePool:s}),a.memoizedState=l,a.childLanes=rp(e,i,r),t.memoizedState=o8,ri(e.child,a)):(eH(t),e=(r=e.child).sibling,(r=nY(r,{mode:"visible",children:a.children})).return=t,r.sibling=null,null!==e&&(null===(i=t.deletions)?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=r,t.memoizedState=null,r)}function rg(e,t){return(t=rv({mode:"visible",children:t},e.mode)).return=e,e.child=t}function rv(e,r){return(e=t(22,e,null,r)).lanes=0,e}function ry(e,t,r){return oO(t,e.child,null,r),e=rg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rx(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),X(e.return,t,r)}function rb(e,t,r,n,i,a){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i,treeForkCount:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i,s.treeForkCount=a)}function r_(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;n=n.children;var s=oV.current,o=(2&s)!=0;if(o?(s=1&s|2,t.flags|=128):s&=1,d(oV,s),t7(e,t,n,r),n=s7?sZ:0,!o&&null!==e&&(128&e.flags)!=0)l:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&rx(e,r,t);else if(19===e.tag)rx(e,r,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break l;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(r=t.child,i=null;null!==r;)null!==(e=r.alternate)&&null===e$(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),rb(t,!1,i,r,a,n);break;case"backwards":case"unstable_legacy-backwards":for(r=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===e$(e)){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}rb(t,!0,r,null,a,n);break;case"together":rb(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function rS(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),lE|=t.lanes,(r&t.childLanes)==0){if(null===e)return null;else if(Y(e,t,r,!1),(r&t.childLanes)==0)return null}if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=nY(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=nY(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function rw(e,t){return(e.lanes&t)!=0||!!(null!==(e=e.dependencies)&&$(e))}function rM(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps)o6=!0;else{if(!rw(e,r)&&(128&t.flags)==0)return o6=!1,function(e,t,r){switch(t.tag){case 3:L(t,t.stateNode.containerInfo),H(t,od,e.memoizedState.cache),B();break;case 27:case 5:D(t);break;case 4:L(t,t.stateNode.containerInfo);break;case 10:H(t,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,eW(t),null;break;case 13:var n=t.memoizedState;if(null!==n)return null!==n.dehydrated?(eH(t),t.flags|=128,null):(r&t.child.childLanes)!=0?rm(e,t,r):(eH(t),null!==(e=rS(e,t,r))?e.sibling:null);eH(t);break;case 19:var i=(128&e.flags)!=0;if((n=(r&t.childLanes)!=0)||(Y(e,t,r,!1),n=(r&t.childLanes)!=0),i){if(n)return r_(e,t,r);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),d(oV,oV.current),n)break;return null;case 22:return t.lanes=0,rn(e,t,r,t.pendingProps);case 24:H(t,od,e.memoizedState.cache)}return rS(e,t,r)}(e,t,r);o6=(131072&e.flags)!=0}else o6=!1,s7&&(1048576&t.flags)!=0&&P(t,sZ,t.index);switch(t.lanes=0,t.tag){case 16:l:{var i=t.pendingProps;if(e=ey(t.elementType),t.type=e,"function"==typeof e)nq(e)?(i=t3(e,i),t.tag=1,t=rd(null,t,e,i,r)):(t.tag=0,t=ru(null,t,e,i,r));else{if(null!=e){var a=e.$$typeof;if(a===ic){t.tag=11,t=re(null,t,e,i,r);break l}if(a===ip){t.tag=14,t=rt(null,t,e,i,r);break l}}throw Error(n(306,t=l(e)||e,""))}}return t;case 0:return ru(e,t,t.type,t.pendingProps,r);case 1:return a=t3(i=t.type,t.pendingProps),rd(e,t,i,a,r);case 3:l:{if(L(t,t.stateNode.containerInfo),null===e)throw Error(n(387));var s=t.pendingProps;i=(a=t.memoizedState).element,eR(e,t),eF(t,s,null,r);var o=t.memoizedState;if(H(t,od,s=o.cache),s!==a.cache&&q(t,[od],r,!0),eU(),s=o.element,iB&&a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=rh(e,t,s,r);break l}else if(s!==i){G(i=A(Error(n(424)),t)),t=rh(e,t,s,r);break l}else for(iB&&(s9=ak(t.stateNode.containerInfo),s8=t,s7=!0,oe=null,ot=!0),r=oR(t,null,s,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling;else{if(B(),s===i){t=rS(e,t,r);break l}t7(e,t,s,r)}t=t.child}return t;case 26:if(st)return rl(e,t),null===e?(r=si(t.type,null,t.pendingProps,null))?t.memoizedState=r:s7||(t.stateNode=sc(t.type,t.pendingProps,s5.current,t)):t.memoizedState=si(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:if(sm)return D(t),null===e&&sm&&s7&&(i=t.stateNode=sg(t.type,t.pendingProps,s5.current,s3.current,!1),s8=t,ot=!0,s9=az(t.type,i,s9)),t7(e,t,t.pendingProps.children,r),rl(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&s7&&(a7(t.type,t.pendingProps,s3.current),(a=i=s9)&&(null!==(i=aj(i,t.type,t.pendingProps,ot))?(t.stateNode=i,s8=t,s9=aD(i),ot=!1,a=!0):a=!1),a||U(t)),D(t),a=t.type,s=t.pendingProps,o=null!==e?e.memoizedProps:null,i=s.children,iL(a,s)?i=null:null!==o&&iL(a,o)&&(t.flags|=32),null!==t.memoizedState&&(a=eJ(e,t,e1,null,null,r),iF?i3._currentValue=a:i3._currentValue2=a),rl(e,t),t7(e,t,i,r),t.child;case 6:return null===e&&s7&&(se(t.pendingProps,s3.current),(e=r=s9)&&(null!==(r=aB(r,t.pendingProps,ot))?(t.stateNode=r,
389s8=t,s9=null,e=!0):e=!1),e||U(t)),null;case 13:return rm(e,t,r);case 4:return L(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=oO(t,null,i,r):t7(e,t,i,r),t.child;case 11:return re(e,t,t.type,t.pendingProps,r);case 7:return t7(e,t,t.pendingProps,r),t.child;case 8:case 12:return t7(e,t,t.pendingProps.children,r),t.child;case 10:return i=t.pendingProps,H(t,t.type,i.value),t7(e,t,i.children,r),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,K(t),i=i(a=Z(a)),t.flags|=1,t7(e,t,i,r),t.child;case 14:return rt(e,t,t.type,t.pendingProps,r);case 15:return rr(e,t,t.type,t.pendingProps,r);case 19:return r_(e,t,r);case 31:var u=e,c=t,h=r,f=c.pendingProps,p=(128&c.flags)!=0;if(c.flags&=-129,null===u){if(s7){if("hidden"===f.mode)return u=rs(c,f),c.lanes=0x20000000,ri(null,u);if(eW(c),(u=s9)?null!==(u=aV(u,ot))&&(c.memoizedState={dehydrated:u,treeContext:null!==s0?{id:s1,overflow:s2}:null,retryLane:0x20000000,hydrationErrors:null},(h=nQ(u)).return=c,c.child=h,s8=c,s9=null):u=null,null===u)throw U(c);return c.lanes=0x20000000,null}return rs(c,f)}var m=u.memoizedState;if(null!==m){var g=m.dehydrated;if(eW(c),p)if(256&c.flags)c.flags&=-257,c=ro(u,c,h);else if(null!==c.memoizedState)c.child=u.child,c.flags|=128,c=null;else throw Error(n(558));else if(o6||Y(u,c,h,!1),p=(h&u.childLanes)!=0,o6||p){if(null!==(f=lg)&&0!==(g=b(f,h))&&g!==m.retryLane)throw m.retryLane=g,eC(u,g),np(f,u,g),o5;nT(),c=ro(u,c,h)}else u=m.treeContext,iB&&(s9=aU(g),s8=c,s7=!0,oe=null,ot=!1,null!==u&&R(c,u)),c=rs(c,f),c.flags|=4096;return c}return(u=nY(u.child,{mode:f.mode,children:f.children})).ref=c.ref,c.child=u,u.return=c,u;case 22:return rn(e,t,r,t.pendingProps);case 24:return K(t),i=Z(od),null===e?(null===(a=eh())&&(a=lg,s=ee(),a.pooledCache=s,s.refCount++,null!==s&&(a.pooledCacheLanes|=r),a=s),t.memoizedState={parent:i,cache:a},eO(t),H(t,od,a)):((e.lanes&r)!=0&&(eR(e,t),eF(t,null,null,r),eU()),a=e.memoizedState,s=t.memoizedState,a.parent!==i?(a={parent:i,cache:i},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),H(t,od,i)):(H(t,od,i=s.cache),i!==a.cache&&q(t,[od],r,!0))),t7(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(n(156,t.tag))}function rT(e){e.flags|=4}function rE(e){ij&&(e.flags|=8)}function rA(e,t){if(null!==e&&e.child===t.child)return!1;if((16&t.flags)!=0)return!0;for(e=t.child;null!==e;){if((8218&e.flags)!=0||(8218&e.subtreeFlags)!=0)return!0;e=e.sibling}return!1}function rC(e,t,r,n){if(iz)for(r=t.child;null!==r;){if(5===r.tag||6===r.tag)iO(e,r.stateNode);else if(!(4===r.tag||sm&&27===r.tag)&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else if(ij)for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;r&&n&&(a=aT(a,i.type,i.memoizedProps)),iO(e,a)}else if(6===i.tag)a=i.stateNode,r&&n&&(a=aE(a,i.memoizedProps)),iO(e,a);else if(4!==i.tag){if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),rC(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function rP(e,t){if(ij&&rA(e,t)){var r=(e=t.stateNode).containerInfo,n=a_();(function e(t,r,n,i){var a=!1;if(ij)for(var s=r.child;null!==s;){if(5===s.tag){var o=s.stateNode;n&&i&&(o=aT(o,s.type,s.memoizedProps)),aS(t,o)}else if(6===s.tag)o=s.stateNode,n&&i&&(o=aE(o,s.memoizedProps)),aS(t,o);else if(4!==s.tag){if(22===s.tag&&null!==s.memoizedState)null!==(a=s.child)&&(a.return=s),e(t,s,!0,!0),a=!0;else if(null!==s.child){s.child.return=s,s=s.child;continue}}if(s===r)break;for(;null===s.sibling;){if(null===s.return||s.return===r)return a;s=s.return}s.sibling.return=s.return,s=s.sibling}return a})(n,t,!1,!1),e.pendingChildren=n,rT(t),aw(r,n)}}function rI(e,t,r,n){if(iz)e.memoizedProps!==n&&rT(t);else if(ij){var i=e.stateNode,a=e.memoizedProps;if((e=rA(e,t))||a!==n){var s=s3.current;(a=ab(i,r,a,n,!e,null))===i?t.stateNode=i:(rE(t),iR(a,r,n,s)&&rT(t),t.stateNode=a,e&&rC(a,t,!1,!1))}else t.stateNode=i}}function rO(e,t,r,n,i){if((32&e.mode)!=0&&(null===r?i$(t,n):iK(t,r,n))){if(e.flags|=0x1000000,(0x13ffff40&i)===i||iZ(t,n))if(iJ(e.stateNode,t,n))e.flags|=8192;else if(nS())e.flags|=8192;else throw oC=oA,oT}else e.flags&=-0x1000001}function rR(e,t){if(sh(t)){if(e.flags|=0x1000000,!sf(t))if(nS())e.flags|=8192;else throw oC=oA,oT}else e.flags&=-0x1000001}function rL(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?m():0x20000000,e.lanes|=t,lI|=t)}function rN(e,t){if(!s7)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function rD(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=0x3e00000&i.subtreeFlags,n|=0x3e00000&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function rk(e,t){switch(O(t),t.tag){case 3:W(od),N();break;case 26:case 27:case 5:k(t);break;case 4:N();break;case 31:null!==t.memoizedState&&eY(t);break;case 13:eY(t);break;case 19:c(oV);break;case 10:W(t.type);break;case 22:case 23:eY(t),eG(),null!==e&&c(ow);break;case 24:W(od)}}function rU(e,t){try{var r=t.updateQueue,n=null!==r?r.lastEffect:null;if(null!==n){var i=n.next;r=i;do{if((r.tag&e)===e){n=void 0;var a=r.create;r.inst.destroy=n=a()}r=r.next}
389while(r!==i)}}catch(e){nj(t,t.return,e)}}function rF(e,t,r){try{var n=t.updateQueue,i=null!==n?n.lastEffect:null;if(null!==i){var a=i.next;n=a;do{if((n.tag&e)===e){var s=n.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,i=t;try{o()}catch(e){nj(i,r,e)}}}n=n.next}while(n!==a)}}catch(e){nj(t,t.return,e)}}function rz(e){var t=e.updateQueue;if(null!==t){var r=e.stateNode;try{ej(t,r)}catch(t){nj(e,e.return,t)}}}function rj(e,t,r){r.props=t3(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(r){nj(e,t,r)}}function rB(e,t){try{var r=e.ref;if(null!==r){switch(e.tag){case 26:case 27:case 5:var n=iT(e.stateNode);break;default:n=e.stateNode}"function"==typeof r?e.refCleanup=r(n):r.current=n}}catch(r){nj(e,t,r)}}function rV(e,t){var r=e.ref,n=e.refCleanup;if(null!==r)if("function"==typeof n)try{n()}catch(r){nj(e,t,r)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof r)try{r(null)}catch(r){nj(e,t,r)}else r.current=null}function rG(e){var t=e.type,r=e.memoizedProps,n=e.stateNode;try{al(n,t,r,e)}catch(t){nj(e,e.return,t)}}function rH(e,t,r){try{au(e.stateNode,e.type,r,t,e)}catch(t){nj(e,e.return,t)}}function rW(e){return 5===e.tag||3===e.tag||!!st&&26===e.tag||!!sm&&27===e.tag&&sb(e.type)||4===e.tag}function rX(e){l:for(;;){for(;null===e.sibling;){if(null===e.return||rW(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(sm&&27===e.tag&&sb(e.type)||2&e.flags||null===e.child||4===e.tag)continue l;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function rq(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?ac(r,e,t):aa(r,e);else if(4!==n&&(sm&&27===n&&sb(e.type)&&(r=e.stateNode),null!==(e=e.child)))for(rq(e,t,r),e=e.sibling;null!==e;)rq(e,t,r),e=e.sibling}function rY(e,t,r){e=e.containerInfo;try{aM(e,r)}catch(e){nj(t,t.return,e)}}function r$(e){var t=e.stateNode,r=e.memoizedProps;try{sv(e.type,r,t,e)}catch(t){nj(e,e.return,t)}}function rK(e,t,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:r5(e,r),4&n&&rU(5,r);break;case 1:if(r5(e,r),4&n)if(e=r.stateNode,null===t)try{e.componentDidMount()}catch(e){nj(r,r.return,e)}else{var i=t3(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nj(r,r.return,e)}}64&n&&rz(r),512&n&&rB(r,r.return);break;case 3:if(r5(e,r),64&n&&null!==(n=r.updateQueue)){if(e=null,null!==r.child)switch(r.child.tag){case 27:case 5:e=iT(r.child.stateNode);break;case 1:e=r.child.stateNode}try{ej(n,e)}catch(e){nj(r,r.return,e)}}break;case 27:sm&&null===t&&4&n&&r$(r);case 26:case 5:if(r5(e,r),null===t){if(4&n)rG(r);else if(64&n){e=r.type,t=r.memoizedProps,i=r.stateNode;try{aK(i,e,t,r)}catch(e){nj(r,r.return,e)}}}512&n&&rB(r,r.return);break;case 12:default:r5(e,r);break;case 31:r5(e,r),4&n&&rQ(e,r);break;case 13:r5(e,r),4&n&&r0(e,r),64&n&&null!==(n=r.memoizedState)&&null!==(n=n.dehydrated)&&aI(n,r=nH.bind(null,r));break;case 22:if(!(n=null!==r.memoizedState||o9)){t=null!==t&&null!==t.memoizedState||o7,i=o9;var a=o7;o9=n,(o7=t)&&!a?function e(t,r,n){for(n=n&&(8772&r.subtreeFlags)!=0,r=r.child;null!==r;){var i=r.alternate,a=t,s=r,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(a,s,n),rU(4,s);break;case 1:if(e(a,s,n),"function"==typeof(a=(i=s).stateNode).componentDidMount)try{a.componentDidMount()}catch(e){nj(i,i.return,e)}if(null!==(a=(i=s).updateQueue)){var l=i.stateNode;try{var u=a.shared.hiddenCallbacks;if(null!==u)for(a.shared.hiddenCallbacks=null,a=0;a<u.length;a++)ez(u[a],l)}catch(e){nj(i,i.return,e)}}n&&64&o&&rz(s),rB(s,s.return);break;case 27:sm&&r$(s);case 26:case 5:e(a,s,n),n&&null===i&&4&o&&rG(s),rB(s,s.return);break;case 12:default:e(a,s,n);break;case 31:e(a,s,n),n&&4&o&&rQ(a,s);break;case 13:e(a,s,n),n&&4&o&&r0(a,s);break;case 22:null===s.memoizedState&&e(a,s,n),rB(s,s.return);case 30:}r=r.sibling}}(e,r,(8772&r.subtreeFlags)!=0):r5(e,r),o9=i,o7=a}case 30:}}function rZ(e,t,r){for(r=r.child;null!==r;)rJ(e,t,r),r=r.sibling}function rJ(e,t,r){if(sV&&"function"==typeof sV.onCommitFiberUnmount)try{sV.onCommitFiberUnmount(sB,r)}catch{}switch(r.tag){case 26:if(st){o7||rV(r,t),rZ(e,t,r),r.memoizedState?ss(r.memoizedState):r.stateNode&&su(r.stateNode);break}case 27:if(sm){o7||rV(r,t);var n=ln,i=li;sb(r.type)&&(ln=r.stateNode,li=!1),rZ(e,t,r),sy(r.stateNode),ln=n,li=i;break}case 5:o7||rV(r,t);case 6:if(iz){if(n=ln,i=li,ln=null,rZ(e,t,r),ln=n,li=i,null!==ln)if(li)try{af(ln,r.stateNode)}catch(e){nj(r,t,e)}else try{ah(ln,r.stateNode)}catch(e){nj(r,t,e)}}else rZ(e,t,r);break;case 18:iz&&null!==ln&&(li?a3(ln,r.stateNode):a2(ln,r.stateNode));break;case 4:iz?(n=ln,i=li,ln=r.stateNode.containerInfo,li=!0,rZ(e,t,r),ln=n,li=i):(ij&&rY(r.stateNode,r,a_()),rZ(e,t,r));break;case 0:case 11:case 14:case 15:rF(2,r,t),o7||rF(4,r,t),rZ(e,t,r);break;case 1:o7||(rV(r,t),"function"==typeof(n=r.stateNode).componentWillUnmount&&rj(r,t,n)),rZ(e,t,r);break;case 21:default:rZ(e,t,r);break;case 22:o7=(n=o7)||null!==r.memoizedState,rZ(e,t,r),o7=n}}function rQ(e,t){if(iB&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{aJ(e)}catch(e){nj(t,t.return,e)}}}function r0(e,t){if(iB&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{aQ(e)}catch(e){nj(t,t.return,e)}}function r1(e,t){var r=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new lt),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new lt),t;default:throw Error(n(435,e.tag))}}(e);t.forEach(function(t){if(!r.has(t)){r.add(t);var n=nW.bind(null,e,t);t.then(n,n)}})}function r2(e,t){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var a=r[i],s=e,o=t;if(iz){var l=o;l:for(;null!==l;){switch(l.tag){case 27:if(sm){if(sb(l.type)){ln=l.stateNode,li=!1;break l}break}case 5:ln=l.stateNode,li=!1;break l;case 3:case 4:ln=l.stateNode.containerInfo,li=!0;break l}l=l.return}if(null===ln)throw Error(n(160));rJ(s,o,a),ln=null,li=!1}else rJ(s,o,a);null!==(s=a.alternate)&&(s.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)r3(t,e),t=t.sibling}function r3(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:r2(t,e),r4(e),4&i&&(rF(3,e,e.return),rU(3,e),rF(5,e,e.return));break;case 1:r2(t,e),r4(e),512&i&&(o7||null===r||rV(r,r.return)),64&i&&o9&&null!==(e=e.updateQueue)&&null!==(i=e.callbacks)&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===r?i:r.concat(i));break;case 26:if(st){var a=la;if(r2(t,e),r4(e),512&i&&(o7||null===r||rV(r,r.return)),4&i){i=null!==r?r.memoizedState:null;var s=e.memoizedState;null===r?null===s?null===e.stateNode?e.stateNode=so(a,e.type,e.memoizedProps,e):sl(a,e.type,e.stateNode):e.stateNode=sa(a,s,e.memoizedProps):i!==s?(null===i?null!==r.stateNode&&su(r.stateNode):ss(i),null===s?sl(a,e.type,e.stateNode):sa(a,s,e.memoizedProps)):null===s&&null!==e.stateNode&&rH(e,e.memoizedProps,r.memoizedProps)}break}case 27:if(sm){r2(t,e),r4(e),512&i&&(o7||null===r||rV(r,r.return)),null!==r&&4&i&&rH(e,e.memoizedProps,r.memoizedProps);break}case 5:if(r2(t,e),r4(e),512&i&&(o7||null===r||rV(r,r.return)),iz){if(32&e.flags){a=e.stateNode;try{ap(a)}catch(t){nj(e,e.return,t)}}4&i&&null!=e.stateNode&&(a=e.memoizedProps,rH(e,a,null!==r?r.memoizedProps:a)),1024&i&&(le=!0)}else ij&&null!==e.alternate&&(e.alternate.stateNode=e.stateNode);break;case 6:if(r2(t,e),r4(e),4&i&&iz){if(null===e.stateNode)throw Error(n(162));i=e.memoizedProps,r=null!==r?r.memoizedProps:i,a=e.stateNode;try{ao(a,r,i)}catch(t){nj(e,e.return,t)}}break;case 3:if(st?(sd(),a=la,la=sn(t.containerInfo),r2(t,e),la=a):r2(t,e),r4(e),4&i){if(iz&&iB&&null!==r&&r.memoizedState.isDehydrated)try{aZ(t.containerInfo)}catch(t){nj(e,e.return,t)}if(ij){i=t.containerInfo,r=t.pendingChildren;try{aM(i,r)}catch(t){nj(e,e.return,t)}}}le&&(le=!1,function e(t){if(1024&t.subtreeFlags)for(t=t.child;null!==t;){var r=t;e(r),5===r.tag&&1024&r.flags&&i4(r.stateNode),t=t.sibling}}(e));break;case 4:st?(r=la,la=sn(e.stateNode.containerInfo),r2(t,e),r4(e),la=r):(r2(t,e),r4(e)),4&i&&ij&&rY(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:default:r2(t,e),r4(e);break;case 31:case 19:r2(t,e),r4(e),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,r1(e,i));break;case 13:r2(t,e),r4(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==r&&null!==r.memoizedState)&&(lN=sN()),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,r1(e,i));break;case 22:a=null!==e.memoizedState;var o=null!==r&&null!==r.memoizedState,l=o9,u=o7;if(o9=l||a,o7=u||o,r2(t,e),o7=u,o9=l,r4(e),8192&i&&((t=e.stateNode)._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===r||o||o9||o7||function e(t){for(t=t.child;null!==t;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:rF(4,r,r.return),e(r);break;case 1:rV(r,r.return);var n=r.stateNode;"function"==typeof n.componentWillUnmount&&rj(r,r.return,n),e(r);break;case 27:sm&&sy(r.stateNode);case 26:case 5:rV(r,r.return),e(r);break;case 22:null===r.memoizedState&&e(r);break;default:e(r)}
389t=t.sibling}}(e)),iz)){l:if(r=null,iz)for(t=e;;){if(5===t.tag||st&&26===t.tag){if(null===r){o=r=t;try{s=o.stateNode,a?am(s):av(o.stateNode,o.memoizedProps)}catch(e){nj(o,o.return,e)}}}else if(6===t.tag){if(null===r){o=t;try{var c=o.stateNode;a?ag(c):ay(c,o.memoizedProps)}catch(e){nj(o,o.return,e)}}}else if(18===t.tag){if(null===r){o=t;try{var d=o.stateNode;a?a4(d):a5(o.stateNode)}catch(e){nj(o,o.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break l;for(;null===t.sibling;){if(null===t.return||t.return===e)break l;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}}4&i&&null!==(i=e.updateQueue)&&null!==(r=i.retryQueue)&&(i.retryQueue=null,r1(e,r));case 30:case 21:}}function r4(e){var t=e.flags;if(2&t){try{for(var r,i=e.return;null!==i;){if(rW(i)){r=i;break}i=i.return}if(iz){if(null==r)throw Error(n(160));switch(r.tag){case 27:if(sm){var a=r.stateNode,s=rX(e);rq(e,s,a);break}case 5:var o=r.stateNode;32&r.flags&&(ap(o),r.flags&=-33);var l=rX(e);rq(e,l,o);break;case 3:case 4:var u=r.stateNode.containerInfo,c=rX(e);!function e(t,r,n){var i=t.tag;if(5===i||6===i)t=t.stateNode,r?ad(n,t,r):as(n,t);else if(4!==i&&(sm&&27===i&&sb(t.type)&&(n=t.stateNode,r=null),null!==(t=t.child)))for(e(t,r,n),t=t.sibling;null!==t;)e(t,r,n),t=t.sibling}(e,c,u);break;default:throw Error(n(161))}}}catch(t){nj(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function r5(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)rK(e,t.alternate,t),t=t.sibling}function r6(e,t){var r=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(r=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==r&&(null!=e&&e.refCount++,null!=r&&et(r))}function r8(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&et(e))}function r9(e,t,r,n){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)r7(e,t,r,n),t=t.sibling}function r7(e,t,r,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:r9(e,t,r,n),2048&i&&rU(9,t);break;case 1:case 31:case 13:default:r9(e,t,r,n);break;case 3:r9(e,t,r,n),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&et(e)));break;case 12:if(2048&i){r9(e,t,r,n),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;"function"==typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){nj(t,t.return,e)}}else r9(e,t,r,n);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,null!==t.memoizedState?2&a._visibility?r9(e,t,r,n):ne(e,t):2&a._visibility?r9(e,t,r,n):(a._visibility|=2,function e(t,r,n,i,a){for(a=a&&(10256&r.subtreeFlags)!=0,r=r.child;null!==r;){var s=r,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(t,s,n,i,a),rU(8,s);break;case 23:break;case 22:var l=s.stateNode;null!==s.memoizedState?2&l._visibility?e(t,s,n,i,a):ne(t,s):(l._visibility|=2,e(t,s,n,i,a)),a&&2048&o&&r6(s.alternate,s);break;case 24:e(t,s,n,i,a),a&&2048&o&&r8(s.alternate,s);break;default:e(t,s,n,i,a)}r=r.sibling}}(e,t,r,n,(10256&t.subtreeFlags)!=0)),2048&i&&r6(s,t);break;case 24:r9(e,t,r,n),2048&i&&r8(t.alternate,t)}}function ne(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var r=t,n=r.flags;switch(r.tag){case 22:ne(e,r),2048&n&&r6(r.alternate,r);break;case 24:ne(e,r),2048&n&&r8(r.alternate,r);break;default:ne(e,r)}t=t.sibling}}function nt(e,t,r){if(e.subtreeFlags&ls)for(e=e.child;null!==e;)nr(e,t,r),e=e.sibling}function nr(e,t,r){switch(e.tag){case 26:if(nt(e,t,r),e.flags&ls)if(null!==e.memoizedState)sp(r,la,e.memoizedState,e.memoizedProps);else{var n=e.stateNode,i=e.type;e=e.memoizedProps,((0x13ffff40&t)===t||iZ(i,e))&&i0(r,n,i,e)}break;case 5:nt(e,t,r),e.flags&ls&&(n=e.stateNode,i=e.type,e=e.memoizedProps,((0x13ffff40&t)===t||iZ(i,e))&&i0(r,n,i,e));break;case 3:case 4:st?(n=la,la=sn(e.stateNode.containerInfo),nt(e,t,r),la=n):nt(e,t,r);break;case 22:null===e.memoizedState&&(null!==(n=e.alternate)&&null!==n.memoizedState?(n=ls,ls=0x1000000,nt(e,t,r),ls=n):nt(e,t,r));break;default:nt(e,t,r)}}function nn(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(null!==e)}}function ni(e){var t=e.deletions;if((16&e.flags)!=0){if(null!==t)for(var r=0;r<t.length;r++){var n=t[r];lr=n,ns(n,e)}nn(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)na(e),e=e.sibling}function na(e){switch(e.tag){case 0:case 11:case 15:ni(e),2048&e.flags&&rF(9,e,e.return);break;case 3:case 12:default:ni(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,function e(t){var r=t.deletions;if((16&t.flags)!=0){if(null!==r)for(var n=0;n<r.length;n++){var i=r[n];lr=i,ns(i,t)}nn(t)}for(t=t.child;null!==t;){switch((r=t).tag){case 0:case 11:case 15:rF(8,r,r.return),e(r);break;case 22:2&(n=r.stateNode)._visibility&&(n._visibility&=-3,e(r));break;default:e(r)}
389t=t.sibling}}(e)):ni(e)}}function ns(e,t){for(;null!==lr;){var r=lr;switch(r.tag){case 0:case 11:case 15:rF(8,r,t);break;case 23:case 22:if(null!==r.memoizedState&&null!==r.memoizedState.cachePool){var n=r.memoizedState.cachePool.pool;null!=n&&n.refCount++}break;case 24:et(r.memoizedState.cache)}if(null!==(n=r.child))n.return=r,lr=n;else for(r=e;null!==lr;){var i=(n=lr).sibling,a=n.return;if(function e(t){var r=t.alternate;null!==r&&(t.alternate=null,e(r)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(r=t.stateNode)&&iY(r),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}(n),n===r){lr=null;break}if(null!==i){i.return=a,lr=i;break}lr=a}}}function no(e){var t=iV(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(n(364));return t}if(null===(e=i9(e)))throw Error(n(362));return e.stateNode.current}function nl(e,t){var r=e.tag;switch(t.$$typeof){case ll:if(e.type===t.value)return!0;break;case lu:l:{for(t=t.value,e=[e,0],r=0;r<e.length;){var i=e[r++],a=i.tag,s=e[r++],o=t[s];if(5!==a&&26!==a&&27!==a||!at(i)){for(;null!=o&&nl(i,o);)o=t[++s];if(s===t.length){t=!0;break l}for(i=i.child;null!==i;)e.push(i,s),i=i.sibling}}t=!1}return t;case lc:if((5===r||26===r||27===r)&&ar(e.stateNode,t.value))return!0;break;case lh:if((5===r||6===r||26===r||27===r)&&null!==(e=ae(e))&&0<=e.indexOf(t.value))return!0;break;case ld:if((5===r||26===r||27===r)&&"string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase())return!0;break;default:throw Error(n(365))}return!1}function nu(e){switch(e.$$typeof){case ll:return"<"+(l(e.value)||"Unknown")+">";case lu:return":has("+(nu(e)||"")+")";case lc:return'[role="'+e.value+'"]';case lh:return'"'+e.value+'"';case ld:return'[data-testname="'+e.value+'"]';default:throw Error(n(365))}}function nc(e,t){var r=[];e=[e,0];for(var n=0;n<e.length;){var i=e[n++],a=i.tag,s=e[n++],o=t[s];if(5!==a&&26!==a&&27!==a||!at(i)){for(;null!=o&&nl(i,o);)o=t[++s];if(s===t.length)r.push(i);else for(i=i.child;null!==i;)e.push(i,s),i=i.sibling}}return r}function nd(e,t){if(!i8)throw Error(n(363));e=nc(e=no(e),t),t=[],e=Array.from(e);for(var r=0;r<e.length;){var i=e[r++],a=i.tag;if(5===a||26===a||27===a)at(i)||t.push(i.stateNode);else for(i=i.child;null!==i;)e.push(i),i=i.sibling}return t}function nh(){return(2&lm)!=0&&0!==ly?ly&-ly:null!==i_.T?ec():iX()}function nf(){if(0===lP)if((0x20000000&ly)==0||s7){var e=sC;(3932160&(sC<<=1))==0&&(sC=262144),lP=e}else lP=0x20000000;return null!==(e=oj.current)&&(e.flags|=32),lP}function np(e,t,r){(e===lg&&(2===lx||9===lx)||null!==e.cancelPendingCommit)&&(nb(e,0),nv(e,ly,lP,!1)),v(e,r),((2&lm)==0||e!==lg)&&(e===lg&&((2&lm)==0&&(lA|=r),4===lT&&nv(e,ly,lP,!1)),en(e))}function nm(e,t,r){if((6&lm)!=0)throw Error(n(327));for(var i=!r&&(127&t)==0&&(t&e.expiredLanes)==0||p(e,t),a=i?function(e,t){var r=lm;lm|=2;var i=nw(),a=nM();lg!==e||ly!==t?(lU=null,lk=sN()+500,nb(e,t)):lS=p(e,t);l:for(;;)try{if(0!==lx&&null!==lv){t=lv;var s=lb;u:switch(lx){case 1:lx=0,lb=null,nP(e,t,s,1);break;case 2:case 9:if(eg(s)){lx=0,lb=null,nC(t);break}t=function(){2!==lx&&9!==lx||lg!==e||(lx=7),en(e)},s.then(t,t);break l;case 3:lx=7;break l;case 4:lx=5;break l;case 7:eg(s)?(lx=0,lb=null,nC(t)):(lx=0,lb=null,nP(e,t,s,7));break;case 5:var o=null;switch(lv.tag){case 26:o=lv.memoizedState;case 5:case 27:var l=lv,u=l.type,c=l.pendingProps;if(o?sf(o):iJ(l.stateNode,u,c)){lx=0,lb=null;var d=l.sibling;if(null!==d)lv=d;else{var h=l.return;null!==h?(lv=h,nI(h)):lv=null}break u}}lx=0,lb=null,nP(e,t,s,5);break;case 6:lx=0,lb=null,nP(e,t,s,6);break;case 8:nx(),lT=6;break l;default:throw Error(n(462))}}for(;null!==lv&&!sR();)nA(lv);break}catch(t){n_(e,t)}return oa=oi=null,i_.H=i,i_.A=a,lm=r,null!==lv?0:(lg=null,ly=0,eT(),lT)}(e,t):nE(e,t,!0),s=i;;){if(0===a)lS&&!i&&nv(e,t,0,!1);else{if(r=e.current.alternate,s&&!function(e){for(var t=e;;){var r=t.tag;if((0===r||11===r||15===r)&&16384&t.flags&&null!==(r=t.updateQueue)&&null!==(r=r.stores))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!sG(a(),i))return!1}catch{return!1}}if(r=t.child,16384&t.subtreeFlags&&null!==r)r.return=t,t=r;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)){a=nE(e,t,!1),s=!1;continue}if(2===a){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=0!=(o=-0x20000001&e.pendingLanes)?o:0x20000000&o?0x20000000:0;if(0!==o){t=o;l:{a=lO;var l=iB&&e.current.memoizedState.isDehydrated;if(l&&(nb(e,o).flags|=256),2!==(o=nE(e,o,!1))){if(lw&&!l){e.errorRecoveryDisabledLanes|=s,lA|=s,a=4;break l}s=lR,lR=a,null!==s&&(null===lR?lR=s:lR.push.apply(lR,s))}a=o}if(s=!1,2!==a)continue}}if(1===a){nb(e,0),nv(e,t,0,!0);break}l:{switch(i=e,s=a){case 0:case 1:throw Error(n(345));case 4:if((4194048&t)!==t)break;case 6:nv(i,t,lP,!l_);break l;case 2:lR=null;break;case 3:case 5:break;default:throw Error(n(329))}if((0x3c00000&t)===t&&10<(a=lN+300-sN())){if(nv(i,t,lP,!l_),0!==f(i,0,!0))break l;lV=t,i.timeoutHandle=iD(ng.bind(null,i,r,lR,lU,lL,t,lP,lA,lI,l_,s,"Throttled",-0,0),a);break l}ng(i,r,lR,lU,lL,t,lP,lA,lI,l_,s,null,-0,0)}}break}en(e)}function ng(e,t,r,n,i,a,s,o,l,u,c,d,h,f){if(e.timeoutHandle=iU,8192&(d=t.subtreeFlags)||(0x1002000&d)==0x1002000){nr(t,a,d=iQ());var p=(0x3c00000&a)===a?lN-sN():(4194048&a)===a?lD-sN():0;if(null!==(p=i1(d,p))){lV=a,e.cancelPendingCommit=p(nR.bind(null,e,t,a,r,n,i,s,o,l,c,d,null,h,f)),nv(e,a,s,!u);return}}nR(e,t,a,r,n,i,s,o,l)}function nv(e,t,r,n){t&=~lC,t&=~lA,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var a=31-sM(i),s=1<<a;n[a]=-1,i&=~s}0!==r&&y(e,r,t)}function ny(){return(6&lm)!=0||(ei(0,!1),!1)}function nx(){if(null!==lv){if(0===lx)var e=lv.return;else e=lv,oa=oi=null,e4(e),oP=null,oI=0,e=lv;for(;null!==e;)rk(e.alternate,e),e=e.return;lv=null}}function nb(e,t){var r=e.timeoutHandle;r!==iU&&(e.timeoutHandle=iU,ik(r)),null!==(r=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,r()),lV=0,nx(),lg=e,lv=r=nY(e.current,null),ly=t,lx=0,lb=null,l_=!1,lS=p(e,t),lw=!1,lI=lP=lC=lA=lE=lT=0,lR=lO=null,lL=!1,(8&t)!=0&&(t|=32&t);var n=e.entangledLanes;if(0!==n)for(e=e.entanglements,n&=t;0<n;){var i=31-sM(n),a=1<<i;t|=e[i],n&=~a}return lM=t,eT(),r}function n_(e,t){oH=null,i_.H=o0,t===oM||t===oE?(t=ex(),lx=3):t===oT?(t=ex(),lx=4):lx=t===o5?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,lb=t,null===lv&&(lT=1,t4(e,A(t,e.current)))}function nS(){var e=oj.current;return null===e||((4194048&ly)===ly?null===oB:((0x3c00000&ly)===ly||(0x20000000&ly)!=0)&&e===oB)}function nw(){var e=i_.H;return i_.H=o0,null===e?o0:e}function nM(){var e=i_.A;return i_.A=lo,e}function nT(){lT=4,l_||(4194048&ly)!==ly&&null!==oj.current||(lS=!0),(0x7ffffff&lE)==0&&(0x7ffffff&lA)==0||null===lg||nv(lg,ly,lP,!1)}function nE(e,t,r){var n=lm;lm|=2;var i=nw(),a=nM();(lg!==e||ly!==t)&&(lU=null,nb(e,t)),t=!1;var s=lT;l:for(;;)try{if(0!==lx&&null!==lv){var o=lv,l=lb;switch(lx){case 8:nx(),s=6;break l;case 3:case 2:case 9:case 6:null===oj.current&&(t=!0);var u=lx;if(lx=0,lb=null,nP(e,o,l,u),r&&lS){s=0;break l}break;default:u=lx,lx=0,lb=null,nP(e,o,l,u)}}(function(){for(;null!==lv;)nA(lv)})(),s=lT;break}catch(t){n_(e,t)}return t&&e.shellSuspendCounter++,oa=oi=null,lm=n,i_.H=i,i_.A=a,null===lv&&(lg=null,ly=0,eT()),s}function nA(e){var t=rM(e.alternate,e,lM);e.memoizedProps=e.pendingProps,null===t?nI(e):lv=t}function nC(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=rc(r,t,t.pendingProps,t.type,void 0,ly);break;case 11:t=rc(r,t,t.pendingProps,t.type.render,t.ref,ly);break;case 5:e4(t);default:rk(r,t),t=rM(r,t=lv=n$(t,lM),lM)}e.memoizedProps=e.pendingProps,null===t?nI(e):lv=t}
389function nP(e,t,r,i){oa=oi=null,e4(t),oP=null,oI=0;var a=t.return;try{if(function(e,t,r,i,a){if(r.flags|=32768,null!==i&&"object"==typeof i&&"function"==typeof i.then){if(null!==(t=r.alternate)&&Y(t,r,a,!0),null!==(r=oj.current)){switch(r.tag){case 31:case 13:return null===oB?nT():null===r.alternate&&0===lT&&(lT=3),r.flags&=-257,r.flags|=65536,r.lanes=a,i===oA?r.flags|=16384:(null===(t=r.updateQueue)?r.updateQueue=new Set([i]):t.add(i),nB(e,i,a)),!1;case 22:return r.flags|=65536,i===oA?r.flags|=16384:(null===(t=r.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},r.updateQueue=t):null===(r=t.retryQueue)?t.retryQueue=new Set([i]):r.add(i),nB(e,i,a)),!1}throw Error(n(435,r.tag))}return nB(e,i,a),nT(),!1}if(s7)return null!==(t=oj.current)?((65536&t.flags)==0&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==or&&G(A(e=Error(n(422),{cause:i}),r))):(i!==or&&G(A(t=Error(n(423),{cause:i}),r)),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,i=A(i,r),a=t6(e.stateNode,i,a),ek(e,a),4!==lT&&(lT=2)),!1;var s=Error(n(520),{cause:i});if(s=A(s,r),null===lO?lO=[s]:lO.push(s),4!==lT&&(lT=2),null===t)return!0;i=A(i,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=a&-a,r.lanes|=e,e=t6(r.stateNode,i,e),ek(r,e),!1;case 1:if(t=r.type,s=r.stateNode,(128&r.flags)==0&&("function"==typeof t.getDerivedStateFromError||null!==s&&"function"==typeof s.componentDidCatch&&(null===lF||!lF.has(s))))return r.flags|=65536,a&=-a,r.lanes|=a,t9(a=t8(a),e,r,i),ek(r,a),!1}r=r.return}while(null!==r)return!1}(e,a,t,r,ly)){lT=1,t4(e,A(r,e.current)),lv=null;return}}catch(t){if(null!==a)throw lv=a,t;lT=1,t4(e,A(r,e.current)),lv=null;return}32768&t.flags?(s7||1===i?e=!0:lS||(0x20000000&ly)!=0?e=!1:(l_=e=!0,(2===i||9===i||3===i||6===i)&&null!==(i=oj.current)&&13===i.tag&&(i.flags|=16384)),nO(t,e)):nI(t)}function nI(e){var t=e;do{if((32768&t.flags)!=0)return void nO(t,l_);e=t.return;var r=function(e,t,r){var i=t.pendingProps;switch(O(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return rD(t),null;case 3:return r=t.stateNode,i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),W(od),N(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===e||null===e.child)&&(j(t)?rT(t):null===e||e.memoizedState.isDehydrated&&(256&t.flags)==0||(t.flags|=1024,V())),rP(e,t),rD(t),null;case 26:if(st){var a=t.type,s=t.memoizedState;return null===e?(rT(t),null!==s?(rD(t),rR(t,s)):(rD(t),rO(t,a,null,i,r))):s?s!==e.memoizedState?(rT(t),rD(t),rR(t,s)):(rD(t),t.flags&=-0x1000001):(s=e.memoizedProps,iz?s!==i&&rT(t):rI(e,t,a,i),rD(t),rO(t,a,s,i,r)),null}case 27:if(sm){if(k(t),r=s5.current,a=t.type,null!==e&&null!=t.stateNode)iz?e.memoizedProps!==i&&rT(t):rI(e,t,a,i);else{if(!i){if(null===t.stateNode)throw Error(n(166));return rD(t),null}e=s3.current,j(t)?F(t,e):(t.stateNode=e=sg(a,i,r,e,!0),rT(t))}return rD(t),null}case 5:if(k(t),a=t.type,null!==e&&null!=t.stateNode)rI(e,t,a,i);else{if(!i){if(null===t.stateNode)throw Error(n(166));return rD(t),null}if(s=s3.current,j(t))F(t,s),a0(t.stateNode,a,i,s)&&(t.flags|=64);else{var o=iI(a,i,s5.current,s,t);rE(t),rC(o,t,!1,!1),t.stateNode=o,iR(o,a,i,s)&&rT(t)}}return rD(t),rO(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&null!=t.stateNode)r=e.memoizedProps,iz?r!==i&&rT(t):ij&&(r!==i?(e=s5.current,r=s3.current,rE(t),t.stateNode=iN(i,e,r,t)):t.stateNode=e.stateNode);else{if("string"!=typeof i&&null===t.stateNode)throw Error(n(166));if(e=s5.current,r=s3.current,j(t)){if(!iB)throw Error(n(176));if(e=t.stateNode,r=t.memoizedProps,i=null,null!==(a=s8))switch(a.tag){case 27:case 5:i=a.memoizedProps}aW(e,r,t,i)||U(t,!0)}else rE(t),t.stateNode=iN(i,e,r,t)}return rD(t),null;case 31:if(r=t.memoizedState,null===e||null!==e.memoizedState){if(i=j(t),null!==r){if(null===e){if(!i)throw Error(n(318));if(!iB)throw Error(n(556));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(n(557));aX(e,t)}else B(),(128&t.flags)==0&&(t.memoizedState=null),t.flags|=4;rD(t),e=!1}else r=V(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return 256&t.flags?(eY(t),t):(eY(t),null);if((128&t.flags)!=0)throw Error(n(558))}return rD(t),null;case 13:if(i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=j(t),null!==i&&null!==i.dehydrated){if(null===e){if(!a)throw Error(n(318));if(!iB)throw Error(n(344));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(n(317));aq(a,t)}else B(),(128&t.flags)==0&&(t.memoizedState=null),t.flags|=4;rD(t),a=!1}else a=V(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(eY(t),t):(eY(t),null)}return eY(t),(128&t.flags)!=0?(t.lanes=r,t):(r=null!==i,e=null!==e&&null!==e.memoizedState,r&&(i=t.child,a=null,null!==i.alternate&&null!==i.alternate.memoizedState&&null!==i.alternate.memoizedState.cachePool&&(a=i.alternate.memoizedState.cachePool.pool),s=null,null!==i.memoizedState&&null!==i.memoizedState.cachePool&&(s=i.memoizedState.cachePool.pool),s!==a&&(i.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),rL(t,t.updateQueue),rD(t),null);case 4:return N(),rP(e,t),null===e&&iG(t.stateNode.containerInfo),rD(t),null;case 10:return W(t.type),rD(t),null;case 19:if(c(oV),null===(i=t.memoizedState))return rD(t),null;if(a=(128&t.flags)!=0,null===(s=i.rendering))if(a)rN(i,!1);else{if(0!==lT||null!==e&&(128&e.flags)!=0)for(e=t.child;null!==e;){if(null!==(s=e$(e))){for(t.flags|=128,rN(i,!1),t.updateQueue=e=s.updateQueue,rL(t,e),t.subtreeFlags=0,e=r,r=t.child;null!==r;)n$(r,e),r=r.sibling;return d(oV,1&oV.current|2),s7&&C(t,i.treeForkCount),t.child}e=e.sibling}null!==i.tail&&sN()>lk&&(t.flags|=128,a=!0,rN(i,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=e$(s))){if(t.flags|=128,a=!0,t.updateQueue=e=e.updateQueue,rL(t,e),rN(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!s7)return rD(t),null}else 2*sN()-i.renderingStartTime>lk&&0x20000000!==r&&(t.flags|=128,a=!0,rN(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=i.last)?e.sibling=s:t.child=s,i.last=s)}return null!==i.tail?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=sN(),e.sibling=null,r=oV.current,d(oV,a?1&r|2:1&r),s7&&C(t,i.treeForkCount),e):(rD(t),null);case 22:case 23:return eY(t),eG(),i=null!==t.memoizedState,null!==e?null!==e.memoizedState!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(0x20000000&r)!=0&&(128&t.flags)==0&&(rD(t),6&t.subtreeFlags&&(t.flags|=8192)):rD(t),null!==(r=t.updateQueue)&&rL(t,r.retryQueue),r=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(r=e.memoizedState.cachePool.pool),i=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(i=t.memoizedState.cachePool.pool),i!==r&&(t.flags|=2048),null!==e&&c(ow),null;case 24:return r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),W(od),rD(t),null;case 25:case 30:return null}throw Error(n(156,t.tag))}(t.alternate,t,lM);if(null!==r){lv=r;return}if(null!==(t=t.sibling)){lv=t;return}lv=t=e}while(null!==t)0===lT&&(lT=5)}function nO(e,t){do{var r=function(e,t){switch(O(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return W(od),N(),(65536&(e=t.flags))!=0&&(128&e)==0?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return k(t),null;case 31:if(null!==t.memoizedState){if(eY(t),null===t.alternate)throw Error(n(340));B()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(eY(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));B()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return c(oV),null;case 4:return N(),null;case 10:return W(t.type),null;case 22:case 23:return eY(t),eG(),null!==e&&c(ow),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return W(od),null;default:return null}}(e.alternate,e);if(null!==r){r.flags&=32767,lv=r;return}if(null!==(r=e.return)&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&null!==(e=e.sibling)){lv=e;return}lv=e=r}while(null!==e)lT=6,lv=null}function nR(e,t,r,i,a,s,o,l,u){e.cancelPendingCommit=null;do nU();while(0!==lz)if((6&lm)!=0)throw Error(n(327));if(null!==t){if(t===e.current)throw Error(n(177));if(function(e,t,r,n,i,a){var s=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(r=s&~r;0<r;){var c=31-sM(r),d=1<<c;o[c]=0,l[c]=-1;var h=u[c];if(null!==h)for(u[c]=null,c=0;c<h.length;c++){var f=h[c];null!==f&&(f.lane&=-0x20000001)}r&=~d}0!==n&&y(e,n,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(s&~t))}(e,r,s=t.lanes|t.childLanes|oD,o,l,u),e===lg&&(lv=lg=null,ly=0),lB=t,lj=e,lV=r,lG=s,lH=a,lW=i,(10256&t.subtreeFlags)!=0||(10256&t.flags)!=0?(e.callbackNode=null,e.callbackPriority=0,sI(sU,function(){return nF(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(13878&t.flags)!=0,(13878&t.subtreeFlags)!=0||i){i=i_.T,i_.T=null,a=iW(),iH(2),o=lm,lm|=4;try{!function(e,t){for(iC(e.containerInfo),lr=t;null!==lr;)if(t=(e=lr).child,(1028&e.subtreeFlags)!=0&&null!==t)t.return=e,lr=t;else for(;null!==lr;){var r=(e=lr).alternate;switch(t=e.flags,e.tag){case 0:if((4&t)!=0&&null!==(t=null!==(t=e.updateQueue)?t.events:null))for(var i=0;i<t.length;i++){var a=t[i];a.ref.impl=a.nextImpl}break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if((1024&t)!=0&&null!==r){t=void 0,i=e,a=r.memoizedProps,r=r.memoizedState;var s=i.stateNode;try{var o=t3(i.type,a);t=s.getSnapshotBeforeUpdate(o,r),s.__reactInternalSnapshotBeforeUpdate=t}catch(e){nj(i,i.return,e)}}break;case 3:(1024&t)!=0&&iz&&ax(e.stateNode.containerInfo);break;default:if((1024&t)!=0)throw Error(n(163))}if(null!==(t=e.sibling)){t.return=e.return,lr=t;break}lr=e.return}}(e,t)}finally{lm=o,iH(a),i_.T=i}}lz=1,nL(),nN(),nD()}}function nL(){if(1===lz){lz=0;var e=lj,t=lB,r=(13878&t.flags)!=0;if((13878&t.subtreeFlags)!=0||r){r=i_.T,i_.T=null;var n=iW();iH(2);var i=lm;lm|=4;try{r3(t,e),iP(e.containerInfo)}finally{lm=i,iH(n),i_.T=r}}e.current=t,lz=2}}function nN(){if(2===lz){lz=0;var e=lj,t=lB,r=(8772&t.flags)!=0;if((8772&t.subtreeFlags)!=0||r){r=i_.T,i_.T=null;var n=iW();iH(2);var i=lm;lm|=4;try{rK(e,t.alternate,t)}finally{lm=i,iH(n),i_.T=r}}lz=3}}function nD(){if(4===lz||3===lz){lz=0,sL();var e=lj,t=lB,r=lV,n=lW;(10256&t.subtreeFlags)!=0||(10256&t.flags)!=0?lz=5:(lz=0,lB=lj=null,nk(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(lF=null),S(r),t=t.stateNode,sV&&"function"==typeof sV.onCommitFiberRoot)try{sV.onCommitFiberRoot(sB,t,void 0,(128&t.current.flags)==128)}catch{}if(null!==n){t=i_.T,i=iW(),iH(2),i_.T=null;try{for(var a=e.onRecoverableError,s=0;s<n.length;s++){var o=n[s];a(o.value,{componentStack:o.stack})}}finally{i_.T=t,iH(i)}}(3&lV)!=0&&nU(),en(e),i=e.pendingLanes,(261930&r)!=0&&(42&i)!=0?e===lq?lX++:(lX=0,lq=e):lX=0,iB&&a1(),ei(0,!1)}}function nk(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,et(t))}function nU(){return nL(),nN(),nD(),nF()}function nF(){if(5!==lz)return!1;var e=lj,t=lG;lG=0;var r=S(lV),i=32>r?32:r;r=i_.T;var a=iW();try{iH(i),i_.T=null,i=lH,lH=null;var s=lj,o=lV;if(lz=0,lB=lj=null,lV=0,(6&lm)!=0)throw Error(n(331));var l=lm;if(lm|=4,na(s.current),r7(s,s.current,o,i),lm=l,ei(0,!1),sV&&"function"==typeof sV.onPostCommitFiberRoot)try{sV.onPostCommitFiberRoot(sB,s)}catch{}return!0}finally{iH(a),i_.T=r,nk(e,t)}}function nz(e,t,r){t=A(r,t),t=t6(e.stateNode,t,2),null!==(e=eN(e,t,2))&&(v(e,2),en(e))}function nj(e,t,r){if(3===e.tag)nz(e,e,r);else for(;null!==t;){if(3===t.tag){nz(t,e,r);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===lF||!lF.has(n))){e=A(r,e),null!==(n=eN(t,r=t8(2),2))&&(t9(r,n,t,e),v(n,2),en(n));break}}t=t.return}}function nB(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new lp;var i=new Set;n.set(t,i)}else void 0===(i=n.get(t))&&(i=new Set,n.set(t,i));i.has(r)||(lw=!0,i.add(r),e=nV.bind(null,e,t,r),t.then(e,e))}function nV(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,lg===e&&(ly&r)===r&&(4===lT||3===lT&&(0x3c00000&ly)===ly&&300>sN()-lN?(2&lm)==0&&nb(e,0):lC|=r,lI===ly&&(lI=0)),en(e)}function nG(e,t){0===t&&(t=m()),null!==(e=eC(e,t))&&(v(e,t),en(e))}function nH(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),nG(e,r)}function nW(e,t){var r=0;switch(e.tag){case 31:case 13:var i=e.stateNode,a=e.memoizedState;null!==a&&(r=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(n(314))}null!==i&&i.delete(t),nG(e,r)}function nX(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
389ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nq(e){return!(!(e=e.prototype)||!e.isReactComponent)}function nY(e,r){var n=e.alternate;return null===n?((n=t(e.tag,r,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=r,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=0x3e00000&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,r=e.dependencies,n.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function n$(e,t){e.flags&=0x3e00002;var r=e.alternate;return null===r?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,e.dependencies=null===(t=r.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function nK(e,r,i,a,s,o){var l=0;if(a=e,"function"==typeof e)nq(e)&&(l=1);else if("string"==typeof e)l=st&&sm?sr(e,i,s3.current)?26:sx(e)?27:5:st?sr(e,i,s3.current)?26:5:sm&&sx(e)?27:5;else l:switch(e){case ig:return(e=t(31,i,r,s)).elementType=ig,e.lanes=o,e;case ia:return nZ(i.children,s,o,r);case is:l=8,s|=24;break;case io:return(e=t(12,i,r,2|s)).elementType=io,e.lanes=o,e;case id:return(e=t(13,i,r,s)).elementType=id,e.lanes=o,e;case ih:return(e=t(19,i,r,s)).elementType=ih,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case iu:l=10;break l;case il:l=9;break l;case ic:l=11;break l;case ip:l=14;break l;case im:l=16,a=null;break l}l=29,i=Error(n(130,null===e?"null":typeof e,"")),a=null}return(r=t(l,i,r,s)).elementType=e,r.type=a,r.lanes=o,r}function nZ(e,r,n,i){return(e=t(7,e,i,r)).lanes=n,e}function nJ(e,r,n){return(e=t(6,e,null,r)).lanes=n,e}function nQ(e){var r=t(18,null,null,0);return r.stateNode=e,r}function n0(e,r,n){return(r=t(4,null!==e.children?e.children:[],e.key,r)).lanes=n,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function n1(e,t,r,n,i,a,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=iU,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=g(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g(0),this.hiddenUpdates=g(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function n2(e,r,n,i,a,s,o,l,u,c,d,h){return e=new n1(e,r,n,o,u,c,d,h,l),r=1,!0===s&&(r|=24),s=t(3,null,null,r),e.current=s,s.stateNode=e,r=ee(),r.refCount++,e.pooledCache=r,r.refCount++,s.memoizedState={element:i,isDehydrated:n,cache:r},eO(s),e}function n3(e){var t=e._reactInternals;if(void 0===t)throw"function"==typeof e.render?Error(n(188)):Error(n(268,e=Object.keys(e).join(",")));return null===(e=null!==(e=s(t))?function e(t){var r=t.tag;if(5===r||26===r||27===r||6===r)return t;for(t=t.child;null!==t;){if(null!==(r=e(t)))return r;t=t.sibling}return null}(e):null)?null:iT(e.stateNode)}function n4(e,t,r,n,i,a){i=sw,null===n.context?n.context=i:n.pendingContext=i,(n=eL(t)).payload={element:r},null!==(a=void 0===a?null:a)&&(n.callback=a),null!==(r=eN(e,n,t))&&(np(r,e,t),eD(r,e,t))}function n5(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function n6(e,t){n5(e,t),(e=e.alternate)&&n5(e,t)}var n8={},n9=ol.default,n7=uj.default,ie=Object.assign,it=Symbol.for("react.element"),ir=Symbol.for("react.transitional.element"),ii=Symbol.for("react.portal"),ia=Symbol.for("react.fragment"),is=Symbol.for("react.strict_mode"),io=Symbol.for("react.profiler"),il=Symbol.for("react.consumer"),iu=Symbol.for("react.context"),ic=Symbol.for("react.forward_ref"),id=Symbol.for("react.suspense"),ih=Symbol.for("react.suspense_list"),ip=Symbol.for("react.memo"),im=Symbol.for("react.lazy"),ig=Symbol.for("react.activity"),iv=Symbol.for("react.memo_cache_sentinel"),iy=Symbol.iterator,ix=Symbol.for("react.client.reference"),ib=Array.isArray,i_=n9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,iS=e.rendererVersion,iw=e.rendererPackageName,iM=e.extraDevToolsConfig,iT=e.getPublicInstance,iE=e.getRootHostContext,iA=e.getChildHostContext,iC=e.prepareForCommit,iP=e.resetAfterCommit,iI=e.createInstance;e.cloneMutableInstance;
389var iO=e.appendInitialChild,iR=e.finalizeInitialChildren,iL=e.shouldSetTextContent,iN=e.createTextInstance;e.cloneMutableTextInstance;var iD=e.scheduleTimeout,ik=e.cancelTimeout,iU=e.noTimeout,iF=e.isPrimaryRenderer;e.warnsIfNotActing;var iz=e.supportsMutation,ij=e.supportsPersistence,iB=e.supportsHydration,iV=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var iG=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var iH=e.setCurrentUpdatePriority,iW=e.getCurrentUpdatePriority,iX=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var iq=e.shouldAttemptEagerTransition,iY=e.detachDeletedInstance;e.requestPostPaintCallback;var i$=e.maySuspendCommit,iK=e.maySuspendCommitOnUpdate,iZ=e.maySuspendCommitInSyncRender,iJ=e.preloadInstance,iQ=e.startSuspendingCommit,i0=e.suspendInstance;e.suspendOnActiveViewTransition;var i1=e.waitForCommitToBeReady;e.getSuspendedCommitReason;var i2=e.NotPendingTransition,i3=e.HostTransitionContext,i4=e.resetFormInstance;e.bindToConsole;var i5=e.supportsMicrotasks,i6=e.scheduleMicrotask,i8=e.supportsTestSelectors,i9=e.findFiberRoot,i7=e.getBoundingRect,ae=e.getTextContent,at=e.isHiddenSubtree,ar=e.matchAccessibilityRole,an=e.setFocusIfFocusable,ai=e.setupIntersectionObserver,aa=e.appendChild,as=e.appendChildToContainer,ao=e.commitTextUpdate,al=e.commitMount,au=e.commitUpdate,ac=e.insertBefore,ad=e.insertInContainerBefore,ah=e.removeChild,af=e.removeChildFromContainer,ap=e.resetTextContent,am=e.hideInstance,ag=e.hideTextInstance,av=e.unhideInstance,ay=e.unhideTextInstance;e.cancelViewTransitionName,e.cancelRootViewTransitionName,e.restoreRootViewTransitionName,e.cloneRootViewTransitionContainer,e.removeRootViewTransitionClone,e.measureClonedInstance,e.hasInstanceChanged,e.hasInstanceAffectedParent,e.startViewTransition,e.startGestureTransition,e.stopViewTransition,e.getCurrentGestureOffset,e.createViewTransitionInstance;var ax=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var ab=e.cloneInstance,a_=e.createContainerChildSet,aS=e.appendChildToContainerChildSet,aw=e.finalizeContainerChildren,aM=e.replaceContainerChildren,aT=e.cloneHiddenInstance,aE=e.cloneHiddenTextInstance,aA=e.isSuspenseInstancePending,aC=e.isSuspenseInstanceFallback,aP=e.getSuspenseInstanceFallbackErrorDetails,aI=e.registerSuspenseInstanceRetry,aO=e.canHydrateFormStateMarker,aR=e.isFormStateMarkerMatching,aL=e.getNextHydratableSibling,aN=e.getNextHydratableSiblingAfterSingleton,aD=e.getFirstHydratableChild,ak=e.getFirstHydratableChildWithinContainer,aU=e.getFirstHydratableChildWithinActivityInstance,aF=e.getFirstHydratableChildWithinSuspenseInstance,az=e.getFirstHydratableChildWithinSingleton,aj=e.canHydrateInstance,aB=e.canHydrateTextInstance,aV=e.canHydrateActivityInstance,aG=e.canHydrateSuspenseInstance,aH=e.hydrateInstance,aW=e.hydrateTextInstance,aX=e.hydrateActivityInstance,aq=e.hydrateSuspenseInstance,aY=e.getNextHydratableInstanceAfterActivityInstance,a$=e.getNextHydratableInstanceAfterSuspenseInstance,aK=e.commitHydratedInstance,aZ=e.commitHydratedContainer,aJ=e.commitHydratedActivityInstance,aQ=e.commitHydratedSuspenseInstance,a0=e.finalizeHydratedChildren,a1=e.flushHydrationEvents;e.clearActivityBoundary;var a2=e.clearSuspenseBoundary;e.clearActivityBoundaryFromContainer;var a3=e.clearSuspenseBoundaryFromContainer,a4=e.hideDehydratedBoundary,a5=e.unhideDehydratedBoundary,a6=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var a8,a9,a7=e.validateHydratableInstance,se=e.validateHydratableTextInstance,st=e.supportsResources,sr=e.isHostHoistableType,sn=e.getHoistableRoot,si=e.getResource,sa=e.acquireResource,ss=e.releaseResource,so=e.hydrateHoistable,sl=e.mountHoistable,su=e.unmountHoistable,sc=e.createHoistableInstance,sd=e.prepareToCommitHoistables,sh=e.mayResourceSuspendCommit,sf=e.preloadResource,sp=e.suspendResource,sm=e.supportsSingletons,sg=e.resolveSingletonInstance,sv=e.acquireSingletonInstance,sy=e.releaseSingletonInstance,sx=e.isHostSingletonType,sb=e.isSingletonScope,s_=[],sS=-1,sw={},sM=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(sT(e)/sE|0)|0},sT=Math.log,sE=Math.LN2,sA=256,sC=262144,sP=4194304,sI=n7.unstable_scheduleCallback,sO=n7.unstable_cancelCallback,sR=n7.unstable_shouldYield,sL=n7.unstable_requestPaint,sN=n7.unstable_now,sD=n7.unstable_ImmediatePriority,sk=n7.unstable_UserBlockingPriority,sU=n7.unstable_NormalPriority,sF=n7.unstable_IdlePriority,sz=n7.log,sj=n7.unstable_setDisableYieldValue,sB=null,
389sV=null,sG="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},sH="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof oo.default&&"function"==typeof oo.default.emit)return void oo.default.emit("uncaughtException",e);console.error(e)},sW=Object.prototype.hasOwnProperty,sX=!1,sq=new WeakMap,sY=[],s$=0,sK=null,sZ=0,sJ=[],sQ=0,s0=null,s1=1,s2="",s3=u(null),s4=u(null),s5=u(null),s6=u(null),s8=null,s9=null,s7=!1,oe=null,ot=!1,or=Error(n(519)),on=u(null),oi=null,oa=null,os="u">typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ou=n7.unstable_scheduleCallback,oc=n7.unstable_NormalPriority,od={$$typeof:iu,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},oh=null,of=null,op=!1,om=!1,og=!1,ov=0,oy=null,ox=0,ob=0,o_=null,oS=i_.S;i_.S=function(e,t){lD=sN(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e){if(null===oy){var t=oy=[];ox=0,ob=ec(),o_={status:"pending",value:void 0,then:function(e){t.push(e)}}}ox++,e.then(ed,ed)}(t),null!==oS&&oS(e,t)};var ow=u(null),oM=Error(n(460)),oT=Error(n(474)),oE=Error(n(542)),oA={then:function(){}},oC=null,oP=null,oI=0,oO=eM(!0),oR=eM(!1),oL=[],oN=0,oD=0,ok=!1,oU=!1,oF=u(null),oz=u(0),oj=u(null),oB=null,oV=u(0),oG=0,oH=null,oW=null,oX=null,oq=!1,oY=!1,o$=!1,oK=0,oZ=0,oJ=null,oQ=0,o0={readContext:Z,use:e7,useCallback:eK,useContext:eK,useEffect:eK,useImperativeHandle:eK,useLayoutEffect:eK,useInsertionEffect:eK,useMemo:eK,useReducer:eK,useRef:eK,useState:eK,useDebugValue:eK,useDeferredValue:eK,useTransition:eK,useSyncExternalStore:eK,useId:eK,useHostTransitionStatus:eK,useFormState:eK,useActionState:eK,useOptimistic:eK,useMemoCache:eK,useCacheRefresh:eK};o0.useEffectEvent=eK;var o1={readContext:Z,use:e7,useCallback:function(e,t){return e5().memoizedState=[e,void 0===t?null:t],e},useContext:Z,useEffect:tP,useImperativeHandle:function(e,t,r){r=null!=r?r.concat([e]):null,tA(4194308,4,tN.bind(null,t,e),r)},useLayoutEffect:function(e,t){return tA(4194308,4,e,t)},useInsertionEffect:function(e,t){tA(4,2,e,t)},useMemo:function(e,t){var r=e5();t=void 0===t?null:t;var n=e();return r.memoizedState=[n,t],n},useReducer:function(e,t,r){var n=e5();if(void 0!==r)var i=r(t);else i=t;return n.memoizedState=n.baseState=i,n.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},e=e.dispatch=tq.bind(null,oH,e),[n.memoizedState,e]},useRef:function(e){return e5().memoizedState={current:e}},useState:function(e){var t=(e=td(e)).queue,r=tY.bind(null,oH,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:tk,useDeferredValue:function(e,t){return tz(e5(),e,t)},useTransition:function(){var e=td(!1);return e=tB.bind(null,oH,e.queue,!0,!1),e5().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var i=oH,a=e5();if(s7){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===lg)throw Error(n(349));(127&ly)!=0||ts(i,t,r)}a.memoizedState=r;var s={value:r,getSnapshot:t};return a.queue=s,tP(tl.bind(null,i,s,e),[e]),i.flags|=2048,tT(9,{destroy:void 0},to.bind(null,i,s,r,t),null),r},useId:function(){var e=e5(),t=lg.identifierPrefix;if(s7){var r=s2,n=s1;t="_"+t+"R_"+(r=(n&~(1<<32-sM(n)-1)).toString(32)+r),0<(r=oK++)&&(t+="H"+r.toString(32)),t+="_"}else t="_"+t+"r_"+(r=oQ++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tG,useFormState:tb,useActionState:tb,useOptimistic:function(e){var t=e5();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=tK.bind(null,oH,!0,r),r.dispatch=t,[e,t]},useMemoCache:te,useCacheRefresh:function(){return e5().memoizedState=tX.bind(null,oH)},useEffectEvent:function(e){var t=e5(),r={impl:e};return t.memoizedState=r,function(){if((2&lm)!=0)throw Error(n(440));return r.impl.apply(void 0,arguments)}}},o2={readContext:Z,use:e7,useCallback:tU,useContext:Z,useEffect:tI,useImperativeHandle:tD,useInsertionEffect:tR,useLayoutEffect:tL,useMemo:tF,useReducer:tr,useRef:tE,useState:function(){return tr(tt)},useDebugValue:tk,useDeferredValue:function(e,t){return tj(e6(),oW.memoizedState,e,t)},useTransition:function(){var e=tr(tt)[0],t=e6().memoizedState;return["boolean"==typeof e?e:e9(e),t]},useSyncExternalStore:ta,useId:tH,useHostTransitionStatus:tG,useFormState:t_,useActionState:t_,useOptimistic:function(e,t){return th(e6(),oW,e,t)},useMemoCache:te,useCacheRefresh:tW};o2.useEffectEvent=tO;var o3={readContext:Z,use:e7,useCallback:tU,useContext:Z,useEffect:tI,useImperativeHandle:tD,useInsertionEffect:tR,useLayoutEffect:tL,useMemo:tF,useReducer:ti,useRef
389:tE,useState:function(){return ti(tt)},useDebugValue:tk,useDeferredValue:function(e,t){var r=e6();return null===oW?tz(r,e,t):tj(r,oW.memoizedState,e,t)},useTransition:function(){var e=ti(tt)[0],t=e6().memoizedState;return["boolean"==typeof e?e:e9(e),t]},useSyncExternalStore:ta,useId:tH,useHostTransitionStatus:tG,useFormState:tM,useActionState:tM,useOptimistic:function(e,t){var r=e6();return null!==oW?th(r,oW,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:te,useCacheRefresh:tW};o3.useEffectEvent=tO;var o4={enqueueSetState:function(e,t,r){e=e._reactInternals;var n=nh(),i=eL(n);i.payload=t,null!=r&&(i.callback=r),null!==(t=eN(e,i,n))&&(np(t,e,n),eD(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=nh(),i=eL(n);i.tag=1,i.payload=t,null!=r&&(i.callback=r),null!==(t=eN(e,i,n))&&(np(t,e,n),eD(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=nh(),n=eL(r);n.tag=2,null!=t&&(n.callback=t),null!==(t=eN(e,n,r))&&(np(t,e,r),eD(t,e,r))}},o5=Error(n(461)),o6=!1,o8={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},o9=!1,o7=!1,le=!1,lt="function"==typeof WeakSet?WeakSet:Set,lr=null,ln=null,li=!1,la=null,ls=8192,lo={getCacheForType:function(e){var t=Z(od),r=t.data.get(e);return void 0===r&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Z(od).controller.signal}},ll=0,lu=1,lc=2,ld=3,lh=4;if("function"==typeof Symbol&&Symbol.for){var lf=Symbol.for;ll=lf("selector.component"),lu=lf("selector.has_pseudo_class"),lc=lf("selector.role"),ld=lf("selector.test_id"),lh=lf("selector.text")}var lp="function"==typeof WeakMap?WeakMap:Map,lm=0,lg=null,lv=null,ly=0,lx=0,lb=null,l_=!1,lS=!1,lw=!1,lM=0,lT=0,lE=0,lA=0,lC=0,lP=0,lI=0,lO=null,lR=null,lL=!1,lN=0,lD=0,lk=1/0,lU=null,lF=null,lz=0,lj=null,lB=null,lV=0,lG=0,lH=null,lW=null,lX=0,lq=null;return n8.attemptContinuousHydration=function(e){if(13===e.tag||31===e.tag){var t=eC(e,0x4000000);null!==t&&np(t,e,0x4000000),n6(e,0x4000000)}},n8.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag||31===e.tag){var t=nh(),r=eC(e,t=_(t));null!==r&&np(r,e,t),n6(e,t)}},n8.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if((e=e.stateNode).current.memoizedState.isDehydrated){var t=h(e.pendingLanes);if(0!==t){for(e.pendingLanes|=2,e.entangledLanes|=2;t;){var r=1<<31-sM(t);e.entanglements[1]|=r,t&=~r}en(e),(6&lm)==0&&(lk=sN()+500,ei(0,!1))}}break;case 31:case 13:null!==(t=eC(e,2))&&np(t,e,2),ny(),n6(e,2)}},n8.batchedUpdates=function(e,t){return e(t)},n8.createComponentSelector=function(e){return{$$typeof:ll,value:e}},n8.createContainer=function(e,t,r,n,i,a,s,o,l,u){return n2(e,t,!1,null,r,n,a,null,s,o,l,u)},n8.createHasPseudoClassSelector=function(e){return{$$typeof:lu,value:e}},n8.createHydrationContainer=function(e,t,r,n,i,a,s,o,l,u,c,d,h,f){var p;return(e=n2(r,n,!0,e,i,a,o,f,l,u,c,d)).context=sw,r=e.current,(i=eL(n=_(n=nh()))).callback=null!=(p=t)?p:null,eN(r,i,n),t=n,e.current.lanes=t,v(e,t),en(e),e},n8.createPortal=function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ii,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}},n8.createRoleSelector=function(e){return{$$typeof:lc,value:e}},n8.createTestNameSelector=function(e){return{$$typeof:ld,value:e}},n8.createTextSelector=function(e){return{$$typeof:lh,value:e}},n8.defaultOnCaughtError=function(e){console.error(e)},n8.defaultOnRecoverableError=function(e){sH(e)},n8.defaultOnUncaughtError=function(e){sH(e)},n8.deferredUpdates=function(e){var t=i_.T,r=iW();try{return iH(32),i_.T=null,e()}finally{iH(r),i_.T=t}},n8.discreteUpdates=function(e,t,r,n,i){var a=i_.T,s=iW();try{return iH(2),i_.T=null,e(t,r,n,i)}finally{iH(s),i_.T=a,0===lm&&(lk=sN()+500)}},n8.findAllNodes=nd,n8.findBoundingRects=function(e,t){if(!i8)throw Error(n(363));t=nd(e,t),e=[];for(var r=0;r<t.length;r++)e.push(i7(t[r]));for(t=e.length-1;0<t;t--){r=e[t];for(var i=r.x,a=i+r.width,s=r.y,o=s+r.height,l=t-1;0<=l;l--)if(t!==l){var u=e[l],c=u.x,d=c+u.width,h=u.y,f=h+u.height;if(i>=c&&s>=h&&a<=d&&o<=f){e.splice(t,1);break}if(i!==c||r.width!==u.width||f<s||h>o){if(!(s!==h||r.height!==u.height||d<i||c>a)){c>i&&(u.width+=c-i,u.x=i),d<a&&(u.width=a-c),e.splice(t,1);break}}else{h>s&&(u.height+=h-s,u.y=s),f<o&&(u.height=o-h),e.splice(t,1);break}}}return e},n8.findHostInstance=n3,n8.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=s(e))?function e(t){var r=t.tag;if(5===r||26===r||27===r||6===r)return t;for(t=t.child;null!==t;){if(4!==t.tag&&null!==(r=e(t)))return r;t=t.sibling}return null}(e):null)?null:iT(e.stateNode)},n8.findHostInstanceWithWarning=function(e){return n3(e)},n8.flushPassiveEffects=nU,n8.flushSyncFromReconciler=function(e){var t=lm;lm|=1;var r=i_.T,n=iW();try{if(iH(2),i_.T=null,e)return e()}finally{iH(n),i_.T=r,(6&(lm=t))==0&&ei(0,!1)}},n8.flushSyncWork=ny,n8.focusWithin=function(e,t){if(!i8)throw Error(n(363));for(t=Array.from(t=nc(e=no(e),t)),e=0;e<t.length;){var r=t[e++],i=r.tag;if(!at(r)){if((5===i||26===i||27===i)&&an(r.stateNode))return!0;for(r=r.child;null!==r;)t.push(r),r=r.sibling}}return!1},n8.getFindAllNodesFailureDescription=function(e,t){if(!i8)throw Error(n(363));var r=0,i=[];e=[no(e),0];for(var a=0;a<e.length;){var s=e[a++],o=s.tag,l=e[a++],u=t[l];if((5!==o&&26!==o&&27!==o||!at(s))&&(nl(s,u)&&(i.push(nu(u)),++l>r&&(r=l)),l<t.length))for(s=s.child;null!==s;)e.push(s,l),s=s.sibling}if(r<t.length){for(e=[];r<t.length;r++)e.push(nu(t[r]));return`findAllNodes was able to match part of the selector: 390 `+i.join(" > ")+` 391 392No matching component was found for: 393 `+e.join(" > ")}return null},n8.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 27:case 5:return iT(e.child.stateNode);default:return e.child.stateNode}},n8.injectIntoDevTools=function(){var e={bundleType:0,version:iS,rendererPackageName:iw,currentDispatcherRef:i_,reconcilerVersion:"19.2.0"};if(null!==iM&&(e.rendererConfig=iM),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;
393if(t.isDisabled||!t.supportsFiber)e=!0;else{try{sB=t.inject(e),sV=t}catch{}e=!!t.checkDCE}}return e},n8.isAlreadyRendering=function(){return(6&lm)!=0},n8.observeVisibleRects=function(e,t,r,i){if(!i8)throw Error(n(363));var a=ai(e=nd(e,t),r,i).disconnect;return{disconnect:function(){a()}}},n8.shouldError=function(){return null},n8.shouldSuspend=function(){return!1},n8.startHostTransition=function(e,t,i,a){if(5!==e.tag)throw Error(n(476));var s=tV(e).queue;tB(e,s,t,i2,null===i?r:function(){var t=tV(e);return null===t.next&&(t=e.alternate.memoizedState),t$(e,t.next.queue,{},nh()),i(a)})},n8.updateContainer=function(e,t,r,n){var i=t.current,a=nh();return n4(i,a,e,t,r,n),a},n8.updateContainerSync=function(e,t,r,n){return n4(t.current,2,e,t,r,n),2},n8},cx.exports.default=cx.exports,Object.defineProperty(cx.exports,"__esModule",{value:!0})),cy.exports=cx.exports),(im=cy.exports)&&im.__esModule&&Object.prototype.hasOwnProperty.call(im,"default"))?im.default:im,c_={},cS=/^three(?=[A-Z])/,cw=e=>`${e[0].toUpperCase()}${e.slice(1)}`,cM=0;function cT(e,t){let r=cw(e),n=c_[r];if("primitive"!==e&&!n)throw Error(`R3F: ${r} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if("primitive"===e&&!t.object)throw Error("R3F: Primitives without 'object' are invalid!");if(void 0!==t.args&&!Array.isArray(t.args))throw Error("R3F: The args prop must be an array!")}function cE(e){if(e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?u7(e.parent,e):co(e.object)&&!1!==e.props.visible&&(e.object.visible=!0),e.isHidden=!1,cs(e)}}function cA(e,t,r){let n=t.root.getState();if(e.parent||e.object===n.scene){if(!t.object){var i,a;let e=c_[cw(t.type)];t.object=null!=(i=t.props.object)?i:new e(...null!=(a=t.props.args
393)?a:[]),t.object.__r3f=t}if(ca(t.object,t.props),t.props.attach)u7(e,t);else if(co(t.object)&&co(e.object)){let n=e.object.children.indexOf(null==r?void 0:r.object);if(r&&-1!==n){let r=e.object.children.indexOf(t.object);-1!==r?(e.object.children.splice(r,1),e.object.children.splice(r<n?n-1:n,0,t.object)):(t.object.parent=e.object,e.object.children.splice(n,0,t.object),t.object.dispatchEvent({type:"added"}),e.object.dispatchEvent({type:"childadded",child:t.object}))}else e.object.add(t.object)}for(let e of t.children)cA(t,e);cs(t)}}function cC(e,t){t&&(t.parent=e,e.children.push(t),cA(e,t))}function cP(e,t,r){if(!t||!r)return;t.parent=e;let n=e.children.indexOf(r);-1!==n?e.children.splice(n,0,t):e.children.push(t),cA(e,t,r)}function cI(e){if("function"==typeof e.dispose){let t=()=>{try{e.dispose()}catch{}};"u">typeof IS_REACT_ACT_ENVIRONMENT?t():(0,uj.unstable_scheduleCallback)(uj.unstable_IdlePriority,t)}}function cO(e,t,r){if(!t)return;t.parent=null;let n=e.children.indexOf(t);-1!==n&&e.children.splice(n,1),t.props.attach?ce(e,t):co(t.object)&&co(e.object)&&(e.object.remove(t.object),function(e,t){let{internal:r}=e.getState();r.interaction=r.interaction.filter(e=>e!==t),r.initialHits=r.initialHits.filter(e=>e!==t),r.hovered.forEach((e,n)=>{(e.eventObject===t||e.object===t)&&r.hovered.delete(n)}),r.capturedMap.forEach((e,n)=>{cu(r.capturedMap,t,e,n)})}(uZ(t),t.object));let i=null!==t.props.dispose&&!1!==r;for(let e=t.children.length-1;e>=0;e--){let r=t.children[e];cO(t,r,i)}t.children.length=0,delete t.object.__r3f,i&&"primitive"!==t.type&&"Scene"!==t.object.type&&cI(t.object),void 0===r&&cs(t)}let cR=[],cL=()=>{},cN={},cD=0,ck=((y=cb({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:function(e,t,r){var n;return cT(e=cw(e)in c_?e:e.replace(cS,""),t),"primitive"===e&&null!=(n=t.object)&&n.__r3f&&delete t.object.__r3f,u6(t.object,r,e,t)},removeChild:cO,appendChild:cC,appendInitialChild:cC,insertBefore:cP,appendChildToContainer(e,t){let r=e.getState().scene.__r3f;t&&r&&cC(r,t)},removeChildFromContainer(e,t){let r=e.getState().scene.__r3f;t&&r&&cO(r,t)},insertInContainerBefore(e,t,r){let n=e.getState().scene.__r3f;t&&r&&n&&cP(n,t,r)},getRootHostContext:()=>cN,getChildHostContext:()=>cN,commitUpdate(e,t,r,n,i){var a,s,o;cT(t,n);let l=!1;if("primitive"===e.type&&r.object!==n.object||(null==(a=n.args)?void 0:a.length)!==(null==(s=r.args)?void 0:s.length)?l=!0:null!=(o=n.args)&&o.some((e,t)=>{var n;return e!==(null==(n=r.args)?void 0:n[t])})&&(l=!0),l)cR.push([e,{...n},i]);else{let t=function(e,t){let r={};for(let n in t)if(!ct.includes(n)&&!u4.equ(t[n],e.props[n]))for(let e in r[n]=t[n],t)e.startsWith(`${n}-`)&&(r[e]=t[e]);for(let n in e.props){if(ct.includes(n)||t.hasOwnProperty(n))continue;let{root:i,key:a}=u8(e.object,n);if(i.constructor&&0===i.constructor.length){let e=function(e){let t=cr.get(e.constructor);try{t||(t=new e.constructor,cr.set(e.constructor,t))}catch(e){}return t}(i);u4.und(e)||(r[a]=e[a])}else r[a]=0}return r}(e,n);Object.keys(t).length&&(Object.assign(e.props,t),ca(e.object,t))}(null===i.sibling||(4&i.flags)==0)&&function(){for(let[e]of cR){let t=e.parent;if(t)for(let r of(e.props.attach?ce(t,e):co(e.object)&&co(t.object)&&t.object.remove(e.object),e.children))r.props.attach?ce(e,r):co(r.object)&&co(e.object)&&e.object.remove(r.object);e.isHidden&&cE(e),e.object.__r3f&&delete e.object.__r3f,"primitive"!==e.type&&cI(e.object)}for(let[n,i,a]of cR){n.props=i;let s=n.parent;if(s){let i=c_[cw(n.type)],o=n.object;n.object=null!=(e=n.props.object)?e:new i(...null!=(t=n.props.args)?t:[]),n.object.__r3f=n;var e,t,r=n.object;for(let e of[a,a.alternate])if(null!==e)if("function"==typeof e.ref){null==e.refCleanup||e.refCleanup();let t=e.ref(r);"function"==typeof t&&(e.refCleanup=t)}else e.ref&&(e.ref.current=r);for(let e of(!function(e,t,r){let{internal:n}=e.getState();for(let e=0;e<n.interaction.length;e++)n.interaction[e]===t&&(n.interaction[e]=r);for(let e=0;e<n.initialHits.length;e++)n.initialHits[e]===t&&(n.initialHits[e]=r);n.hovered.forEach((e,i)=>{if(e.eventObject===t||e.object===t){n.hovered.delete(i);let a={...e,eventObject:e.eventObject===t?r:e.eventObject,object:e.object===t?r:e.object};
393n.hovered.set(cl(a),a)}}),n.capturedMap.forEach(e=>{let n=e.get(t);n&&(e.delete(t),e.set(r,n))})}(uZ(n),o,n.object),ca(n.object,n.props),n.props.attach?u7(s,n):co(n.object)&&co(s.object)&&s.object.add(n.object),n.children))e.props.attach?u7(n,e):co(e.object)&&co(n.object)&&n.object.add(e.object);cs(n)}}cR.length=0}()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>null==e?void 0:e.object,prepareForCommit:()=>null,preparePortalMount:e=>u6(e.getState().scene,e,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:function(e){if(!e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?ce(e.parent,e):co(e.object)&&(e.object.visible=!1),e.isHidden=!0,cs(e)}},unhideInstance:cE,createTextInstance:cL,hideTextInstance:cL,unhideTextInstance:cL,scheduleTimeout:"function"==typeof setTimeout?setTimeout:void 0,cancelTimeout:"function"==typeof clearTimeout?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:ol.createContext(null),setCurrentUpdatePriority(e){cD=e},getCurrentUpdatePriority:()=>cD,resolveUpdatePriority(){var e;if(0!==cD)return cD;switch("u">typeof window&&(null==(e=window.event)?void 0:e.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return 2;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return 8;default:return 32}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:"9.6.1",applyViewTransitionName(e,t,r){},restoreViewTransitionName(e,t){},cancelViewTransitionName(e,t,r){},cancelRootViewTransitionName(e){},restoreRootViewTransitionName(e){},InstanceMeasurement:null,measureInstance:e=>null,wasInstanceInViewport:e=>!0,hasInstanceChanged:(e,t)=>!1,hasInstanceAffectedParent:(e,t)=>!1,suspendOnActiveViewTransition(e,t){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(e){},createViewTransitionInstance:e=>null,getCurrentGestureOffset(e){throw Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance:(e,t)=>e,cloneMutableTextInstance:e=>e,cloneRootViewTransitionContainer(e){throw Error("Not implemented.")},removeRootViewTransitionClone(e,t){throw Error("Not implemented.")},createFragmentInstance:e=>null,updateFragmentInstanceFiber(e,t){},commitNewChildToFragmentInstance(e,t){},deleteChildFromFragmentInstance(e,t){},measureClonedInstance:e=>null,maySuspendCommitOnUpdate:(e,t,r)=>!1,maySuspendCommitInSyncRender:(e,t)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(e,t)=>null})).injectIntoDevTools(),y),cU=new Map,cF={objects:"shallow",strict:!1};function cz({store:e,children:t,onCreated:r,rootElement:n}){return uQ(()=>{let t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),r&&r(t),e.getState().events.connected||null==t.events.connect||t.events.connect(n)},[]),(0,uB.jsx)(cd.Provider,{value:e,children:t})}function cj(e,t){let r=cU.get(e),n=null==r?void 0:r.fiber;if(n){let i=null==r?void 0:r.store.getState();i&&(i.internal.active=!1),ck.updateContainer(null,n,null,()=>{i&&setTimeout(()=>{try{null==i.events.disconnect||i.events.disconnect(),null==(r=i.gl)||null==(n=r.renderLists)||null==n.dispose||n.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(s=i.gl)&&s.xr&&i.xr.disconnect();var r,n,a,s,o=i.scene;for(let e in"Scene"!==o.type&&(null==o.dispose||o.dispose()),o){let t=o[e];(null==t?void 0:t.type)!=="Scene"&&(null==t||null==t.dispose||t.dispose())}cU.delete(e),t&&t(e)}catch(e){}},500)})}}let cB=new Set,cV=new Set,cG=new Set;function cH(e,t){if(e.size)for(let{callback:r}of e.values())r(t)}function cW(e,t){switch(e){case"before":return cH(cB,t);case"after":return cH(cV,t);case"tail":return cH(cG,t)}}function cX(e,t,r){let n=t.clock.getDelta();"never"===t.frameloop&&"number"==typeof e&&(n=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),s=t.internal.subscribers;for(let e=0;e<s.length;e++)(o=s[e]).ref.current(o.store.getState(),n,r);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),"always"===t.frameloop?1:t.internal.frames}let cq=!1,cY=!1;
393function c$(e){for(let r of(u=requestAnimationFrame(c$),cq=!0,l=0,cW("before",e),cY=!0,cU.values())){var t;(c=r.store.getState()).internal.active&&("always"===c.frameloop||c.internal.frames>0)&&!(null!=(t=c.gl.xr)&&t.isPresenting)&&(l+=cX(e,c))}if(cY=!1,cW("after",e),0===l)return cW("tail",e),cq=!1,cancelAnimationFrame(u)}function cK(e,t=1){var r;if(!e)return cU.forEach(e=>cK(e.store.getState(),t));(null==(r=e.gl.xr)||!r.isPresenting)&&e.internal.active&&"never"!==e.frameloop&&(t>1?e.internal.frames=Math.min(60,e.internal.frames+t):cY?e.internal.frames=2:e.internal.frames=1,cq||(cq=!0,requestAnimationFrame(c$)))}function cZ(e,t=!0,r,n){if(t&&cW("before",e),r)cX(e,r,n);else for(let t of cU.values())cX(e,t.store.getState());t&&cW("after",e)}let cJ={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};e.s(["B",0,function({set:e}){return uQ(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null},"C",0,cf,"D",0,cp,"E",0,u1,"G",0,cv,"a",0,u0,"b",0,uQ,"c",0,function(e){let t,r,n,i,a,s,o,l,u=cU.get(e),c=null==u?void 0:u.fiber,d=null==u?void 0:u.store;u&&console.warn("R3F.createRoot should only be called once!");let h="function"==typeof reportError?reportError:console.error,f=d||(s=(a=(i=(n=(e,t)=>{let r,n=new Q,i=new Q,a=new Q;function s(e=t().camera,r=i,o=t().size){let{width:l,height:u,top:c,left:d}=o,h=l/u;r.isVector3?a.copy(r):a.set(...r);let f=e.getWorldPosition(n).distanceTo(a);if(e&&e.isOrthographicCamera)return{width:l/e.zoom,height:u/e.zoom,top:c,left:d,factor:1,distance:f,aspect:h};{let t=2*Math.tan(e.fov*Math.PI/180/2)*f,r=l/u*t;return{width:r,height:t,top:c,left:d,factor:l/r,distance:f,aspect:h}}}let o=t=>e(e=>({performance:{...e.performance,current:t}})),l=new Z;return{set:e,get:t,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(e=1)=>cK(t(),e),advance:(e,r)=>cZ(e,r,t()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new sH,pointer:l,mouse:l,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{let e=t();r&&clearTimeout(r),e.performance.current!==e.performance.min&&o(e.performance.min),r=setTimeout(()=>o(t().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:s},setEvents:t=>e(e=>({...e,events:{...e.events,...t}})),setSize:(r,n,a=0,o=0)=>{let l=t().camera,u={width:r,height:n,top:a,left:o};e(e=>({size:u,viewport:{...e.viewport,...s(l,i,u)}}))},setDpr:t=>e(e=>{let r=u2(t);return{viewport:{...e.viewport,dpr:r,initialDpr:e.viewport.initialDpr||r}}}),setFrameloop:(r="always")=>{let n=t().clock;n.stop(),n.elapsedTime=0,"never"!==r&&(n.start(),n.elapsedTime=0),e(()=>({frameloop:r}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:ol.createRef(),active:!1,frames:0,priority:0,subscribe:(e,r,n)=>{let i=t().internal;return i.priority=i.priority+ +(r>0),i.subscribers.push({ref:e,priority:r,store:n}),i.subscribers=i.subscribers.sort((e,t)=>e.priority-t.priority),()=>{let n=t().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(r>0),n.subscribers=n.subscribers.filter(t=>t.ref!==e))}}}}})?uk(n,void 0):uk).getState()).size,o=a.viewport.dpr,l=a.camera,i.subscribe(()=>{let{camera:e,size:t,viewport:r,gl:n,set:a}=i.getState();if(t.width!==s.width||t.height!==s.height||r.dpr!==o){s=t,o=r.dpr;!e.manual&&(e&&e.isOrthographicCamera?(e.left=-(t.width/2),e.right=t.width/2,e.top=t.height/2,e.bottom=-(t.height/2)):e.aspect=t.width/t.height,e.updateProjectionMatrix());r.dpr>0&&n.setPixelRatio(r.dpr);let i="u">typeof HTMLCanvasElement&&n.domElement instanceof HTMLCanvasElement;n.setSize(t.width,t.height,i)}e!==l&&(l=e,a(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),i.subscribe(e=>cK(e)),i),p=c||ck.createContainer(f,1,null,!1,null,"",h,h,h,null);u||cU.set(e,{fiber:p,store:f});let m=!1,g=null;return{async configure(n={}){var i,a;let s;g=new Promise(e=>s=e);let{gl:o,size:l,scene:u,events:c,onCreated:d,shadows:h=!1,linear:p=!1,flat:v=!1,legacy:y=!1,orthographic:x=!1,frameloop:b="always",dpr:w=[1,2],performance:M,raycaster:T,camera:E,onPointerMissed:A}=n,C=f.getState(),P=C.gl;if(!C.gl){let t={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},r="function"==typeof o?await o(t):o;P=cc(r)?r:new uR({...t,...o}),C.set({gl:P})}let I=C.raycaster;I||C.set({raycaster:I=new sB});let{params:O,...R}=T||{};if(u4.equ(R,I,cF)||ca(I,{...R}),u4.equ(O,I.params,cF)||ca(I,{params:{...I.params,...O}}),!C.camera||C.camera===r&&!u4.equ(r,E,cF)){r=E;let e=null==E?void 0:E.isCamera,t=e?E:x?new a4(0,0,0,0,.1,1e3):new aQ(75,0,.1,1e3);!e&&(t.position.z=5,E&&(ca(t,E),!t.manual&&("aspect"in E||"left"in E||"right"in E||"bottom"in E||"top"in E)&&(t.manual=!0,t.updateProjectionMatrix())),C.camera||null!=E&&E.rotation||t.lookAt(0,0,0)),C.set({camera:t}),I.camera=t}if(!C.scene){let e;null!=u&&u.isScene?u6(e=u,f,"",{}):(u6(e=new e6,f,"",{}),u&&ca(e,u)),C.set({scene:e})}c&&!C.events.handlers&&C.set({events:c(f)});let L=function(e,t){if(!t&&"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){let{width:t,height:r,top:n,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:r,top:n,left:i}}return!t&&"u">typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0,...t}}(e,l);if(u4.equ(L,C.size,cF)||C.setSize(L.width,L.height,L.top,L.left),w&&C.viewport.dpr!==u2(w)&&C.setDpr(w),C.frameloop!==b&&C.setFrameloop(b),C.onPointerMissed||C.set({onPointerMissed:A}),M&&!u4.equ(M,C.performance,cF)&&C.set(e=>({performance:{...e.performance,...M}})),!C.xr){let e=(e,t)=>
393{let r=f.getState();"never"!==r.frameloop&&cZ(e,!0,r,t)},t=()=>{let t=f.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||cK(t)},r={connect(){let e=f.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){let e=f.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"==typeof(null==(i=P.xr)?void 0:i.addEventListener)&&r.connect(),C.set({xr:r})}if(P.shadowMap){let e=P.shadowMap.enabled,t=P.shadowMap.type;P.shadowMap.enabled=!!h,u4.boo(h)?P.shadowMap.type=2:u4.str(h)?P.shadowMap.type=null!=(a=({basic:0,percentage:1,soft:2,variance:3})[h])?a:2:u4.obj(h)&&Object.assign(P.shadowMap,h),(e!==P.shadowMap.enabled||t!==P.shadowMap.type)&&(P.shadowMap.needsUpdate=!0)}return es.enabled=!y,m||(P.outputColorSpace=p?S:_,P.toneMapping=4*!v),C.legacy!==y&&C.set(()=>({legacy:y})),C.linear!==p&&C.set(()=>({linear:p})),C.flat!==v&&C.set(()=>({flat:v})),!o||u4.fun(o)||cc(o)||u4.equ(o,P,cF)||ca(P,o),t=d,m=!0,s(),this},render(r){return m||g||this.configure(),g.then(()=>{ck.updateContainer((0,uB.jsx)(cz,{store:f,children:r,onCreated:t,rootElement:e}),p,null,()=>void 0)}),f},unmount(){cj(e)}}},"d",0,cj,"e",0,function(e){if("function"==typeof e){let t=`${cM++}`;return c_[t]=e,t}Object.assign(c_,e)},"f",0,function(e){let{handlePointer:t}=function(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var r;return null==(r=e.__r3f)?void 0:r.handlers["onPointer"+t]}))}function r(t){let{internal:r}=e.getState();for(let e of r.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){let n=e.eventObject.__r3f;if(r.hovered.delete(cl(e)),null!=n&&n.eventCount){let r=n.handlers,i={...e,intersections:t};null==r.onPointerOut||r.onPointerOut(i),null==r.onPointerLeave||r.onPointerLeave(i)}}}function n(e,t){for(let r=0;r<t.length;r++){let n=t[r].__r3f;null==n||null==n.handlers.onPointerMissed||n.handlers.onPointerMissed(e)}}return{handlePointer:function(i){switch(i){case"onPointerLeave":case"onPointerCancel":return()=>r([]);case"onLostPointerCapture":return t=>{let{internal:n}=e.getState();"pointerId"in t&&n.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{n.capturedMap.has(t.pointerId)&&(n.capturedMap.delete(t.pointerId),r([]))})}}return function(a){let{onPointerMissed:s,internal:o}=e.getState();o.lastEvent.current=a;let l="onPointerMove"===i,u="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,c=function(t,r){let n=e.getState(),i=new Set,a=[],s=r?r(n.internal.interaction):n.internal.interaction;for(let e=0;e<s.length;e++){let t=u3(s[e]);t&&(t.raycaster.camera=void 0)}n.previousRoot||null==n.events.compute||n.events.compute(t,n);let o=s.flatMap(function(e){let r=u3(e);if(!r||!r.events.enabled||null===r.raycaster.camera)return[];if(void 0===r.raycaster.camera){var n;null==r.events.compute||r.events.compute(t,r,null==(n=r.previousRoot)?void 0:n.getState()),void 0===r.raycaster.camera&&(r.raycaster.camera=null)}return r.raycaster.camera?r.raycaster.intersectObject(e,!0):[]}).sort((e,t)=>{let r=u3(e.object),n=u3(t.object);return r&&n&&n.events.priority-r.events.priority||e.distance-t.distance}).filter(e=>{let t=cl(e);return!i.has(t)&&(i.add(t),!0)});for(let e of(n.events.filter&&(o=n.events.filter(o,n)),o)){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&n.internal.capturedMap.has(t.pointerId))for(let e of n.internal.capturedMap.get(t.pointerId).values())i.has(cl(e.intersection))||a.push(e.intersection);return a}(a,l?t:void 0),d=u?function(t){let{internal:r}=e.getState(),n=t.offsetX-r.initialClick[0],i=t.offsetY-r.initialClick[1];return Math.round(Math.sqrt(n*n+i*i))}(a):0;"onPointerDown"===i&&(o.initialClick=[a.offsetX,a.offsetY],o.initialHits=c.map(e=>e.eventObject)),u&&!c.length&&d<=2&&(n(a,o.interaction),s&&s(a)),l&&r(c),!function(e,t,n,i){if(e.length){let a={stopped:!1};for(let s of e){let o=u3(s.object);if(o||s.object.traverseAncestors(e=>{let t=u3(e);
393if(t)return o=t,!1}),o){let{raycaster:l,pointer:u,camera:c,internal:d}=o,h=new Q(u.x,u.y,0).unproject(c),f=e=>{var t,r;return null!=(t=null==(r=d.capturedMap.get(e))?void 0:r.has(s.eventObject))&&t},p=e=>{let r={intersection:s,target:t.target};d.capturedMap.has(e)?d.capturedMap.get(e).set(s.eventObject,r):d.capturedMap.set(e,new Map([[s.eventObject,r]])),t.target.setPointerCapture(e)},m=e=>{let t=d.capturedMap.get(e);t&&cu(d.capturedMap,s.eventObject,t,e)},g={};for(let e in t){let r=t[e];"function"!=typeof r&&(g[e]=r)}let v={...s,...g,pointer:u,intersections:e,stopped:a.stopped,delta:n,unprojectedPoint:h,ray:l.ray,camera:c,stopPropagation(){let n="pointerId"in t&&d.capturedMap.get(t.pointerId);(!n||n.has(s.eventObject))&&(v.stopped=a.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find(e=>e.eventObject===s.eventObject)&&r([...e.slice(0,e.indexOf(s)),s]))},target:{hasPointerCapture:f,setPointerCapture:p,releasePointerCapture:m},currentTarget:{hasPointerCapture:f,setPointerCapture:p,releasePointerCapture:m},nativeEvent:t};if(i(v),!0===a.stopped)break}}}}(c,a,d,function(e){let t=e.eventObject,r=t.__r3f;if(!(null!=r&&r.eventCount))return;let s=r.handlers;if(l){if(s.onPointerOver||s.onPointerEnter||s.onPointerOut||s.onPointerLeave){let t=cl(e),r=o.hovered.get(t);r?r.stopped&&e.stopPropagation():(o.hovered.set(t,e),null==s.onPointerOver||s.onPointerOver(e),null==s.onPointerEnter||s.onPointerEnter(e))}null==s.onPointerMove||s.onPointerMove(e)}else{let r=s[i];r?(!u||o.initialHits.includes(t))&&(n(a,o.interaction.filter(e=>!o.initialHits.includes(e))),r(e)):u&&o.initialHits.includes(t)&&n(a,o.interaction.filter(e=>!o.initialHits.includes(e)))}})}}}}(e);return{priority:1,enabled:!0,compute(e,t,r){t.pointer.set(e.offsetX/t.size.width*2-1,-(2*(e.offsetY/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(cJ).reduce((e,r)=>({...e,[r]:t(r)}),{}),update:()=>{var t;let{events:r,internal:n}=e.getState();null!=(t=n.lastEvent)&&t.current&&r.handlers&&r.handlers.onPointerMove(n.lastEvent.current)},connect:t=>{let{set:r,events:n}=e.getState();if(null==n.disconnect||n.disconnect(),r(e=>({events:{...e.events,connected:t}})),n.handlers)for(let e in n.handlers){let r=n.handlers[e],[i,a]=cJ[e];t.addEventListener(i,r,{passive:a})}},disconnect:()=>{let{set:t,events:r}=e.getState();if(r.connected){if(r.handlers)for(let e in r.handlers){let t=r.handlers[e],[n]=cJ[e];r.connected.removeEventListener(n,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}},"i",0,e=>e&&e.hasOwnProperty("current"),"u",0,function(){let e=uq(),t=uK();return ol.useMemo(()=>({children:r})=>{let n=uG(e,!0,e=>e.type===ol.StrictMode)?ol.StrictMode:ol.Fragment;return(0,uB.jsx)(n,{children:(0,uB.jsx)(t,{children:r})})},[e,t])}],1950),e.s(["useFrame",0,cp],25234),e.s(["useThree",0,cf],28600)},55838,(e,t,r)=>{"use strict";var n=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,s=n.useEffect,o=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return o(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},2239,(e,t,r)=>{"use strict";e.i(47167),t.exports=e.r(55838)},52822,(e,t,r)=>{"use strict";var n=e.r(71645),i=e.r(2239),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,o=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var d=o(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=s(e,(d=u(function(){function e(e){if(!l){if(l=!0,s=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(s=e,t):(s=e,o=r)}var s,o,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]))[0],d[1]);return l(function(){h.hasValue=!0,h.value=f},[f]),c(f),f}},30224,(e,t,r)=>{"use strict";e.i(47167),t.exports=e.r(52822)},14595,(e,t,r)=>{"use strict";var n=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useSyncExternalStore,s=n.useRef,o=n.useEffect,l=n.useMemo,u=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,c){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=a(e,(d=l(function(){function e(e){if(!o){if(o=!0,a=e,e=n(e),void 0!==c&&h.hasValue){var t=h.value;if(c(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var r=n(e);return void 0!==c&&c(t,r)?(a=e,t):(a=e,s=r)}var a,s,o=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,r,n,c]))[0],d[1]);return o(function(){h.hasValue=!0,h.value=f},[f]),u(f),f}},13027,(e,t,r)=>{"use strict";e.i(47167),t.exports=e.r(14595)},57932,e=>{e.v({iframeContainer:"index-module-scss-module__i4Sa5G__iframeC
393ontainer",learnMore:"index-module-scss-module__i4Sa5G__learnMore",paddingAbove:"index-module-scss-module__i4Sa5G__paddingAbove",paddingBelow:"index-module-scss-module__i4Sa5G__paddingBelow",section:"index-module-scss-module__i4Sa5G__section"})},50663,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(43794),i=e.i(72951),a=e.i(17772),s=e.i(30386),o=e.i(57932);function l({ad:e,locale:r}){let n=(0,i.resolveLinkUrl)(e.link,r)??"";if(!n)return null;if(e.websiteEmbedAd)return(0,t.jsxs)("div",{className:o.default.iframeContainer,children:[(0,t.jsx)("a",{href:n,target:"_blank",rel:"noreferrer"}),(0,t.jsx)("iframe",{src:`/ads/${e.websiteEmbedAd}/index.html`,loading:"lazy",referrerPolicy:"no-referrer",width:970,height:260,frameBorder:0})]});let u=(0,a.blobifyImage)(e.image,{sizes:"(min-width: 768px) 80vw, 100vw",locale:r,alt:""});return u?(0,t.jsx)(s.default,{style:{transform:"translateY(.5rem)"},delay:50,children:(0,t.jsx)("a",{href:n,target:"_blank",rel:"noreferrer",children:(0,t.jsx)("img",{...u,loading:"lazy"})})}):null}e.s(["default",0,function({block:e,locale:i}){let a=e.items??[],[s,u]=(0,r.useState)(null);return((0,r.useEffect)(()=>{0!==a.length&&u(a[Math.floor(Math.random()*a.length)]??null)},[a]),0===a.length)?null:(0,t.jsx)("section",{"data-block-type":e.type,className:(0,n.default)(o.default.section,e.paddingAbove&&o.default.paddingAbove,e.paddingBelow&&o.default.paddingBelow),children:s&&(0,t.jsx)(l,{ad:s,locale:i})})}])},45076,e=>{e.v({answer:"index-module-scss-module__j9GDHa__answer",answerInner:"index-module-scss-module__j9GDHa__answerInner",btn:"index-module-scss-module__j9GDHa__btn",title:"index-module-scss-module__j9GDHa__title"})},94383,e=>{"use strict";var t=e.i(43476),r=e.i(46932),n=e.i(71645),i=e.i(45076);let a={open:{height:"auto"},closed:{height:0}},s={open:{rotate:-180},closed:{rotate:0}};e.s(["default",0,({question:e,isOpenInitially:o,id:l,children:u})=>{let[c,d]=(0,n.useState)(o);return(0,t.jsxs)(r.motion.button,{className:i.default.btn,id:`toggle-${l}`,onClick:()=>d(!c),"aria-expanded":c,"aria-controls":l,children:[(0,t.jsxs)("div",{className:i.default.title,children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(r.motion.div,{variants:s,initial:c?"open":"closed",animate:c?"open":"closed",transition:{duration:.3,ease:[.215,.61,.355,1]},children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#fff",width:"24px",height:"24px",viewBox:"0 0 256 256",children:(0,t.jsx)("path",{d:"M128,188a11.96187,11.96187,0,0,1-8.48535-3.51465l-80-80a12.0001,12.0001,0,0,1,16.9707-16.9707L128,159.0293l71.51465-71.51465a12.0001,12.0001,0,0,1,16.9707,16.9707l-80,80A11.96187,11.96187,0,0,1,128,188Z"})})},l)]}),(0,t.jsx)(r.motion.div,{id:l,"aria-labelledby":`toggle-${l}`,role:"region",initial:c?"open":"closed",animate:c?"open":"closed",variants:a,transition:{duration:.4,ease:[.215,.61,.355,1]},className:i.default.answer,children:(0,t.jsx)("div",{className:i.default.answerInner,children:u})},l)]})}])},63304,e=>{e.v({bottomWrapper:"index-module-scss-module__BfUfTW__bottomWrapper",btnWrapper:"index-module-scss-module__BfUfTW__btnWrapper",contentInView:"index-module-scss-module__BfUfTW__contentInView",heroContent:"index-module-scss-module__BfUfTW__heroContent",heroImage:"index-module-scss-module__BfUfTW__heroImage",heroImageOverlay:"index-module-scss-module__BfUfTW__heroImageOverlay",heroSection:"index-module-scss-module__BfUfTW__heroSection",isImageLoaded:"index-module-scss-module__BfUfTW__isImageLoaded",isMiniHero:"index-module-scss-module__BfUfTW__isMiniHero",isZoomIntoBackground:"index-module-scss-module__BfUfTW__isZoomIntoBackground",topPart:"index-module-scss-module__BfUfTW__topPart",videoLoaded:"index-module-scss-module__BfUfTW__videoLoaded"})},49741,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(43794),i=e.i(54513),a=e.i(72951),s=e.i(17772),o=e.i(67372),l=e.i(53964),u=e.i(63304);e.s(["default",0,function({block:e,locale:c}){let d=!!(e.videoBackgroundUrl&&e.videoBackgroundUrl.length>0),h=e.videoBackgroundUrl,[f,p]=(0,r.useState)(!1),m=(0,r.useRef)(null),[g,v]=(0,r.useState)(!1),[y,x]=(0,r.useState)(!1),[b,_]=(0,r.useState)(!1),{ref:S,inView:w}=(0,i.useInView)({triggerOnce:!0,threshold:0,initialInView:!1});(0,r.useEffect)(()=>{let e=setTimeout(()=>_(!0),90);return()=>clearTimeout(e)},[]),(0,r.useEffect)(()=>{d&&x(!0)},[d]);let M=(0,a.resolveLinkUrl)(e.buttonLink,c)??"/",T=e.buttonLinkText?.[c],E=null==e.showPageColorWithGradient||!0===e.showPageColorWithGradient,A=e.backgroundBrightness??1,
393C=e.backgroundImage?(0,s.blobifyImage)(e.backgroundImage,{sizes:d?"80vw":"90vw",locale:c}):null;return(0,t.jsxs)("section",{className:(0,n.default)(u.default.heroSection,e.miniHero&&u.default.isMiniHero,e.zoomIntoBackgroundImage&&u.default.isZoomIntoBackground,g&&u.default.isImageLoaded),children:[e.backgroundImage?.url&&(0,t.jsxs)(t.Fragment,{children:[d&&h&&(0,t.jsx)("video",{loop:!0,autoPlay:!0,playsInline:!0,muted:!0,ref:m,className:(0,n.default)(f&&u.default.videoLoaded),src:y?h:void 0,onPlay:()=>p(!0),onCanPlay:()=>p(!0),onPause:()=>p(!1),style:{filter:`brightness(${A})`}}),C&&(0,t.jsx)("img",{...C,className:u.default.heroImage,loading:"eager",decoding:"async",onLoad:()=>v(!0),style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",filter:`brightness(${A})`}}),E&&(0,t.jsx)("div",{className:u.default.heroImageOverlay})]}),(0,t.jsxs)("div",{className:(0,n.default)(u.default.heroContent,w&&b&&u.default.contentInView),ref:S,children:[(0,t.jsx)(l.default,{field:e.title,locale:c}),e.description&&(0,t.jsx)(l.default,{field:e.description,locale:c}),T&&e.buttonLink&&(0,t.jsx)("div",{className:u.default.btnWrapper,children:(0,t.jsx)(o.default,{href:M,children:T})})]})]})}])},1756,e=>{e.v({countdown:"index-module-scss-module__aecwWa__countdown",countdownClock:"index-module-scss-module__aecwWa__countdownClock",countdownTitle:"index-module-scss-module__aecwWa__countdownTitle",showCountdown:"index-module-scss-module__aecwWa__showCountdown"})},38987,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(1756),i=e.i(43794);let a=new Date(2026,7,12,16,47);e.s(["default",0,({children:e})=>{let[s,o]=(0,r.useState)(!1),[l,u]=(0,r.useState)({days:0,hours:0,minutes:0,seconds:0});return(0,r.useEffect)(()=>{let e=()=>{let e=new Date().getTime(),r=a.getTime()-e,n=Math.floor(r/864e5),i=Math.floor(r%864e5/36e5);u({days:n,hours:i,minutes:Math.floor(r%36e5/6e4),seconds:Math.floor(r%6e4/1e3)}),r<0&&(clearInterval(t),u({days:0,hours:0,minutes:0,seconds:0}))},t=setInterval(()=>{e()},1e3);return e(),s||o(!0),()=>clearInterval(t)},[s]),(0,t.jsxs)("div",{className:(0,i.default)(n.default.countdown,s&&n.default.showCountdown),children:[(0,t.jsx)("div",{className:n.default.countdownTitle,children:e}),(0,t.jsxs)("div",{className:n.default.countdownClock,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:l.days}),(0,t.jsx)("span",{children:"days"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:l.hours}),(0,t.jsx)("span",{children:"hours"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:l.minutes}),(0,t.jsx)("span",{children:"minutes"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:l.seconds}),(0,t.jsx)("span",{children:"seconds"})]})]})]})}])},72324,e=>{e.v({learnMore:"index-module-scss-module__kKujPG__learnMore",section:"index-module-scss-module__kKujPG__section"})},8267,e=>{"use strict";var t=e.i(43476),r=e.i(72951),n=e.i(17772),i=e.i(30386),a=e.i(72324);e.s(["default",0,function({block:e,locale:s}){let o=(0,r.resolveLinkUrl)(e.link,s)??"",l=(0,n.blobifyImage)(e.image,{sizes:"(min-width: 768px) 80vw, 100vw",locale:s,alt:""});return l?(0,t.jsx)("section",{"data-block-type":e.type,className:a.default.section,children:(0,t.jsx)(i.default,{style:{transform:"translateY(.5rem)"},delay:50,children:(0,t.jsx)("a",{href:o,target:"_blank",rel:"noreferrer",children:(0,t.jsx)("img",{...l,loading:"lazy"})})})}):null}])},13901,e=>{e.v({content:"index-module-scss-module__kNeMwa__content",embeddedContent:"index-module-scss-module__kNeMwa__embeddedContent",figcaption:"index-module-scss-module__kNeMwa__figcaption",image:"index-module-scss-module__kNeMwa__image",imageLeft:"index-module-scss-module__kNeMwa__imageLeft",link:"index-module-scss-module__kNeMwa__link",paddingAbove:"index-module-scss-module__kNeMwa__paddingAbove",paddingBelow:"index-module-scss-module__kNeMwa__paddingBelow",section:"index-module-scss-module__kNeMwa__section",showImagesInOriginalSize:"index-module-scss-module__kNeMwa__showImagesInOriginalSize",ytEmbed:"index-module-scss-module__kNeMwa__ytEmbed"})},27423,e=>{"use strict";var t=e.i(43476),r=e.i(43794),n=e.i(71645),i=e.i(53964),a=e.i(30386),s=e.i(99751),o=e.i(17772),l=e.i(13901);e.s(["default",0,function({block:e,locale:u}
393){let c,[d,h]=(0,n.useState)(null);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("section",{"data-block-type":e.type,className:(0,r.default)(l.default.section,e.paddingAbove&&l.default.paddingAbove,e.paddingBelow&&l.default.paddingBelow,"Left"===e.imagePosition?l.default.imageLeft:l.default.imageRight,e.showImagesInOriginalSize&&l.default.showImagesInOriginalSize),children:(0,t.jsx)(a.default,{triggerOnce:!0,children:(0,t.jsx)("div",{className:l.default.content,children:(0,t.jsx)(i.default,{field:e.text,locale:u,components:{asset:({node:e})=>{let r=e.caption||e.alt||"",n=(0,o.blobifyImage)(e,{sizes:"(min-width: 768px) 40vw, 100vw",locale:u,widths:o.BODY_IMAGE_WIDTHS,alt:r?"":e.alt??""});return n?(0,t.jsxs)("div",{className:l.default.image,onClick:()=>h(e),role:"button",tabIndex:0,children:[(0,t.jsx)("img",{...n,loading:"lazy",decoding:"async",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}),r&&(0,t.jsx)("figcaption",{className:l.default.figcaption,children:r})]}):null}}})})})}),d?.url&&((c=(0,o.blobifyImage)(d,{sizes:"90vw",locale:u,alt:d.alt??"",quality:85}))?(0,t.jsx)(s.default,{onClose:()=>h(null),mediaChildren:(0,t.jsx)("img",{...c,loading:"lazy",decoding:"async"}),showBackdrop:!0}):null)]})}])},24450,e=>{e.v({inView:"index-module-scss-module__1tJBra__inView",section:"index-module-scss-module__1tJBra__section",smallPadding:"index-module-scss-module__1tJBra__smallPadding",smallerParagraph:"index-module-scss-module__1tJBra__smallerParagraph"})},41634,e=>{"use strict";var t=e.i(43476),r=e.i(54513),n=e.i(43794),i=e.i(53964),a=e.i(24450);e.s(["default",0,function({block:e,locale:s}){let{ref:o,inView:l}=(0,r.useInView)({threshold:.3,triggerOnce:!0});return(0,t.jsxs)("section",{ref:o,"data-block-type":e.type,className:(0,n.default)(a.default.section,l&&a.default.inView,e.smallPadding&&a.default.smallPadding,e.smallerParagraph&&a.default.smallerParagraph),children:[e.title&&(0,t.jsx)(i.default,{field:e.title,locale:s}),e.subtitle&&(0,t.jsx)(i.default,{field:e.subtitle,locale:s})]})}])},71900,e=>{e.v({column:"index-module-scss-module__NlNHLW__column",content:"index-module-scss-module__NlNHLW__content",first:"index-module-scss-module__NlNHLW__first",horizontalPadding:"index-module-scss-module__NlNHLW__horizontalPadding",image:"index-module-scss-module__NlNHLW__image","left-bottom":"index-module-scss-module__NlNHLW__left-bottom","left-center":"index-module-scss-module__NlNHLW__left-center","left-top":"index-module-scss-module__NlNHLW__left-top",link:"index-module-scss-module__NlNHLW__link",paddingAbove:"index-module-scss-module__NlNHLW__paddingAbove",paddingBelow:"index-module-scss-module__NlNHLW__paddingBelow","right-bottom":"index-module-scss-module__NlNHLW__right-bottom","right-center":"index-module-scss-module__NlNHLW__right-center","right-top":"index-module-scss-module__NlNHLW__right-top",section:"index-module-scss-module__NlNHLW__section",showImagesInOriginalSize:"index-module-scss-module__NlNHLW__showImagesInOriginalSize",ytEmbed:"index-module-scss-module__NlNHLW__ytEmbed"})},91639,e=>{"use strict";var t=e.i(43476),r=e.i(43794),n=e.i(53964),i=e.i(30386),a=e.i(17772),s=e.i(71900);e.s(["default",0,function({block:e,locale:o}){let l={asset:({node:r})=>{let n=r.caption||r.alt||"",i=(0,a.blobifyImage)(r,{sizes:"(min-width: 768px) 45vw, 100vw",locale:o,widths:a.BODY_IMAGE_WIDTHS,alt:n?"":r.alt??""});return i?(0,t.jsxs)("div",{className:s.default.image,children:[(0,t.jsx)("img",{...i,loading:"lazy",decoding:"async",style:e.showImagesInOriginalSize?void 0:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}),n&&(0,t.jsx)("figcaption",{children:n})]}):null}};return(0,t.jsx)("section",{"data-block-type":e.type,className:(0,r.default)(s.default.section,e.paddingAbove&&s.default.paddingAbove,e.paddingBelow&&s.default.paddingBelow,e.horizontalPadding&&s.default.horizontalPadding,e.leftVerticalAlignment&&s.default[`left-${e.leftVerticalAlignment}`],e.rightVerticalAlignment&&s.default[`right-${e.rightVerticalAlignment}`],e.showImagesInOriginalSize&&s.default.showImagesInOriginalSize),children:(0,t.jsx)(i.default,{triggerOnce:!0,children:(0,t.jsxs)("div",{className:s.default.content,children:[(0,t.jsx)("div",{className:(0,r.default)(s.default.first,s.default.column),children:e.leftText&&(0,t.jsx)(n.default,{field:e.leftText,locale:o,components:l})}),(0,t.jsx)("div",{className:(0,r.default)(s.default.second,s.default.column),children:e.rightText&&(0,t.jsx)(n.default,{field:e.rightText,locale:o,components:l})})]})})})}])},77681,e=>{e.v({background:"index-module-scss-module__Q86x4q__background",discount:"index-module-scss-module__Q86x4q__discount",item:"index-module-scss-module__Q86x4q__item",linear:"index-module-scss-module__Q86x4q__linear",paddingAbove:"index-module-scss-module__Q86x4q__paddingAbove",paddingBelow:"index-module-scss-module__Q86x4q__paddingBelow",price:"index-module-scss-module__Q86x4q__price",section:"index-module-scss-module__Q86x4q__section",storyInfo:"index-module-scss-module__Q86x4q__storyInfo",swiper:"index-module-scss-module__Q86x4q__swiper",swiperItems:"index-module-scss-module__Q86x4q__swiperItems",title:"index-module-scss-module__Q86x4q__title"})},29040,e=>{"use strict";var t=e.i(43476),r=e.i(71645);function n(e=""){return`.${e.trim().replace(/([.:!+/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}var i=e.i(99946);let a=e=>{if(e.virtual&&e.params.virtual?.enabled)return e.virtual.slides.length;let t=e.params.grid?.rows;return e.grid&&t&&t>1?e.slides.length/Math.ceil(t):e.slides.length},s=({swiper:e,extendParams:t,on:r,emit:s})=>{let o,l="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${l}-bullet`,bulletActiveClass:`${l}-bullet-active`,modifierClass:`${l}-`,currentClass:`${l}-current`,totalClass:`${l}-total`,hiddenClass:`${l}-hidden`,progressbarFillClass:`${l}-progressbar-fill`,progressbarOppositeClass:`${l}-progressbar-opposite`,clickableClass:`${l}-clickable`,lockClass:`${l}-lock`,horizontalClass:`${l}-horizontal`,verticalClass:`${l}-vertical`,paginationDisabledClass:`${l}-disabled`}}),e.pagination={el:null,bullets:[]};let u=0;function c(){return e.params.pagination}function d(){return!c().el||!e.pagination.el||Array.isArray(e.pagination.el)&&0===e.pagination.el.length}function h(e,t){let{bulletActiveClass:r}=c();if(!e)return;let n=e[`${"prev"===t?"previous":"next"}ElementSibling`];n&&(n.classList.add(`${r}-${t}`),(n=n[`${"prev"===t?"previous":"next"}ElementSibling`])&&n.classList.add(`${r}-${t}-${t}`))}function f(t){let r=t.target.closest(n(c().bulletClass));if(!r)return;t.preventDefault();let a=((0,i.b)(r)??0)*(e.params.slidesPerGroup??1);if(e.params.loop){var s,o,l;if(e.realIndex===a)return;let t=(s=e.realIndex,o=a,(s%=l=e.slides.length,(o%=l)===s+1)?"next":o===s-1?"previous":void 0);"next"===t?e.slideNext():"previous"===t?e.slidePrev():e.slideToLoop(a)}else e.slideTo(a)}function p(){let t,r,l=e.rtl,f=c();if(d())return;
393let p=(0,i.s)(e.pagination.el),m=a(e),g=e.params.loop?Math.ceil(m/(e.params.slidesPerGroup??1)):e.snapGrid.length;if(e.params.loop?(r=e.previousRealIndex||0,t=(e.params.slidesPerGroup??1)>1?Math.floor(e.realIndex/(e.params.slidesPerGroup??1)):e.realIndex):void 0!==e.snapIndex?(t=e.snapIndex,r=e.previousSnapIndex):(r=e.previousIndex||0,t=e.activeIndex||0),"bullets"===f.type&&e.pagination.bullets&&e.pagination.bullets.length>0){let n=e.pagination.bullets,a=0,s=0,c=0;if(f.dynamicBullets){o=(0,i.i)(n[0],e.isHorizontal()?"width":"height");let l=e.isHorizontal()?"width":"height";p.forEach(e=>{e.style[l]=`${(o??0)*(f.dynamicMainBullets+4)}px`}),f.dynamicMainBullets>1&&void 0!==r&&((u+=t-(r||0))>f.dynamicMainBullets-1?u=f.dynamicMainBullets-1:u<0&&(u=0)),c=((s=(a=Math.max(t-u,0))+(Math.min(n.length,f.dynamicMainBullets)-1))+a)/2}if(n.forEach(e=>{let t=["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${f.bulletActiveClass}${e}`).flatMap(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):[e]);e.classList.remove(...t)}),p.length>1)n.forEach(r=>{let n=(0,i.b)(r);n===t?r.classList.add(...f.bulletActiveClass.split(" ")):e.isElement&&r.setAttribute("part","bullet"),f.dynamicBullets&&void 0!==n&&(n>=a&&n<=s&&r.classList.add(...`${f.bulletActiveClass}-main`.split(" ")),n===a&&h(r,"prev"),n===s&&h(r,"next"))});else{let r=n[t];if(r&&r.classList.add(...f.bulletActiveClass.split(" ")),e.isElement&&n.forEach((e,r)=>{e.setAttribute("part",r===t?"bullet-active":"bullet")}),f.dynamicBullets){let e=n[a],t=n[s];for(let e=a;e<=s;e+=1)n[e]&&n[e].classList.add(...`${f.bulletActiveClass}-main`.split(" "));h(e,"prev"),h(t,"next")}}if(f.dynamicBullets){let t=Math.min(n.length,f.dynamicMainBullets+4),r=((o??0)*t-(o??0))/2-c*(o??0),i=e.isHorizontal()?l?"right":"left":"top";n.forEach(e=>{e.style[i]=`${r}px`})}}p.forEach((r,a)=>{if("fraction"===f.type&&(r.querySelectorAll(n(f.currentClass)).forEach(e=>{e.textContent=String(f.formatFractionCurrent(t+1))}),r.querySelectorAll(n(f.totalClass)).forEach(e=>{e.textContent=String(f.formatFractionTotal(g))})),"progressbar"===f.type){let i;i=f.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";let a=(t+1)/g,s=1,o=1;"horizontal"===i?s=a:o=a,r.querySelectorAll(n(f.progressbarFillClass)).forEach(t=>{t.style.transform=`translate3d(0,0,0) scaleX(${s}) scaleY(${o})`,t.style.transitionDuration=`${e.params.speed}ms`})}"custom"===f.type&&f.renderCustom?((0,i.w)(r,f.renderCustom(e,t+1,g)),0===a&&s("paginationRender",r)):(0===a&&s("paginationRender",r),s("paginationUpdate",r)),e.params.watchOverflow&&e.enabled&&r.classList[e.isLocked?"add":"remove"](f.lockClass)})}function m(){let t=c();if(d())return;let r=a(e),o=(0,i.s)(e.pagination.el),l="";if("bullets"===t.type){let n=e.params.loop?Math.ceil(r/(e.params.slidesPerGroup??1)):e.snapGrid.length;e.params.freeMode&&e.params.freeMode?.enabled&&n>r&&(n=r);for(let r=0;r<n;r+=1)t.renderBullet?l+=t.renderBullet.call(e,r,t.bulletClass):l+=`<${t.bulletElement} ${e.isElement?'part="bullet"':""} class="${t.bulletClass}"></${t.bulletElement}>`}"fraction"===t.type&&(l=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`),"progressbar"===t.type&&(l=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`),e.pagination.bullets=[],o.forEach(r=>{"custom"!==t.type&&(0,i.w)(r,l||""),"bullets"===t.type&&e.pagination.bullets.push(...Array.from(r.querySelectorAll(n(t.bulletClass))))}),"custom"!==t.type&&s("paginationRender",o[0])}function g(){var t,r,n;let a,s,o;e.params.pagination=(t=e.originalParams.pagination,r=e.params.pagination,n={el:"swiper-pagination"},s=r??{},o=t??{},e.params.createElements&&Object.keys(n).forEach(t=>{if(!s[t]&&!0===s.auto){let r=(0,i.e)(e.el,`.${n[t]}`)[0];r||((r=(0,i.a)("div",n[t])).className=n[t],e.el.append(r)),s[t]=r,o[t]=r}}),s);let l=c();if(l.el){if("string"==typeof l.el&&e.isElement&&(a=e.el.querySelector(l.el)),a||"string"!=typeof l.el||(a=[...document.querySelectorAll(l.el)]),a||(a=l.el),!(!a||Array.isArray(a)&&0===a.length)){if(e.params.uniqueNavElements&&"string"==typeof l.el&&Array.isArray(a)&&a.length>1&&(a=[...e.el.querySelectorAll(l.el)]).length>1){let t=a.find(t=>(0,i.j)(t,".swiper")[0]===e.el);t&&(a=t)}Array.isArray(a)&&1===a.length&&(a=a[0]),Object.assign(e.pagination,{el:a}
393),(0,i.s)(a).forEach(t=>{"bullets"===l.type&&l.clickable&&t.classList.add(...(l.clickableClass||"").split(" ")),t.classList.add(l.modifierClass+l.type),t.classList.add(e.isHorizontal()?l.horizontalClass:l.verticalClass),"bullets"===l.type&&l.dynamicBullets&&(t.classList.add(`${l.modifierClass}${l.type}-dynamic`),u=0,l.dynamicMainBullets<1&&(l.dynamicMainBullets=1)),"progressbar"===l.type&&l.progressbarOpposite&&t.classList.add(l.progressbarOppositeClass),l.clickable&&t.addEventListener("click",f),e.enabled||t.classList.add(l.lockClass)})}}}function v(){let t=c();if(d())return;let r=e.pagination.el;r&&(0,i.s)(r).forEach(r=>{r.classList.remove(t.hiddenClass),r.classList.remove(t.modifierClass+t.type),r.classList.remove(e.isHorizontal()?t.horizontalClass:t.verticalClass),t.clickable&&(r.classList.remove(...(t.clickableClass||"").split(" ")),r.removeEventListener("click",f))}),e.pagination.bullets&&e.pagination.bullets.forEach(e=>e.classList.remove(...t.bulletActiveClass.split(" ")))}r("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;let t=c();(0,i.s)(e.pagination.el).forEach(r=>{r.classList.remove(t.horizontalClass,t.verticalClass),r.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass)})}),r("init",()=>{!1===c().enabled?y():(g(),m(),p())}),r("activeIndexChange",()=>{void 0===e.snapIndex&&p()}),r("snapIndexChange",()=>{p()}),r("snapGridLengthChange",()=>{m(),p()}),r("destroy",()=>{v()}),r("enable disable",()=>{let{el:t}=e.pagination;if(t){let r=c();(0,i.s)(t).forEach(t=>t.classList[e.enabled?"remove":"add"](r.lockClass))}}),r("lock unlock",()=>{p()}),r("click",(t,r)=>{let n=r.target,a=(0,i.s)(e.pagination.el),o=c();if(o.el&&o.hideOnClick&&a&&a.length>0&&!n.classList.contains(o.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&n===e.navigation.nextEl||e.navigation.prevEl&&n===e.navigation.prevEl))return;!0===a[0].classList.contains(o.hiddenClass)?s("paginationShow"):s("paginationHide"),a.forEach(e=>e.classList.toggle(o.hiddenClass))}});let y=()=>{let t=c();e.el.classList.add(t.paginationDisabledClass);let{el:r}=e.pagination;r&&(0,i.s)(r).forEach(e=>e.classList.add(t.paginationDisabledClass)),v()};Object.assign(e.pagination,{enable:()=>{let t=c();e.el.classList.remove(t.paginationDisabledClass);let{el:r}=e.pagination;r&&(0,i.s)(r).forEach(e=>e.classList.remove(t.paginationDisabledClass)),g(),m(),p()},disable:y,render:m,update:p,init:g,destroy:v})};var o=e.i(80401),l=e.i(70758),u=e.i(77681);e.s(["default",0,function({stories:e}){let[n,i]=(0,r.useState)(!1);return((0,r.useEffect)(()=>i(!0),[]),n&&0!==e.length)?(0,t.jsx)("div",{className:u.default.swiperItems,children:(0,t.jsx)(o.Swiper,{centeredSlides:!0,grabCursor:!0,className:u.default.swiper,spaceBetween:20,slidesPerView:1.2,initialSlide:0,modules:[s],pagination:{dynamicBullets:!0,clickable:!0,type:"bullets"},breakpoints:{340:{slidesPerView:1.2,centeredSlides:!0},640:{slidesPerView:2.2,centeredSlides:!1},768:{slidesPerView:2.2,centeredSlides:!1},980:{slidesPerView:3.2,centeredSlides:!1},1200:{slidesPerView:4,centeredSlides:!1},1900:{slidesPerView:5,centeredSlides:!1}},children:e.map((e,r)=>(0,t.jsx)(o.SwiperSlide,{children:(0,t.jsx)("div",{className:u.default.item,children:(0,t.jsx)(l.default,{image:e.image,link:e.link,imageSize:"large",children:(0,t.jsx)("h4",{children:e.title})})})},e.id??r))})}):null}],29040)},22382,e=>{e.v({bottomPadding:"index-module-scss-module__aV77zW__bottomPadding",chapters:"index-module-scss-module__aV77zW__chapters",content:"index-module-scss-module__aV77zW__content",embeddedContent:"index-module-scss-module__aV77zW__embeddedContent",image:"index-module-scss-module__aV77zW__image",link:"index-module-scss-module__aV77zW__link",linkAnchor:"index-module-scss-module__aV77zW__linkAnchor",section:"index-module-scss-module__aV77zW__section",showImagesFullSize:"index-module-scss-module__aV77zW__showImagesFullSize",storyWrapper:"index-module-scss-module__aV77zW__storyWrapper",topPadding:"index-module-scss-module__aV77zW__topPadding",ytEmbed:"index-module-scss-module__aV77zW__ytEmbed"})},6779,e=>{"use strict";var t=e.i(43476),r=e.i(43794),n=e.i(71645),i=e.i(46932),a=e.i(53964),s=e.i(30386);let o=()=>((0,n.useEffect)(()=>{window?.instgrm?.Embeds&&window.instgrm.Embeds.process()}),null);var l=e.i(99751),u=e.i(17772),c=e.i(22382);let d={visible:{opacity:1,transition:{when:"beforeChildren",staggerChildren:.1}},hidden:{opacity:0,transition:{when:"afterChildren"}}},h={visible:{opacity:1,x:0},hidden:{opacity:0,x:-10}},f=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),p=e=>e.children.filter(e=>"text"===e.type).map(e=>e.value).join("");e.s(["default",0,function({block:e,locale:m,isStory:g}
393){let v,[y,x]=(0,n.useState)(null),b=e.text?.[m],_=(b?.children??[]).filter(e=>"heading"===e.type&&(1===e.depth||2===e.depth||3===e.depth)).map(e=>e),S=_.length>0,w={heading:({node:e,defaultChildren:r})=>{let n=f(p(e));return(0,t.jsxs)(t.Fragment,{children:[r,(0,t.jsx)("div",{id:n,className:c.default.linkAnchor})]})},asset:({node:n})=>{let i=n.caption||n.alt||"",a=(0,u.blobifyImage)(n,{sizes:"90vw",locale:m,widths:u.BODY_IMAGE_WIDTHS,alt:i?"":n.alt??""});return a?(0,t.jsxs)("div",{className:(0,r.default)(c.default.image,e.showImagesInFullSize&&c.default.showImagesFullSize),onClick:()=>x(n),role:"button",tabIndex:0,children:[(0,t.jsx)("img",{...a,loading:"lazy",decoding:"async"}),i&&(0,t.jsx)("figcaption",{children:i})]}):null}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{}),(0,t.jsx)("section",{"data-block-type":e.type,className:(0,r.default)(c.default.section,e.topPadding&&c.default.topPadding,e.bottomPadding&&c.default.bottomPadding),children:(0,t.jsx)(s.default,{triggerOnce:!0,children:g?(0,t.jsxs)("div",{className:c.default.storyWrapper,children:[(0,t.jsx)("div",{className:c.default.content,children:(0,t.jsx)(a.default,{field:e.text,locale:m,components:w})}),S&&(0,t.jsx)("aside",{className:c.default.storyAside,children:(0,t.jsxs)("div",{className:c.default.chapters,children:[(0,t.jsx)("strong",{children:"is"===m?"Kaflar":"Chapters"}),(0,t.jsx)(i.motion.ul,{initial:"hidden",animate:"visible",variants:d,children:_.map((e,r)=>{let n=p(e);return(0,t.jsx)(i.motion.li,{variants:h,children:(0,t.jsx)("a",{href:`#${f(n)}`,children:n})},r)})})]})})]}):(0,t.jsx)("div",{className:c.default.content,children:(0,t.jsx)(a.default,{field:e.text,locale:m,components:w})})})}),y?.url&&((v=(0,u.blobifyImage)(y,{sizes:"90vw",locale:m,alt:y.alt??"",quality:85}))?(0,t.jsx)(l.default,{onClose:()=>x(null),mediaChildren:(0,t.jsx)("img",{...v,loading:"lazy",decoding:"async"}),showBackdrop:!0}):null)]})}],6779)},94536,e=>{"use strict";var t=e.i(43476),r=e.i(80401),n=e.i(28579),i=e.i(70758);let a=({fillColor:e,strokeWidth:r=3})=>(0,t.jsx)("svg",{fill:e,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M512 0C229.232 0 0 229.232 0 512c0 282.784 229.232 512 512 512 282.784 0 512-229.216 512-512C1024 229.232 794.784 0 512 0zm0 961.008c-247.024 0-448-201.984-448-449.01 0-247.024 200.976-448 448-448s448 200.977 448 448-200.976 449.01-448 449.01zm32-462V192.002c0-17.664-14.336-32-32-32s-32 14.336-32 32v320c0 9.056 3.792 17.2 9.856 23.007.529.624.96 1.296 1.537 1.887l158.384 158.4c12.496 12.481 32.752 12.481 45.248 0 12.496-12.496 12.496-32.768 0-45.264z"})}),s=new Intl.NumberFormat("en-US",{style:"currency",currency:"ISK"});e.s(["default",0,({tours:e})=>(0,t.jsx)("div",{className:n.default.swiperItems,children:(0,t.jsx)(r.Swiper,{centeredSlides:!0,grabCursor:!0,className:n.default.swiper,spaceBetween:20,slidesPerView:1.2,initialSlide:0,breakpoints:{340:{slidesPerView:1.2,centeredSlides:!0},640:{slidesPerView:2.2,centeredSlides:!1},768:{slidesPerView:2.2,centeredSlides:!1},980:{slidesPerView:3.2,centeredSlides:!1},1200:{slidesPerView:4.2,centeredSlides:!1},1800:{slidesPerView:5.2,centeredSlides:!1}},children:e.map((e,o)=>{var l;let{hours:u,minutes:c}={hours:Math.floor((l=e.duration)/60),minutes:l%60};return(0,t.jsx)(r.SwiperSlide,{children:(0,t.jsxs)("div",{className:n.default.item,children:[(0,t.jsx)(i.default,{image:e.photoUrl,link:e.tourUrl,imageSize:"large",bottom:(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:n.default.tourInfo,children:[(0,t.jsx)("div",{children:e.duration>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a,{fillColor:"#fff"}),(0,t.jsxs)("span",{children:[u?`${u}h`:"",u&&c?" ":"",c?`${c}m`:""]})]})}),(0,t.jsx)("div",{className:n.default.price,children:e.discount?.value?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:n.default.discount,children:e.price?s.format(e.price):""}),(0,t.jsx)("span",{children:s.format(e.discount?.value?e.price-e.price*(.01*e.discount.value):e.price)})]}):(0,t.jsx)("span",{children:e.price?s.format(e.price):""})})]})}),children:(0,t.jsx)("h4",{children:e.title})}),e.isBestSeller&&(0,t.jsx)("div",{className:n.default.isBestSeller,children:"Best seller"})]},e.uniqueId)},o)})})})],94536)},28579,e=>{e.v({background:"index-module-scss-module__pYRwFa__background",discount:"index-module-scss-module__pYRwFa__discount",item:"index-module-scss-module__pYRwFa__item",items:"index-module-scss-module__pYRwFa__items",linear:"index-module-scss-module__pYRwFa__linear",price:"index-module-scss-module__pYRwFa__price",section:"index-module-scss-module__pYRwFa__section",swiper:"index-module-scss-module__pYRwFa__swiper",swiperItems:"index-module-scss-module__pYRwFa__swiperItems",title:"index-module-scss-module__pYRwFa__title",tourInfo:"index-module-scss-module__pYRwFa__tourInfo"})},65791,e=>{e.v({view:"index-module-scss-module__lflk7G__view"})},91311,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(63784),i=e.i(6389),a=e.i(65791);e.i(6175);var s=e.i(94174),o=e.i(61037),l=e.i(31797),u=e.i(86838),c=e.i(18949),d=Math.PI,h=Math.sin,f=Math.cos,p=Math.asin,m=Math.acos,g=d/180;let v=e=>new Date((e+.5-2440588)*864e5);var y=23.4397*g,x=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];function b(e,t,r){return 9e-4+(e+t)/(2*d)+r}function _(e,t,r){return 2451545+e+.0053*h(t)-.0069*h(2*r)}
393let S={en:{currentActivity:"Current activity",hemisphericPower:"Hemispheric power",btTotalStrength:"Total strength (Bt)",north:"north",south:"south",activityIn:"Activity in",solarWindSpeed:"Solar wind speed",sufficientDarkness:"Sufficient darkness"},is:{currentActivity:"Núverandi virkni",hemisphericPower:"Aflgildið",btTotalStrength:"Sviðsstyrkur (Bt)",north:"norður",south:"suður",activityIn:"Virkni eftir",solarWindSpeed:"Sólvindur",sufficientDarkness:"Nægilega dimmt"}};e.s(["default",0,({locale:e})=>{let{hemisphereData:w,realtimeData:M}=(0,l.useRealtimeContext)(),[T,E]=(0,r.useState)(null),[A,C]=(0,r.useState)(null),[P,I]=(0,r.useState)(null),O=((e,t)=>{var r,n,i,a,s,o,l=-(-21.9333296*g),u=64.1333328*g,c=-2.076*Math.sqrt(t=t||0)/60,S=Math.round(e.valueOf()/864e5-.5+2440588-2451545-9e-4-l/(2*d)),w=b(0,l,S),M=g*(357.5291+.98560028*w),T=(r=g*(1.9148*h(M)+.02*h(2*M)+3e-4*h(3*M)),M+r+102.9372*g+d),E=p(h(0)*f(y)+f(0)*h(y)*h(T)),A=_(w,M,T),C={solarNoon:v(A),nadir:v(A-.5)};for(n=0,i=x.length;n<i;n+=1)o=A-((s=function(e,t,r,n,i,a,s){return _(b(m((h(e)-h(r)*h(n))/(f(r)*f(n))),t,i),a,s)}(((a=x[n])[0]+c)*g,l,u,E,S,M,T))-A),C[a[1]]=v(o),C[a[2]]=v(s);return C})(new Date(new Date),0),R=()=>{let e=new Date;w.length>0&&(E(w.reduce((t,r)=>Math.abs(r.forecastTime.getTime()-e.getTime())<Math.abs(t.forecastTime.getTime()-e.getTime())?r:t,w[0])),I(w[w.length-1])),M.length>0&&C(M.reduce((t,r)=>Math.abs(r.arrivalTime.getTime()-e.getTime())<Math.abs(t.arrivalTime.getTime()-e.getTime())?r:t,M[0]))};if((0,r.useEffect)(()=>{R();let e=setInterval(()=>{R()},6e4);return()=>clearInterval(e)},[w,M]),!T&&!A)return null;let L=P?.forecastTime,N=L?(0,n.formatDistance)(new Date,L,{locale:"is"===e?i.is:void 0}):null,D=T?.northPower||0,k=A?.speed||0,U=A?.bz||0;A?.bt;let F=u.GlobalLocalization[e].activityLevel[30>=(T?.northPower||0)?"low":50>=(T?.northPower||0)?"moderate":100>=(T?.northPower||0)?"high":"storm"],z=u.GlobalLocalization[e].activityLevel[30>=(P?.northPower||0)?"low":50>=(P?.northPower||0)?"moderate":100>=(P?.northPower||0)?"high":"storm"];return(0,t.jsxs)("div",{className:a.default.view,children:[(0,t.jsxs)(o.default,{children:[(0,t.jsx)("span",{children:S[e].currentActivity}),(0,t.jsxs)("span",{children:[F,T?.northPower>0&&(0,t.jsx)("span",{style:{color:(0,c.getHemispherePowerColorFromValue)(T.northPower),marginLeft:"8px"},children:"â"})]})]}),(0,t.jsxs)(o.default,{children:[(0,t.jsxs)("span",{children:[S[e].activityIn," ",N]}),(0,t.jsxs)("span",{children:[z,P?.northPower>0&&(0,t.jsx)("span",{style:{color:(0,c.getHemispherePowerColorFromValue)(P.northPower),marginLeft:"8px"},children:"â"})]})]}),(0,t.jsxs)(o.default,{children:[(0,t.jsx)("span",{children:S[e].hemisphericPower}),(0,t.jsxs)("span",{children:[D," GW",(0,t.jsx)("span",{style:{color:(0,c.getHemispherePowerColorFromValue)(D),marginLeft:"8px"},children:"â"})]})]}),(0,t.jsxs)(o.default,{children:[(0,t.jsx)("span",{children:S[e].solarWindSpeed}),(0,t.jsxs)("span",{children:[k," km/s",(0,t.jsx)("span",{style:{color:(0,c.getWindColorFromValue)(k),marginLeft:"8px"},children:"â"})]})]}),(0,t.jsxs)(o.default,{children:[(0,t.jsx)("span",{children:"Bz"}),(0,t.jsxs)("span",{children:[U," nT ",U<0?S[e].south:S[e].north,(0,t.jsx)("span",{style:{color:(0,c.getBzColorFromValue)(U),marginLeft:"8px"},children:"â"})]})]}),O.dusk&&!isNaN(O.dusk.getTime())&&(0,t.jsxs)(o.default,{children:[(0,t.jsx)("span",{children:S[e].sufficientDarkness}),(0,t.jsx)("span",{children:(0,s.formatInTimeZone)(O.dusk,"UTC","HH:mm",{locale:"is"===e?i.is:void 0})})]})]})}],91311)},53964,e=>{"use strict";e.i(47167);var t=e.i(43476),r=e.i(71645),n=e.i(72951),i=e.i(17772);let a=[320,480,640,768,1024,1280,1536,1920],s={bold:"strong",italic:"em",code:"code",underline:"u",strikethrough:"s"},o=/^\s*<(iframe|embed|video|object|blockquote|script)\b/i;function l(e,i,a){if("text"===e.type){let n=e.value??"";if(o.test(n))return(0,t.jsx)("span",{className:"blobify-rt-embed",dangerouslySetInnerHTML:{__html:n},suppressHydrationWarning:!0},i);let a=n;for(let r of e.marks??[]){let e=s[r];e&&(a=(0,t.jsx)(e,{children:a}))}return(0,t.jsx)(r.Fragment,{children:a},i)}let u="contentRef"===e.type?{...e.ref,type:"internal",content:e.content}:"link"in e?"internal"===e.link.type?{...e.link,content:e.content}:e.link:{type:"external",url:e.url},c=e.children.map((e,t)=>l(e,t,a)),d=(0,n.resolveLinkUrl)(u,a);return d?(0,t.jsx)("a",{href:d,className:"blobify-rt-link",target:u.newTab?"_blank":void 0,rel:u.newTab?"noopener noreferrer":void 0,children:c},i):(0,t.jsx)(r.Fragment,{children:c},i)}e.s(["default",0,function({field:e,locale:n,className:s,components:u={}}){let c=function(e,t){if(!e)return null;if("object"==typeof e&&"type"in e&&"root"===e.type)return e;let r=e[t];if(r)return r;let n=Object.keys(e)[0];return(n?e[n]:null)??null}(e,n);return c?(0,t.jsx)("div",{className:s,children:c.children.map((e,s)=>(function e(n,s,u,c){let d=(e,n,i)=>{let a=c[e];if(!a)return i;let o=a({node:n,locale:u,defaultChildren:i});return(0,t.jsx)(r.Fragment,{children:o},s)};switch(n.type){case"paragraph":{let e=function e(t){let r="";for(let n of t)if("text"===n.type)r+=n.value??"";else{if("link"!==n.type)return null;let t=e(n.children);if(null===t)return null;r+=t}return r}
393(n.children);if(null!==e&&o.test(e))return d("paragraph",n,(0,t.jsx)("div",{className:"blobify-rt-embed",dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0},s));let r=n.children.some(e=>"text"===e.type&&"string"==typeof e.value&&o.test(e.value)),i=(0,t.jsx)(r?"div":"p",{children:n.children.map((e,t)=>l(e,t,u))},s);return d("paragraph",n,i)}case"heading":{let e=`h${n.depth}`,r=(0,t.jsx)(e,{children:n.children.map((e,t)=>l(e,t,u))},s);return d("heading",n,r)}case"blockquote":{let r=(0,t.jsx)("blockquote",{children:n.children.map((t,r)=>e(t,r,u,c))},s);return d("blockquote",n,r)}case"code":{let e=(0,t.jsx)("pre",{children:(0,t.jsx)("code",{className:n.lang?`lang-${n.lang}`:void 0,children:n.value})},s);return d("code",n,e)}case"hr":return d("hr",n,(0,t.jsx)("hr",{},s));case"list":{let r=n.ordered?"ol":"ul",i=(0,t.jsx)(r,{children:n.children.map((r,n)=>(0,t.jsx)("li",{children:r.children.map((t,r)=>e(t,r,u,c))},n))},s);return d("list",n,i)}case"asset":return d("asset",n,function(e,n){if(!e.url)return null;let s=a.map(t=>`${(0,i.cfImage)(e,{width:t})} ${t}w`).join(", "),o=(0,i.cfImage)(e,{width:a[Math.floor(a.length/2)]}),l=e.caption||e.alt||"",u=(0,t.jsx)("img",{src:o,srcSet:s,sizes:"(min-width: 768px) 90vw, 50vw",width:e.width,height:e.height,alt:l?"":e.alt??"",loading:"lazy",decoding:"async"});return l?(0,t.jsxs)("figure",{style:{margin:0},children:[u,(0,t.jsx)("figcaption",{children:l})]},n):(0,t.jsx)(r.Fragment,{children:u},n)}(n,s));case"table":{let r=n.children,i=r.findIndex(e=>!e.children.every(e=>e.header)),a=-1===i?r:r.slice(0,i),o=-1===i?[]:r.slice(i),l=(r,n)=>{let i=r.header?"th":"td";return(0,t.jsx)(i,{colSpan:r.colspan&&r.colspan>1?r.colspan:void 0,rowSpan:r.rowspan&&r.rowspan>1?r.rowspan:void 0,children:r.children.map((t,r)=>e(t,r,u,c))},n)};return d("table",n,(0,t.jsx)("div",{className:"blobify-rt-table-wrap",children:(0,t.jsxs)("table",{className:"blobify-rt-table",children:[a.length>0&&(0,t.jsx)("thead",{children:a.map((e,r)=>(0,t.jsx)("tr",{children:e.children.map((e,t)=>l(e,t))},r))}),o.length>0&&(0,t.jsx)("tbody",{children:o.map((e,r)=>(0,t.jsx)("tr",{children:e.children.map((e,t)=>l(e,t))},r))})]})},s))}case"block":return d("block",n,null);default:return null}})(e,s,n,u))}):null}])},24130,e=>{e.v({fakeLeftContent:"index-module-scss-module__XEv3qG__fakeLeftContent",inputWrapper:"index-module-scss-module__XEv3qG__inputWrapper",isCategorySelected:"index-module-scss-module__XEv3qG__isCategorySelected",isLoading:"index-module-scss-module__XEv3qG__isLoading",latestStories:"index-module-scss-module__XEv3qG__latestStories",loadMore:"index-module-scss-module__XEv3qG__loadMore",loading:"index-module-scss-module__XEv3qG__loading",loadingWrapper:"index-module-scss-module__XEv3qG__loadingWrapper",rotate:"index-module-scss-module__XEv3qG__rotate",search:"index-module-scss-module__XEv3qG__search",showMoreWrapper:"index-module-scss-module__XEv3qG__showMoreWrapper",stories:"index-module-scss-module__XEv3qG__stories",story:"index-module-scss-module__XEv3qG__story",tags:"index-module-scss-module__XEv3qG__tags",twoColumns:"index-module-scss-module__XEv3qG__twoColumns"})},28180,e=>{"use strict";var t=e.i(43476),r=e.i(71645);let n=({fillColor:e})=>(0,t.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:e,xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M30.4137 27.5862L22.7697 19.9422C24.5202 17.4825 25.2826 14.4549 24.9057 11.4595C24.5288 8.46413 23.0401 5.71972 20.7349 3.77032C18.4297 1.82093 15.4761 0.808879 12.4597 0.934801C9.44337 1.06072 6.58443 2.31543 4.44969 4.45017C2.31494 6.58492 1.06024 9.44386 0.934313 12.4602C0.80839 15.4766 1.82044 18.4301 3.76983 20.7354C5.71923 23.0406 8.46364 24.5293 11.459 24.9062C14.4544 25.283 17.482 24.5207 19.9417 22.7702L27.5857 30.4142C27.9629 30.7785 28.4681 30.9801 28.9925 30.9756C29.5169 30.971 30.0185 30.7607 30.3894 30.3898C30.7602 30.019 30.9705 29.5174 30.9751 28.993C30.9796 28.4686 30.778 27.9634 30.4137 27.5862ZM2.99972 13.0002C2.99972 11.0224 3.58621 9.089 4.68503 7.44451C5.78384 5.80002 7.34563 4.51829 9.17289 3.76142C11.0001 3.00454 13.0108 2.80651 14.9506 3.19236C16.8904 3.57821 18.6723 4.53062 20.0708 5.92914C21.4693 7.32767 22.4217 9.1095 22.8076 11.0493C23.1934 12.9891 22.9954 14.9998 22.2385 16.827C21.4816 18.6543 20.1999 20.2161 18.5554 21.3149C16.9109 22.4137 14.9775 23.0002 12.9997 23.0002C10.3485 22.9973 7.8066 21.9428 5.93187 20.0681C4.05714 18.1933 3.00263 15.6515 2.99972 13.0002Z",fill:e})});var i=e.i(70758),a=e.i(24130);e.s(["default",0,function({stories:e,locale:s,searchPlaceholder:o,title:l}){let[u,c]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[,f]=(0,r.useTransition)(),p=(0,r.useMemo)(()=>d&&!(d.length<2)?e.filter(e=>e.titleSearch.indexOf(d)>-1||e.descriptionSearch.indexOf(d)>-1):e,[e,d]),m=d.length>1;return(0,t.jsxs)("div",{className:a.default.stories,children:[(0,t.jsx)("div",{className:a.default.search,children:(0,t.jsxs)("div",{className:a.default.inputWrapper,children:[(0,t.jsx)("input",{type:"text",value:u,placeholder:o??"",onChange:e=>{let t=e.target.value;c(t),f(()=>{h(t.toLowerCase().replaceAll("á","a").replaceAll("é","e").replaceAll("þ","th").replaceAll("ð","d").replaceAll("Ã","i").replaceAll("ó","o").replaceAll("ú","u").replaceAll("ü","u").replaceAll("ö","o").replaceAll("ä","a").replaceAll("Ã¥","a").replaceAll("ø","o").replaceAll("æ","ae").replaceAll("ñ","n").replaceAll("Å","l").replaceAll("Å","n").replaceAll("Å","s").replaceAll("Ä","c").replaceAll("Ä
","a").replaceAll("Ä","e").replaceAll("ź","z").replaceAll("ż","z").replaceAll("Ã","b"))})},"aria-label":"Search for stories by title"}),(0,t.jsx)(n,{fillColor:"#fff"})]})}),(0,t.jsxs)("div",{className:a.default.latestStories,children:[l&&(0,t.jsx)("h2",{children:l}),m&&0===p.length&&(0,t.jsx)("p",{children:"is"===s?"Engar sögur fundust":"No stories were found"}),p.map(e=>(0,t.jsx)(i.default,{image:e.image,link:e.link,className:a.default.story,bottom:e.description?(0,t.jsx)("p",{children:e.description}):void 0,children:(0,t.jsx)("h4",{children:e.title})},e.id))]})]})}],28180)},41376,e=>{e.v({graph:"index-module-scss-module__oUeq3W__graph"})},85014,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(237),a=e.i(1725),s=e.i(494),o=e.i(55153),l=e.i(31195),u=e.i(34239),c=e.i(85183),d=e.i(93230),h=e.i(31797),f=e.i(18949),p=e.i(86838),m=e.i(40455),g=e.i(41376);let v=[0,10,20,30,40],y={en:{bzLevel:"Bz level",btLevel:"Bt level",lastUpdated:"Last updated",north:"north",south:"south"},is:{bzLevel:"Bz stuðull",btLevel:"Bt stuðull",lastUpdated:"SÃðast uppfært",north:"norður",south:"suður"}};e.s(["default",0,({syncId:e,locale:x})=>
393{let[b,_]=(0,n.useState)(!1),{realtimeData:S,closestEarthIndex:w}=(0,h.useRealtimeContext)();(0,n.useEffect)(()=>{_(!0)},[]);let M=(0,n.useMemo)(()=>S.map(e=>({...e,label:(0,r.formatInTimeZone)(e.arrivalTime,"UTC","HH:mm")})),[S]);if(!b)return null;let T=S.length>0?Math.max(...S.map(e=>e.bt)):0,E=S?.[w]?.bt;return(0,t.jsxs)("div",{className:g.default.graph,children:[(0,t.jsxs)("p",{children:[p.GlobalLocalization[x].now,": ",null!=E?E:"N/A"," ","nT",null!=E&&(0,t.jsx)("span",{style:{color:(0,f.getBtColorFromValue)(E)},children:"â"})]}),(0,t.jsx)(l.ResponsiveContainer,{width:"99%",height:250,children:(0,t.jsxs)(a.AreaChart,{accessibilityLayer:!1,syncId:e,data:M,margin:{top:20,left:0,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsx)("linearGradient",{id:"linearBt",x1:"0",y1:"0",x2:"0",y2:1,children:M.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("stop",{stopColor:(0,f.getBtColorFromValue)(T),offset:0}),v.map(e=>{let r=e/T,n=Math.round(T*(1-r));return n>T||n<0?null:(0,t.jsx)("stop",{stopColor:(0,f.getBtColorFromValue)(n),offset:r},n)})]})})}),(0,t.jsx)(c.XAxis,{dataKey:"label",tick:{fontSize:11},tickSize:12,height:40}),(0,t.jsx)(d.YAxis,{domain:[0,40],width:50,type:"number",dataKey:"bt",label:(0,t.jsx)(s.Label,{dx:-15,style:{textAnchor:"middle",fontSize:"80%",paddingRight:0},angle:270,value:p.GlobalLocalization[x].btLevel+" nT"})}),(0,t.jsx)(u.Tooltip,{content:(0,t.jsx)(({active:e,payload:n,label:i})=>{if(e&&n&&n.length){let e=n[0].payload.bz,a=n[0].payload.bt;return(0,t.jsxs)(m.TooltipWrapper,{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:p.GlobalLocalization[x].observedTime}),":"," ",(0,r.formatInTimeZone)(n[0].payload.observedTime,"UTC","HH:mm")]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:p.GlobalLocalization[x].arrivalTime}),": ",i]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:y[x].bzLevel}),": ",e," nT"," ",e>0?y[x].north:y[x].south]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:y[x].btLevel}),": ",a]})]})}return null},{}),position:{y:0}}),(0,t.jsx)(i.Area,{animationDuration:0,type:"monotone",dataKey:"bt",stroke:"#999",fillOpacity:.8,fill:"url(#linearBt)",activeDot:{r:6,stroke:"#ccc",fillOpacity:.9}}),(0,t.jsx)(o.ReferenceLine,{x:(0,r.formatInTimeZone)(new Date,"UTC","HH:mm"),children:(0,t.jsx)(s.Label,{value:p.GlobalLocalization[x].earth,position:"top"})}),(0,t.jsx)(o.ReferenceLine,{y:30,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getBtColorFromValue)(30)}),(0,t.jsx)(o.ReferenceLine,{y:20,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getBtColorFromValue)(20)}),(0,t.jsx)(o.ReferenceLine,{y:10,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getBtColorFromValue)(10)})]})})]})}])},75619,e=>{e.v({graph:"index-module-scss-module___5yDfa__graph"})},22180,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(237),a=e.i(1725),s=e.i(494),o=e.i(55153),l=e.i(31195),u=e.i(34239),c=e.i(85183),d=e.i(93230),h=e.i(31797),f=e.i(18949),p=e.i(86838),m=e.i(40455),g=e.i(75619);let v={en:{bzLevel:"Bz level",btLevel:"Bt level",lastUpdated:"Last updated",north:"north",south:"south"},is:{bzLevel:"Bz stuðull",btLevel:"Bt stuðull",lastUpdated:"SÃðast uppfært",north:"norður",south:"suður"}};e.s(["default",0,({syncId:e,locale:y})=>{let[x,b]=(0,n.useState)(!1),{realtimeData:_,closestEarthIndex:S}=(0,h.useRealtimeContext)();(0,n.useEffect)(()=>{b(!0)},[]);let w=(0,n.useMemo)(()=>_.map(e=>({...e,label:(0,r.formatInTimeZone)(e.arrivalTime,"UTC","HH:mm")})),[_]);if(!x)return null;let M=w.length>0?Math.max(...w.map(e=>e.bz)):0,T=w.length>0?Math.min(...w.map(e=>e.bz)):0,E=_?.[S]?.bz;return(0,t.jsxs)("div",{className:g.default.graph,children:[(0,t.jsxs)("p",{children:[p.GlobalLocalization[y].now,":"," ",null!=E?`${E} nT ${E>0?v[y].north:v[y].south}`:"N/A",null!=E&&(0,t.jsx)("span",{style:{color:(0,f.getBzColorFromValue)(E)},children:"â"})]}),(0,t.jsx)(l.ResponsiveContainer,{width:"99%",height:250,children:(0,t.jsxs)(a.AreaChart,{accessibilityLayer:!1,data:w,syncId:e,margin:{top:30,left:0,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"gradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{stopColor:(0,f.getColor)(M,"bz"),offset:0}),(0,t.jsx)("stop",{stopColor:(0,f.getColor)((T+M)/2,"bz"),offset:M===T?0:(0-T)/(M-T)}),(0,t.jsx)("stop",{stopColor:(0,f.getColor)(T,"bz"),offset:1})]})}),(0,t.jsx)(c.XAxis,{dataKey:"label",tick:{fontSize:11},tickSize:12,height:40}),(0,t.jsx)(d.YAxis,{domain:[T>-20?-20:-30,M>20?30:20],width:40,type:"number",label:(0,t.jsx)(s.Label,{dx:-14,style:{textAnchor:"middle",fontSize:"90%",paddingRight:10},angle:270,value:v[y].bzLevel})}),(0,t.jsx)(u.Tooltip,{content:(0,t.jsx)(({active:e,payload:n,label:i})=>{if(e&&n&&n.length){let e=n[0].value,a=n[0].payload.bt;
393return(0,t.jsxs)(m.TooltipWrapper,{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:p.GlobalLocalization[y].observedTime}),":"," ",(0,r.formatInTimeZone)(n[0].payload.observedTime,"UTC","HH:mm")]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:p.GlobalLocalization[y].arrivalTime}),": ",i]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:v[y].bzLevel}),": ",e," nT"," ",e>0?v[y].north:v[y].south]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:v[y].btLevel}),": ",a]})]})}return null},{}),position:{y:0}}),(0,t.jsx)(i.Area,{connectNulls:!0,animationDuration:0,type:"monotone",dataKey:"bz",stroke:"#999",fillOpacity:.6,fill:"url(#gradient)",activeDot:{r:6},height:600}),(0,t.jsx)(o.ReferenceLine,{x:(0,r.formatInTimeZone)(new Date,"UTC","HH:mm"),children:(0,t.jsx)(s.Label,{value:p.GlobalLocalization[y].earth,position:"top"})}),(0,t.jsx)(o.ReferenceLine,{y:5,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getBzColorFromValue)(5)}),(0,t.jsx)(o.ReferenceLine,{y:0,color:"green"}),(0,t.jsx)(o.ReferenceLine,{y:-5,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getBzColorFromValue)(-5)}),(0,t.jsx)(o.ReferenceLine,{y:-10,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getBzColorFromValue)(-10)}),(0,t.jsx)(o.ReferenceLine,{y:-15,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getBzColorFromValue)(-15)})]})})]})}])},14329,e=>{e.v({bottom:"index-module-scss-module__5HmSYW__bottom",card:"index-module-scss-module__5HmSYW__card",content:"index-module-scss-module__5HmSYW__content",large:"index-module-scss-module__5HmSYW__large",media:"index-module-scss-module__5HmSYW__media",medium:"index-module-scss-module__5HmSYW__medium",small:"index-module-scss-module__5HmSYW__small",tiny:"index-module-scss-module__5HmSYW__tiny"})},70758,e=>{"use strict";var t=e.i(43476),r=e.i(43794),n=e.i(22016),i=e.i(14329);let a=({image:e,bottom:n,imageSize:a="medium",children:s})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:i.default.content,children:[e&&(0,t.jsx)("div",{className:(0,r.default)(i.default.media,i.default[a]),children:(0,t.jsx)("img",{src:e,alt:"",loading:"lazy",style:{position:"absolute",width:"100%",height:"100%",top:0,left:0,bottom:0,right:0}})}),s&&(0,t.jsx)("div",{children:s})]}),n&&(0,t.jsx)("div",{className:i.default.bottom,children:n})]});e.s(["default",0,({image:e,link:s,className:o,bottom:l,imageSize:u="medium",sizes:c="90vw",children:d})=>s?(0,t.jsx)(n.default,{className:(0,r.default)(i.default.card,o),href:s,children:(0,t.jsx)(a,{image:e,bottom:l,imageSize:u,sizes:c,children:d})}):(0,t.jsx)("div",{className:(0,r.default)(i.default.card,o),children:(0,t.jsx)(a,{image:e,bottom:l,imageSize:u,sizes:c,children:d})})])},95147,e=>{e.v({graph:"index-module-scss-module__wq0mMW__graph"})},88110,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(237),a=e.i(1725),s=e.i(494),o=e.i(55153),l=e.i(31195),u=e.i(34239),c=e.i(85183),d=e.i(93230),h=e.i(31797),f=e.i(18949),p=e.i(86838),m=e.i(40455),g=e.i(95147);let v={en:{windSpeed:"Wind speed",density:"Density",lastUpdated:"Last updated",protons:"protons"},is:{windSpeed:"Vindhraði",density:"Ãéttleiki",lastUpdated:"SÃðast uppfært",protons:"róteindir"}},y=[0,10,20,40,60];e.s(["default",0,({syncId:e,locale:x})=>{let[b,_]=(0,n.useState)(!1),{realtimeData:S,closestEarthIndex:w}=(0,h.useRealtimeContext)();(0,n.useEffect)(()=>{_(!0)},[]);let M=(0,n.useMemo)(()=>S.map(e=>({...e,label:(0,r.formatInTimeZone)(e.arrivalTime,"UTC","HH:mm")})),[S]);if(!b)return null;let T=S.length>0?Math.max(...S.map(e=>e.density)):0,E=S?.[w]?.density;return(0,t.jsxs)("div",{className:g.default.graph,children:[(0,t.jsxs)("p",{children:[p.GlobalLocalization[x].now,":"," ",null!=E?`${E} ${v[x].protons}/cm3`:"N/A",null!=E&&(0,t.jsx)("span",{style:{color:(0,f.getDensityColorFromValue)(E)},children:"â"})]}),(0,t.jsx)(l.ResponsiveContainer,{width:"99%",height:250,children:(0,t.jsxs)(a.AreaChart,{accessibilityLayer:!1,syncId:e,data:M,margin:{top:20,left:0,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsx)("linearGradient",{id:"linearDensity",x1:"0",y1:"0",x2:"0",y2:1,children:M.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("stop",{stopColor:(0,f.getDensityColorFromValue)(T),offset:0}),y.map(e=>{let r=e/T,n=Math.round(T*(1-r));return n>T||n<0?null:(0,t.jsx)("stop",{stopColor:(0,f.getDensityColorFromValue)(n),offset:r},n)})]})})}),(0,t.jsx)(c.XAxis,{dataKey:"label",tick:{fontSize:11},tickSize:12,height:40}),(0,t.jsx)(d.YAxis,{domain:[0,60],width:50,type:"number",dataKey:"density",label:(0,t.jsx)(s.Label,{dx:-20,style:{textAnchor:"middle",fontSize:"80%",paddingRight:0},angle:270,value:v[x].density+" "+p.GlobalLocalization[x].protons+"/cm3"})}),(0,t.jsx)(u.Tooltip,{content:(0,t.jsx)(({active:e,payload:n,label:i})=>
393e&&n&&n.length?(0,t.jsxs)(m.TooltipWrapper,{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:p.GlobalLocalization[x].observedTime}),":"," ",(0,r.formatInTimeZone)(n[0].payload.observedTime,"UTC","HH:mm")]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:p.GlobalLocalization[x].arrivalTime}),": ",i]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:v[x].windSpeed}),":"," ",n[0].payload.speed," km/s"]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:v[x].density}),":"," ",n[0].payload.density," ",p.GlobalLocalization[x].protons,"/cm3"]})]}):null,{}),position:{y:0}}),(0,t.jsx)(i.Area,{animationDuration:0,type:"monotone",dataKey:"density",stroke:"#999",fillOpacity:.8,fill:"url(#linearDensity)",activeDot:{r:6,stroke:"#ccc",fillOpacity:.9}}),(0,t.jsx)(o.ReferenceLine,{x:(0,r.formatInTimeZone)(new Date,"UTC","HH:mm"),children:(0,t.jsx)(s.Label,{value:p.GlobalLocalization[x].earth,position:"top"})}),(0,t.jsx)(o.ReferenceLine,{y:60,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getDensityColorFromValue)(60)}),(0,t.jsx)(o.ReferenceLine,{y:40,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getDensityColorFromValue)(40)}),(0,t.jsx)(o.ReferenceLine,{y:20,opacity:.3,strokeDasharray:"10 10",stroke:(0,f.getDensityColorFromValue)(20)})]})})]})}])},35185,e=>{e.v({graph:"index-module-scss-module__HCj8sq__graph"})},99064,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(494),a=e.i(55706),s=e.i(29228),o=e.i(7670),l=e.i(97865),u=e.i(44171),c=e.i(94395),d=e.i(29905),h=e.i(31725),f=e.i(27241),p=e.i(61764),m=e.i(75337),g=e.i(89763),v=e.i(43404),y=e.i(51883),x=e.i(29601),b=e.i(18457),_=e.i(23197);function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function M(){return(M=Object.assign.bind()).apply(null,arguments)}function T(e){var t=(0,f.useAppDispatch)();return(0,n.useEffect)(()=>(t((0,h.addArea)(e)),()=>{t((0,h.removeArea)(e))})),null}function E(e){var t,r=e.x1,a=e.x2,s=e.y1,h=e.y2,y=e.className,b=e.shape,S=e.xAxisId,T=e.yAxisId,E=(0,g.useClipPathId)(),A=(0,m.useIsPanorama)(),C=(0,f.useAppSelector)(e=>(0,p.selectAxisScale)(e,"xAxis",S,A)),P=(0,f.useAppSelector)(e=>(0,p.selectAxisScale)(e,"yAxis",T,A));if(null==C||null==P)return null;var I=(0,c.isNumOrStr)(r),O=(0,c.isNumOrStr)(a),R=(0,c.isNumOrStr)(s),L=(0,c.isNumOrStr)(h);if(!I&&!O&&!R&&!L&&!b)return null;var N=((e,t,r,n,i,a,s)=>{var o,l,c,d,h=s.x1,f=s.x2,p=s.y1,m=s.y2;if(null==i||null==a)return null;var g=new _.CartesianScaleHelperImpl({x:i,y:a}),v={x:e?null!=(o=i.map(h,{position:"start"}))?o:null:i.rangeMin(),y:r?null!=(l=a.map(p,{position:"start"}))?l:null:a.rangeMin()},y={x:t?null!=(c=i.map(f,{position:"end"}))?c:null:i.rangeMax(),y:n?null!=(d=a.map(m,{position:"end"}))?d:null:a.rangeMax()};return"discard"!==s.ifOverflow||g.isInRange(v)&&g.isInRange(y)?(0,u.rectWithPoints)(v,y):null})(I,O,R,L,C,P,e);if(!N&&!b)return null;var D="hidden"===e.ifOverflow;return n.createElement(x.ZIndexLayer,{zIndex:e.zIndex},n.createElement(l.Layer,{className:(0,o.clsx)("recharts-reference-area",y)},(t=w(w({clipPath:D?"url(#".concat(E,")"):void 0},(0,v.svgPropertiesAndEvents)(e)),N),n.isValidElement(b)?n.cloneElement(b,t):"function"==typeof b?b(t):n.createElement(d.Rectangle,M({},t,{className:"recharts-reference-area-rect"}))),null!=N&&n.createElement(i.CartesianLabelContextProvider,M({},N,{lowerWidth:N.width,upperWidth:N.width}),n.createElement(i.CartesianLabelFromLabelProp,{label:e.label}),e.children)))}var A={ifOverflow:"discard",xAxisId:0,yAxisId:0,radius:0,fill:"#ccc",label:!1,fillOpacity:.5,stroke:"none",strokeWidth:1,zIndex:b.DefaultZIndexes.area};function C(e){var t=(0,y.resolveDefaultProps)(e,A);return n.createElement(n.Fragment,null,n.createElement(T,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),n.createElement(E,t))}C.displayName="ReferenceArea";
393var P=e.i(55153),I=e.i(31195),O=e.i(34239),R=e.i(85183),L=e.i(93230),N=e.i(31797),D=e.i(86838),k=e.i(40455),U=e.i(35185);let F={en:{dstLevel:"DST level",lastUpdated:"Last updated",lowActivity:"low activity",minor:"minor storm",moderate:"moderate storm",intense:"intense storm",severe:"severe storm",superStorm:"super storm"},is:{dstLevel:"DST stuðull",lastUpdated:"SÃðast uppfært",lowActivity:"lÃtil virkni",minor:"lÃtill stormur",moderate:"miðlungs stormur",intense:"mikill stormur",severe:"mikill stormur",superStorm:"ofurstormur"}};function z(e,t){return e>=-50?F[t].lowActivity:e>=-100?F[t].moderate:e>=-250?F[t].intense:F[t].superStorm}e.s(["default",0,({syncId:e,locale:o})=>{let[l,u]=(0,n.useState)(!1),{dstData:c}=(0,N.useRealtimeContext)();(0,n.useEffect)(()=>{u(!0)},[]);let d=(0,n.useMemo)(()=>c.map(e=>({...e,label:(0,r.formatInTimeZone)(e.date,"UTC","HH:mm")})),[c]);if(!l||!d||0===d.length)return null;let h=Math.max(...d.map(e=>e.value)),f=Math.min(...d.map(e=>e.value)),p=d[d.length-1]?.value;if(!isFinite(h)||!isFinite(f))return null;let m=f<-400?-600:Math.min(f-20,-400),g=Math.max(h+10,0);return(0,t.jsxs)("div",{className:U.default.graph,children:[(0,t.jsxs)("p",{children:[D.GlobalLocalization[o].now,":"," ",null!=p?`${p} nT - ${z(p,o)}`:"N/A",null!=p&&(0,t.jsx)("span",{style:{color:p>=-50?"#34C759":p>=-100?"#ff9500":p>=-250?"#ff3b30":"#8b0000"},children:"â"})]}),(0,t.jsx)(I.ResponsiveContainer,{width:"99%",height:250,children:(0,t.jsxs)(s.LineChart,{accessibilityLayer:!1,data:d,syncId:e,margin:{top:25,right:10,left:0,bottom:0},children:[(0,t.jsx)(R.XAxis,{dataKey:"label",tick:{fontSize:11},tickSize:8,height:40}),(0,t.jsx)(L.YAxis,{domain:[m,g],width:60,type:"number",tickSize:12,dataKey:"value",allowDataOverflow:!1,tickCount:7,label:(0,t.jsx)(i.Label,{dx:-24,style:{textAnchor:"middle",fontSize:"90%",paddingRight:10},angle:270,value:F[o].dstLevel+" (nT)"})}),(0,t.jsx)(O.Tooltip,{content:(0,t.jsx)(({active:e,payload:n})=>{if(e&&n&&n.length){let e=n[0].value;return(0,t.jsxs)(k.TooltipWrapper,{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:D.GlobalLocalization[o].time}),":"," ",(0,r.formatInTimeZone)(n[0].payload.date,"UTC","MMM dd HH:mm")]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:F[o].dstLevel}),": ",e," nT"]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:D.GlobalLocalization[o].status}),":"," ",z(e,o)]})]})}return null},{}),position:{y:0}}),(0,t.jsx)(C,{y1:0,y2:-50,fill:"#34C759",fillOpacity:.3,label:{value:F[o].lowActivity,position:"insideRight"}}),(0,t.jsx)(C,{y1:-50,y2:-100,fill:"#ff9500",fillOpacity:.35,label:{value:F[o].moderate,position:"insideRight"}}),(0,t.jsx)(C,{y1:-100,y2:-250,fill:"#ff3b30",fillOpacity:.35,label:{value:F[o].intense,position:"insideRight"}}),(0,t.jsx)(C,{y1:-250,y2:m,fill:"#8b0000",fillOpacity:.35,label:{value:F[o].superStorm,position:"insideRight"}}),(0,t.jsx)(a.Line,{dot:!1,type:"monotone",dataKey:"value",stroke:"#ffffff",strokeWidth:2,activeDot:{r:6}}),(0,t.jsx)(P.ReferenceLine,{y:0,stroke:"rgba(255, 255, 255, .4)",strokeDasharray:"10 10",strokeWidth:2})]})})]})}],99064)},11627,e=>{e.v({gaugeView:"index-module-scss-module__vXOP_G__gaugeView",green:"index-module-scss-module__vXOP_G__green",label:"index-module-scss-module__vXOP_G__label",needle:"index-module-scss-module__vXOP_G__needle",needleBase2:"index-module-scss-module__vXOP_G__needleBase2",needlePoints:"index-module-scss-module__vXOP_G__needlePoints",needleTip:"index-module-scss-module__vXOP_G__needleTip",red:"index-module-scss-module__vXOP_G__red",solarWindLabel:"index-module-scss-module__vXOP_G__solarWindLabel",strokeGreen:"index-module-scss-module__vXOP_G__strokeGreen",strokeOrange:"index-module-scss-module__vXOP_G__strokeOrange",strokeRed:"index-module-scss-module__vXOP_G__strokeRed",strokeViolet:"index-module-scss-module__vXOP_G__strokeViolet",strokeWhite:"index-module-scss-module__vXOP_G__strokeWhite",strokeYellow:"index-module-scss-module__vXOP_G__strokeYellow",title:"index-module-scss-module__vXOP_G__title",white:"index-module-scss-module__vXOP_G__white",yellow:"index-module-scss-module__vXOP_G__yellow"})},83363,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(7670),i=e.i(11627);let a=e=>e*Math.PI/180,s=(e,t,r,n)=>{let i=a(n);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}};var o=e.i(18949);
393e.s(["default",0,({startGaugeValue:e,endGaugeValue:l,type:u,value:c,numTicks:d,modulus:h,startAngle:f=90,endAngle:p=270})=>{let m=function(e){let{startAngle:t,endAngle:n,numTicks:i,diameter:o,domain:l}=e,u=o/2,[c,d]=l,h=(0,r.useMemo)(()=>((e,t,r)=>{let n=[],i=(t-e)/(r-1);for(let t=0;t<r;t++)n.push(Math.floor(e+t*i));return n.reverse()})(t,n,i).reverse(),[t,n,i]),f=(0,r.useCallback)(e=>{let{angle:t,offset:r}=e,n=s(0,0,u-r,t+90);return{x:n.x,y:n.y,dominantBaseline:"middle",textAnchor:"middle"}},[o,u]),p=(0,r.useCallback)(e=>{let{length:t,angle:r}=e,n=s(0,0,u,r+90),i=s(0,0,u+t,r+90);return{key:`tick-${r}`,x1:n.x,x2:i.x,y1:n.y,y2:i.y}},[h,o,u]),m=e=>{let r=n-t;return Math.round(t+(e-c)/(d-c)*r)},g=(0,r.useCallback)(e=>{let{offset:t=0,startAngle:r,endAngle:n,...i}=e,a=s(0,0,u+t,r+90),o=s(0,0,u+t,n+90);return{d:["M",a.x-.001,a.y,"A",u+t,u+t,0,n-r<180?"0":"1",1,o.x,o.y].join(" "),...i}},[o,u]),v=(0,r.useCallback)(e=>{let{value:t,baseRadius:r,tipRadius:n,offset:i=0}=e,o=s(0,0,u-i,90);return{base:{r:r,cx:0,cy:0},tip:{r:n,cx:o.x,cy:o.y},points:[[0+r*Math.cos(a(0)),0+r*Math.sin(a(0))],[o.x+n*Math.cos(a(0)),o.y+n*Math.sin(a(0))],[o.x+n*Math.cos(a(-180)),o.y+n*Math.sin(a(-180))],[0+r*Math.cos(a(-180)),0+r*Math.sin(a(-180))]].map(([e,t])=>`${e},${t}`).join(" ")}},[m,o,u]),y=(0,r.useCallback)((e,t)=>Math.cos(a(e-t))*o/2,[o]);return{ticks:h,getTickProps:p,getLabelProps:f,valueToAngle:m,angleToValue:e=>{let r=n-t;return Math.round(c+(e-t)/r*(d-c))},getArcProps:g,getNeedleProps:v,getSVGProps:()=>{let e=e=>t<e&&n>e?o/2:Math.max(0,y(t+90,e+90),y(n+90,e+90)),[r,i,a,s]=[e(180),e(270),e(0),e(90)],l=s+i,u=r+a,c=[-s,-r,l,u].join(" ");return{width:l,height:u,viewBox:c}}}}({domain:[e,l],startAngle:f,endAngle:p,numTicks:d,diameter:140}),g=m.getNeedleProps({value:c||0,baseRadius:6,tipRadius:0});return(0,t.jsx)("div",{className:i.default.gaugeView,children:(0,t.jsxs)("svg",{...m.getSVGProps(),children:[(0,t.jsx)("g",{id:"ticks",children:m.ticks.map((e,a)=>{let s=m.angleToValue(e),l=!h||s%h==1,c=m.getLabelProps({angle:e,offset:-10}),d=m.getTickProps({angle:e,length:-10});return(0,t.jsxs)(r.Fragment,{children:[(0,r.createElement)("line",{strokeWidth:3,...d,x1:Math.round(.9*d.x1*10)/10,x2:Math.round(.9*d.x2*10)/10,y1:Math.round(.9*d.y1*10)/10,y2:Math.round(.9*d.y2*10)/10,key:void 0,style:{stroke:(0,o.getColor)(s,u)}}),l&&(0,t.jsx)("text",{className:(0,n.default)(i.default.label,{[i.default.solarWindLabel]:"solarwinds"===u}),dominantBaseline:c.dominantBaseline,textAnchor:c.textAnchor,x:Math.round(c.x),y:Math.round(c.y),children:s})]},`tick-group-${e}${a}`)})}),(0,t.jsxs)("g",{id:"needle",className:i.default.needle,style:{transform:`rotate(${m.valueToAngle(c)}deg)`},fill:(0,o.getColor)(c,u),children:[(0,t.jsx)("polyline",{className:i.default.needlePoints,points:g.points}),(0,t.jsx)("circle",{className:i.default.needleBase,...g.base,r:12})]})]})})}],83363)},71101,e=>{e.v({graph:"index-module-scss-module__weBi2G__graph"})},26565,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(237),a=e.i(1725),s=e.i(494),o=e.i(55153),l=e.i(31195),u=e.i(34239),c=e.i(85183),d=e.i(93230),h=e.i(40455),f=e.i(31797),p=e.i(18949),m=e.i(86838),g=e.i(71101);let v=[30,50,100,150,200];e.s(["default",0,({syncId:e,locale:y})=>{let[x,b]=(0,n.useState)(!1),{hemisphereData:_}=(0,f.useRealtimeContext)();(0,n.useEffect)(()=>{b(!0)},[]);let S=(0,n.useMemo)(()=>_.map(e=>({...e,label:(0,r.formatInTimeZone)(e.forecastTime,"UTC","HH:mm")})),[_]);if(!x)return null;let w=_.length>0?Math.max(..._.map(e=>e.northPower)):0;_.length>0&&_.map(e=>e.northPower);let M=new Date,T=_.reduce((e,t)=>Math.abs(t.forecastTime.getTime()-M.getTime())<Math.abs(e.forecastTime.getTime()-M.getTime())?t:e,_[0]),E=T?.northPower,A=T?(0,r.formatInTimeZone)(T.forecastTime,"UTC","HH:mm"):null,C=m.GlobalLocalization[y].activity[E<=30?"low":E<=50?"moderate":E<=100?"high":"storm"];return(0,t.jsxs)("div",{className:g.default.graph,children:[(0,t.jsxs)("p",{children:[m.GlobalLocalization[y].now,": ",null!=E?`${E} GW - ${C}`:"N/A",null!=E&&(0,t.jsx)("span",{style:{color:(0,p.getHemispherePowerColorFromValue)(E)},children:"â"})]}),(0,t.jsx)(l.ResponsiveContainer,{width:"99%",height:250,children:(0,t.jsxs)(a.AreaChart,{accessibilityLayer:!1,syncId:e,data:S,margin:{top:25,right:10,left:0,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsx)("linearGradient",{id:"power",x1:"0",y1:"0",x2:"0",y2:1,children:S.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("stop",{stopColor:(0,p.getColor)(w,"hemisphere"),offset:0}),v.map(e=>{let r=e/w,n=Math.round(w*(1-r));return n>w||n<0?null:(0,t.jsx)("stop",{stopColor:(0,p.getColor)(n,"hemisphere"),offset:r},n)})]})})}),(0,t.jsx)(c.XAxis,{dataKey:"label",tick:{fontSize:11},tickSize:12,height:40,minTickGap:10}),(0,t.jsx)(d.YAxis,{domain:[0,100],width:60,type:"number",dataKey:"northPower",label:(0,t.jsx)(s.Label,{dx:-24,style:{textAnchor:"middle",fontSize:"90%",paddingRight:10},angle:270,value:"Hemispheric Power (GW)"})}),(0,t.jsx)(u.Tooltip,{content:(0,t.jsx)(({active:e,payload:n,label:i})=>
393e&&n&&n.length?(0,t.jsxs)(h.TooltipWrapper,{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:m.GlobalLocalization[y].observedTime}),":"," ",(0,r.formatInTimeZone)(n[0].payload.observationTime,"UTC","HH:mm")]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:m.GlobalLocalization[y].arrivalTime}),": ",i]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Northern Hemispheric Power"}),": ",n[0].payload.northPower," GW"]})]}):null,{}),position:{y:0}}),(0,t.jsx)(i.Area,{animationDuration:0,type:"monotone",dataKey:"northPower",stroke:"#999",fillOpacity:.8,fill:"url(#power)",activeDot:{r:6,stroke:"#ccc",fillOpacity:.9}}),A&&(0,t.jsx)(o.ReferenceLine,{x:A,children:(0,t.jsx)(s.Label,{value:m.GlobalLocalization[y].earth,position:"top"})}),(0,t.jsx)(o.ReferenceLine,{y:100,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getHemispherePowerColorFromValue)(100)}),(0,t.jsx)(o.ReferenceLine,{y:75,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getHemispherePowerColorFromValue)(70)}),(0,t.jsx)(o.ReferenceLine,{y:50,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getHemispherePowerColorFromValue)(50)}),(0,t.jsx)(o.ReferenceLine,{y:30,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getHemispherePowerColorFromValue)(30)})]})})]})}])},30837,e=>{e.v({imageContainer:"index-module-scss-module__wQQG3G__imageContainer"})},56912,e=>{"use strict";var t=e.i(43476),r=e.i(48391),n=e.i(30837),i=e.i(71645);e.s(["default",0,({src:e,alt:a})=>{let{realtimeData:s}=(0,r.useAuroraContext)(),[o,l]=(0,i.useState)(!1);return((0,i.useEffect)(()=>
393{l(!0)},[]),o)?(0,t.jsx)("div",{className:n.default.imageContainer,children:(0,t.jsx)("img",{className:n.default.image,src:`${e}?v=${s.date}`,alt:a,loading:"lazy"})}):null}])},61407,e=>{e.v({keyValueView:"index-module-scss-module__KCGVbG__keyValueView"})},63784,61037,e=>{"use strict";var t=e.i(55545),r=e.i(55024),n=e.i(99151),i=e.i(45110),a=e.i(81092);function s(e,t){let r=(0,a.toDate)(e)-(0,a.toDate)(t);return r<0?-1:r>0?1:r}var o=e.i(34662);e.s(["formatDistance",0,function(e,l,u){var c;let d,h=(0,r.getDefaultOptions)(),f=u?.locale??h.locale??t.defaultLocale,p=s(e,l);if(isNaN(p))throw RangeError("Invalid time value");let m=Object.assign({},u,{addSuffix:u?.addSuffix,comparison:p}),[g,v]=(0,i.normalizeDates)(u?.in,...p>0?[l,e]:[e,l]),y=(c=void 0,e=>{let t=(c?Math[c]:Math.trunc)(e);return 0===t?0:t})(((0,a.toDate)(v)-(0,a.toDate)(g))/1e3),x=Math.round((y-((0,n.getTimezoneOffsetInMilliseconds)(v)-(0,n.getTimezoneOffsetInMilliseconds)(g))/1e3)/60);if(x<2)if(u?.includeSeconds)if(y<5)return f.formatDistance("lessThanXSeconds",5,m);else if(y<10)return f.formatDistance("lessThanXSeconds",10,m);else if(y<20)return f.formatDistance("lessThanXSeconds",20,m);else if(y<40)return f.formatDistance("halfAMinute",0,m);else if(y<60)return f.formatDistance("lessThanXMinutes",1,m);else return f.formatDistance("xMinutes",1,m);else if(0===x)return f.formatDistance("lessThanXMinutes",1,m);else return f.formatDistance("xMinutes",x,m);if(x<45)return f.formatDistance("xMinutes",x,m);if(x<90)return f.formatDistance("aboutXHours",1,m);if(x<o.minutesInDay){let e=Math.round(x/60);return f.formatDistance("aboutXHours",e,m)}if(x<2520)return f.formatDistance("xDays",1,m);else if(x<o.minutesInMonth){let e=Math.round(x/o.minutesInDay);return f.formatDistance("xDays",e,m)}else if(x<2*o.minutesInMonth)return d=Math.round(x/o.minutesInMonth),f.formatDistance("aboutXMonths",d,m);if((d=function(e,t){var r,n;let o,l,u,c,[d,h,f]=(0,i.normalizeDates)(void 0,e,e,t),p=s(h,f),m=Math.abs(function(e,t){let[r,n]=(0,i.normalizeDates)(void 0,e,t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(h,f));if(m<1)return 0;1===h.getMonth()&&h.getDate()>27&&h.setDate(30),h.setMonth(h.getMonth()-p*m);let g=s(h,f)===-p;+(o=(0,a.toDate)(d,void 0),r=void 0,(l=(0,a.toDate)(o,r?.in)).setHours(23,59,59,999),l)==+(n=void 0,c=(u=(0,a.toDate)(o,n?.in)).getMonth(),u.setFullYear(u.getFullYear(),c+1,0),u.setHours(23,59,59,999),u)&&1===m&&1===s(d,f)&&(g=!1);let v=p*(m-g);return 0===v?0:v}(v,g))<12){let e=Math.round(x/o.minutesInMonth);return f.formatDistance("xMonths",e,m)}{let e=d%12,t=Math.trunc(d/12);return e<3?f.formatDistance("aboutXYears",t,m):e<9?f.formatDistance("overXYears",t,m):f.formatDistance("almostXYears",t+1,m)}}],63784);var l=e.i(43476),u=e.i(61407);e.s(["default",0,({children:e})=>(0,l.jsx)("div",{className:u.default.keyValueView,children:e})],61037)},53287,e=>{e.v({leirvogurView:"index-module-scss-module__Gm8wdW__leirvogurView"})},669,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(494),a=e.i(55706),s=e.i(29228),o=e.i(55153),l=e.i(31195),u=e.i(34239),c=e.i(85183),d=e.i(93230),h=e.i(31797),f=e.i(86838),p=e.i(40455),m=e.i(53287);let g={en:{z:"Z",h:"H",time:"Time",windSpeed:"Wind speed",density:"Density",lastUpdated:"Last updated",protons:"protons",zLatest:"Z:",hLatest:"H:"},is:{z:"Z",h:"H",time:"TÃmi",windSpeed:"Vindhraði",density:"Ãéttleiki",lastUpdated:"SÃðast uppfært",protons:"róteindir",zLatest:"Z:",hLatest:"H:"}};e.s(["default",0,({syncId:e,locale:v,maxMinutes:y})=>{let[x,b]=(0,n.useState)(!1),{leirvogurData:_}=(0,h.useRealtimeContext)();(0,n.useEffect)(()=>{b(!0)},[]);let S=(0,n.useMemo)(()=>(_.length>y?_.slice(0,y):_).map(e=>({z:e[1]+50400,h:e[2]+12800,d:e[3]+350,t:1e3*e[0],label:(0,r.formatInTimeZone)(1e3*e[0],"UTC","HH:mm")})).reverse(),[_,y]);if(!x)return null;let w=_.length>0?_[0][1]:0,M=_.length>0?_[0][2]:0;return(0,t.jsxs)("div",{className:m.default.leirvogurView,children:[(0,t.jsx)(l.ResponsiveContainer,{width:"99%",height:150,children:(0,t.jsxs)(s.LineChart,{syncId:e||"leirvogur",data:S,accessibilityLayer:!1,children:[(0,t.jsx)(d.YAxis,{domain:[49800,51e3],type:"number",display:"none",dataKey:"z"}),(0,t.jsx)(a.Line,{dot:!1,type:"monotone",dataKey:"z",stroke:"#8884d8",activeDot:{r:8}}),(0,t.jsx)(u.Tooltip,{content:(0,t.jsx)(({active:e,payload:r,label:n})=>
393e&&r&&r.length?(0,t.jsxs)(p.TooltipWrapper,{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:f.GlobalLocalization[v].time}),":"," ",r[0].payload.label]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:g[v].z}),": ",r[0].payload.z," nT"]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:g[v].h}),": ",r[0].payload.h," nT"]}),(0,t.jsxs)("p",{children:[r[0].payload.d,"°"]})]}):null,{}),position:{y:0}}),(0,t.jsx)(o.ReferenceLine,{y:50900,stroke:"rgba(255, 255, 255, .0)",children:(0,t.jsx)(i.Label,{fontSize:12,value:`${g[v].zLatest} ${w} nT`,position:"end"})}),(0,t.jsx)(o.ReferenceLine,{y:50400,stroke:"rgba(255, 255, 255, .2)",strokeDasharray:"10 10",children:(0,t.jsx)(i.Label,{value:"Z",position:"left"})})]})}),(0,t.jsx)(l.ResponsiveContainer,{width:"99%",height:150,children:(0,t.jsxs)(s.LineChart,{syncId:e||"leirvogur",data:S,accessibilityLayer:!1,children:[(0,t.jsx)(c.XAxis,{dataKey:"label",tick:{fontSize:11},tickSize:8}),(0,t.jsx)(d.YAxis,{domain:[12200,13400],type:"number",tickSize:12,display:"none",dataKey:"h"}),(0,t.jsx)(a.Line,{dot:!1,type:"monotone",dataKey:"h",stroke:"red",activeDot:{r:8}}),(0,t.jsx)(u.Tooltip,{content:(0,t.jsx)(({active:e,payload:r,label:n})=>(0,t.jsx)("div",{style:{display:"none"}}),{})}),(0,t.jsx)(o.ReferenceLine,{y:13300,stroke:"rgba(255, 255, 255, .0)",children:(0,t.jsx)(i.Label,{fontSize:12,value:`${g[v].hLatest} ${M} nT`,position:"end"})}),(0,t.jsx)(o.ReferenceLine,{y:12800,stroke:"rgba(255, 255, 255, .2)",strokeDasharray:"10 10",children:(0,t.jsx)(i.Label,{value:"H",position:"left"})})]})})]})}])},88938,e=>{e.v({kpiLongtermView:"index-module-scss-module__w-FVeW__kpiLongtermView",tooltip:"index-module-scss-module__w-FVeW__tooltip"})},97869,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(237),a=e.i(1725),s=e.i(72526),o=e.i(31195),l=e.i(34239),u=e.i(85183),c=e.i(93230),d=e.i(48391),h=e.i(18949),f=e.i(88938);let p=[1,2,3,4,5,6,7,8,9],m=({active:e,payload:r,label:n})=>e&&r&&r.length?(0,t.jsx)("div",{className:f.default.tooltip,children:(0,t.jsx)("p",{className:"label",children:`${n}: ${r[0].value} Kpi`})}):null;e.s(["default",0,()=>{let[e,g]=(0,n.useState)(!1),{forecastData:v}=(0,d.useAuroraContext)();(0,n.useEffect)(()=>{g(!0)},[]);let y=(0,n.useMemo)(()=>{let e=v?.kpi?.kpi||[];if(v?.kpiLongterm?.kpi==null)return[];let t={};for(let e=0;e<v?.kpiLongterm.kpi.length;e++)t[new Date(v?.kpiLongterm.kpi[e].date).getTime()]={name:(0,r.formatInTimeZone)(new Date(v?.kpiLongterm.kpi[e].date),"UTC","dd MMM"),date:new Date(v?.kpiLongterm.kpi[e].date).getTime(),kpi:Math.round(v?.kpiLongterm.kpi[e].value)};for(let r=0;r<e.length;r++){let n=new Date(e[r].date).setHours(0,0,0,0);t?.[n]&&t?.[n].kpi<e[r].value&&(t[n].kpi=Math.round(e[r].value))}return Object.values(t)},[v]);if(!e)return null;let x=Math.max(...y.map(e=>e.kpi));return(0,t.jsx)("div",{className:f.default.kpiLongtermView,children:(0,t.jsx)(o.ResponsiveContainer,{width:"99%",height:400,children:(0,t.jsxs)(a.AreaChart,{accessibilityLayer:!1,data:y,margin:{top:30,right:0,left:0,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"kpi",x1:"0",y1:"0",x2:"0",y2:1,children:[(0,t.jsx)("stop",{stopColor:(0,h.getColor)(x,"kpi"),offset:0}),p.map(e=>{let r=e/x,n=Math.round(x*(1-r));return n>x||n<0?null:(0,t.jsx)("stop",{stopColor:(0,h.getColor)(n,"kpi"),offset:r},n)})]})}),(0,t.jsx)(u.XAxis,{dataKey:"name",tick:{fontSize:11},minTickGap:2,tickMargin:30,angle:-45,height:70}),(0,t.jsx)(c.YAxis,{domain:[0,9],tickCount:10,width:20}),(0,t.jsx)(s.CartesianGrid,{strokeDasharray:"1 4",opacity:.5}),(0,t.jsx)(l.Tooltip,{content:(0,t.jsx)(m,{})}),(0,t.jsx)(i.Area,{type:"monotone",dataKey:"kpi",stroke:"#999",fillOpacity:.8,fill:"url(#kpi)",activeDot:{r:8}})]})})})}])},45372,e=>{e.v({magneticView:"index-module-scss-module__OEHxCW__magneticView"})},35748,e=>{"use strict";var t=e.i(43476),r=e.i(83363),n=e.i(45372),i=e.i(61037),a=e.i(71645),s=e.i(63784),o=e.i(6389),l=e.i(31797);let u={en:{bzLevel:"Bz level",btLevel:"Bt level",lastUpdated:"Last updated",north:"north",south:"south"},is:{bzLevel:"Bz stuðull",btLevel:"Bt stuðull",lastUpdated:"SÃðast uppfært",north:"norður",south:"suður"}};e.s(["default",0,({locale:e})=>{let[c,d]=(0,a.useState)(!1),[h,f]=(0,a.useState)(new Date),{realtimeData:p,closestEarthIndex:m,latestItem:g}=(0,l.useRealtimeContext)(),v=(0,a.useMemo)(()=>null==p?null:p[m],[p,m]);return((0,a.useEffect)(()=>{d(!0)},[]),(0,a.useEffect)(()=>{let e;return c&&(e=setInterval(()=>{f(new Date)},5e3)),()=>{e&&clearInterval(e)}},[c]),c)?(0,t.jsxs)("div",{className:n.default.magneticView,children:[(0,t.jsx)(r.default,{type:"magnetic",startGaugeValue:-30,endGaugeValue:30,value:v?.bz||0,numTicks:7,startAngle:92,endAngle:268}),(0,t.jsxs)(i.default,{children:[(0,t.jsx)("span",{children:u[e].bzLevel}),v?(0,t.jsxs)("span",{children:[v.bz," nT ",v.bz>0?u[e].north:u[e].south]}):(0,t.jsx)("span",{children:"N/A"})]}),(0,t.jsxs)(i.default,{children:[(0,t.jsx)("span",{children:u[e].btLevel}),v?(0,t.jsxs)("span",{children:[v.bt," nT"]}):(0,t.jsx)("span",{children:"N/A"})]}),(0,t.jsxs)(i.default,{children:[(0,t.jsx)("span",{children:u[e].lastUpdated}),g?(0,t.jsx)("span",{children:(0,s.formatDistance)(g.time,h,{locale:"is"===e?o.is:void 0,includeSeconds:!0,addSuffix:!0})}):(0,t.jsx)("span",{children:"N/A"})]})]}):null}])},46656,e=>{e.v({clouds:"index-module-scss-module__TIdB8a__clouds",days:"index-module-scss-module__TIdB8a__days",desktopOnly:"index-module-scss-module__TIdB8a__desktopOnly",event:"index-module-scss-module__TIdB8a__event",forecastTime:"index-module-scss-module__TIdB8a__forecastTime",image:"index-module-scss-module__TIdB8a__image",imageScaleWrapper:"index-module-scss-module__TIdB8a__imageScaleWrapper",imgLoader:"index-module-scss-module__TIdB8a__imgLoader",isImgLoaded:"index-module-scss-module__TIdB8a__isImgLoaded",kpiLabel:"index-module-scss-module__TIdB8a__kpiLabel",labels:"index-module-scss-module__TIdB8a__labels",mapView:"index-module-scss-module__TIdB8a__mapView",markerBlink:"index-module-scss-module__TIdB8a__markerBlink",markersContainer:"index-module-scss-module__TIdB8a__markersContainer",overlay:"index-module-scss-module__TIdB8a__overlay",rail:"index-module-scss-module__TIdB8a__rail",referenceTown:"index-module-scss-module__TIdB8a__referenceTown",referenceTownRight:"index-module-scss-module__TIdB8a__referenceTownRight",root:"index-module-scss-module__TIdB8a__root",rotate:"index-module-scss-module__TIdB8a__rotate",satellite:"index-module-scss-module__TIdB8a__satellite",satellite2:"index-module-scss-module__TIdB8a__satellite2",sliderContainer:"index-module-scss-module__TIdB8a__sliderContainer",sliderWrapper:"index-module-scss-module__TIdB8a__sliderWrapper",thumb:"index-module-scss-module__TIdB8a__thumb",tick:"index-module-scss-module__TIdB8a__tick",tickNotActive:"index-module-scss-module__TIdB8a__tickNotActive",ticks:"index-module-scss-module__TIdB8a__ticks",townLabel:"index-module-scss-module__TIdB8a__townLabel",userMarker:"index-module-scss-module__TIdB8a__userMarker",userMarkerTooltip:"index-module-scss-module__TIdB8a__userMarkerTooltip",userMarkerVisible:"index-module-scss-module__TIdB8a__userMarkerVisible"})},62546,e=>{"use strict";let t,r;var n=e.i(43476),i=e.i(52598),a=e.i(71645),s=e.i(7670);function o(e){return"string"==typeof e}let l={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"},u="base";function c(e,t){let r=l[t];return r?`${u}--${r}`:`${u}-${e}-${t}`}let d="Slider";function h(e){return c(d,e)}function f(e){return e&&e.ownerDocument||document}r={},["root","active","focusVisible","disabled","dragging","marked","vertical","trackInverted","trackFalse","rail","track","mark","markActive","markLabel","markLabelActive","thumb"].forEach(e
393=>{r[e]=c(d,e)});let p="u">typeof window?a.useLayoutEffect:a.useEffect,m=function(e){let t=a.useRef(e);return p(()=>{t.current=e}),a.useRef((...e)=>(0,t.current)(...e)).current};function g(...e){let t=a.useRef(void 0),r=a.useCallback(t=>{let r=e.map(e=>{if(null==e)return null;if("function"==typeof e){let r=e(t);return"function"==typeof r?r:()=>{e(null)}}return e.current=t,()=>{e.current=null}});return()=>{r.forEach(e=>e?.())}},e);return a.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=r(e))},e)}function v(e){try{return e.matches(":focus-visible")}catch(e){}return!1}let y={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},x=function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))},b=function(e,t=[]){if(void 0===e)return{};let r={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r)).forEach(t=>{r[t]=e[t]}),r};function _(e,t){return e-t}function S(e,t){let{index:r}=e.reduce((e,r,n)=>{let i=Math.abs(t-r);return null===e||i<e.distance||i===e.distance?{distance:i,index:n}:e},null)??{};return r}function w(e,t){if(void 0!==t.current&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){let n=e.changedTouches[r];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function M({values:e,newValue:t,index:r}){let n=e.slice();return n[r]=t,n.sort(_)}function T({sliderRef:e,activeIndex:t,setActive:r}){let n=f(e.current);e.current?.contains(n.activeElement)&&Number(n?.activeElement?.getAttribute("data-index"))===t||e.current?.querySelector(`[type="range"][data-index="${t}"]`).focus(),r&&r(t)}function E(e,t){return"number"==typeof e&&"number"==typeof t?e===t:"object"==typeof e&&"object"==typeof t&&function(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}(e,t)}let A={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},C=e=>e;function P(){return void 0===t&&(t=!("u">typeof CSS)||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),t}let I=function(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(r=>{t[r]=e[r]}),t},O=function(e){let{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:i,className:a}=e;if(!t){let e=(0,s.default)(r?.className,a,i?.className,n?.className),t={...r?.style,...i?.style,...n?.style},o={...r,...i,...n};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=b({...i,...n}),l=I(n),u=I(i),c=t(o),d=(0,s.default)(c?.className,r?.className,a,i?.className,n?.className),h={...c?.style,...r?.style,...i?.style,...n?.style},f={...c,...r,...u,...l};return d.length>0&&(f.className=d),Object.keys(h).length>0&&(f.style=h),{props:f,internalRef:c.ref}},R=function(e){var t,r,n;let{elementType:i,externalSlotProps:a,ownerState:s,skipResolvingSlotProps:o=!1,...l}=e,u=o?{}:"function"==typeof a?a(s,void 0):a,{props:c,internalRef:d}=O({...l,externalSlotProps:u}),h=g(d,u?.ref,e.additionalProps?.ref);return t=i,r={...c,ref:h},n=s,void 0===t||"string"==typeof t?r:{...r,ownerState:{...r.ownerState,...n}}},L=a.createContext({disableDefaultClasses:!1});function N(e){return e}let D=a.forwardRef(function(e,t){let{"aria-label":r,"aria-valuetext":i,"aria-labelledby":l,className:u,disableSwap:c=!1,disabled:d=!1,getAriaLabel:I,getAriaValueText:O,marks:D=!1,max:k=100,min:U=0,name:F,onChange:z,onChangeCommitted:j,orientation:B="horizontal",shiftStep:V=10,scale:G=N,step:H=1,tabIndex:W,track:X="normal",value:q,valueLabelFormat:Y=N,isRtl:$=!1,defaultValue:K,slotProps:Z={},slots:J={},...Q}=e,ee={...e,marks:D,disabled:d,disableSwap:c,isRtl:$,defaultValue:K,max:k,min:U,orientation:B,scale:G,step:H,shiftStep:V,track:X,valueLabelFormat:Y},{axisProps:et,getRootProps:er,getHiddenInputProps:en,getThumbProps:ei,active:ea,axis:es,range:eo,focusedThumbIndex:el,dragging:eu,marks:ec,values:ed,trackOffset:eh,trackLeap:ef,getThumbStyle:ep}=function(e){let{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:i=!1,isRtl:s=!1,marks:o=!1,max:l=100,min:u=0,name:c,onChange:d,onChangeCommitted:h,orientation:I="horizontal",rootRef:O,scale:R=C,step:L=1,shiftStep:N=10,tabIndex:D,value:k}
393=e,U=a.useRef(void 0),[F,z]=a.useState(-1),[j,B]=a.useState(-1),[V,G]=a.useState(!1),H=a.useRef(0),[W,X]=function({controlled:e,default:t,name:r,state:n="value"}){let{current:i}=a.useRef(void 0!==e),[s,o]=a.useState(t),l=a.useCallback(e=>{i||o(e)},[]);return[i?e:s,l]}({controlled:k,default:r??u,name:"Slider"}),q=d&&((e,t,r)=>{let n=e.nativeEvent||e,i=new n.constructor(n.type,n);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:c}}),d(i,t,r)}),Y=Array.isArray(W),$=Y?W.slice().sort(_):[W];$=$.map(e=>null==e?u:x(e,u,l));let K=!0===o&&null!==L?[...Array(Math.floor((l-u)/L)+1)].map((e,t)=>({value:u+L*t})):o||[],Z=K.map(e=>e.value),[J,Q]=a.useState(-1),ee=a.useRef(null),et=g(O,ee),er=(e,t)=>{let r=Number(e.currentTarget.getAttribute("data-index")),n=$[r],a=Z.indexOf(n),s=t;if(K&&null==L){let e=Z[Z.length-1];s=s>e?e:s<Z[0]?Z[0]:s<n?Z[a-1]:Z[a+1]}if(s=x(s,u,l),Y){i&&(s=x(s,$[r-1]||-1/0,$[r+1]||1/0));let e=s;s=M({values:$,newValue:s,index:r});let t=r;i||(t=s.indexOf(e)),T({sliderRef:ee,activeIndex:t})}X(s),Q(r),q&&!E(s,W)&&q(e,s,r),h&&h(e,s)};p(()=>{n&&ee.current.contains(document.activeElement)&&document.activeElement?.blur()},[n]),n&&-1!==F&&z(-1),n&&-1!==J&&Q(-1);let en=a.useRef(void 0),ei=I;s&&"horizontal"===I&&(ei+="-reverse");let ea=({finger:e,move:t=!1})=>{let r,n,{current:a}=ee,{width:s,height:o,bottom:c,left:d}=a.getBoundingClientRect();if(r=ei.startsWith("vertical")?(c-e.y)/o:(e.x-d)/s,ei.includes("-reverse")&&(r=1-r),n=(l-u)*r+u,L)n=Number((Math.round((n-u)/L)*L+u).toFixed(function(e){if(1>Math.abs(e)){let t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}(L)));else{let e=S(Z,n);n=Z[e]}n=x(n,u,l);let h=0;if(Y){h=t?en.current:S($,n),i&&(n=x(n,$[h-1]||-1/0,$[h+1]||1/0));let e=n;n=M({values:$,newValue:n,index:h}),i&&t||(en.current=h=n.indexOf(e))}return{newValue:n,activeIndex:h}},es=m(e=>{let t=w(e,U);if(!t)return;if(H.current+=1,"mousemove"===e.type&&0===e.buttons)return void eo(e);let{newValue:r,activeIndex:n}=ea({finger:t,move:!0});T({sliderRef:ee,activeIndex:n,setActive:z}),X(r),!V&&H.current>2&&G(!0),q&&!E(r,W)&&q(e,r,n)}),eo=m(e=>{let t=w(e,U);if(G(!1),!t)return;let{newValue:r}=ea({finger:t,move:!0});z(-1),"touchend"===e.type&&B(-1),h&&h(e,r),U.current=void 0,eu()}),el=m(e=>{if(n)return;P()||e.preventDefault();let t=e.changedTouches[0];null!=t&&(U.current=t.identifier);let r=w(e,U);if(!1!==r){let{newValue:t,activeIndex:n}=ea({finger:r});T({sliderRef:ee,activeIndex:n,setActive:z}),X(t),q&&!E(t,W)&&q(e,t,n)}H.current=0;let i=f(ee.current);i.addEventListener("touchmove",es,{passive:!0}),i.addEventListener("touchend",eo,{passive:!0})}),eu=a.useCallback(()=>{let e=f(ee.current);e.removeEventListener("mousemove",es),e.removeEventListener("mouseup",eo),e.removeEventListener("touchmove",es),e.removeEventListener("touchend",eo)},[eo,es]);a.useEffect(()=>{let{current:e}=ee;return e.addEventListener("touchstart",el,{passive:P()}),()=>{e.removeEventListener("touchstart",el),eu()}},[eu,el]),a.useEffect(()=>{n&&eu()},[n,eu]);let ec=((Y?$[0]:u)-u)*100/(l-u),ed=($[$.length-1]-u)*100/(l-u)-ec;return{active:F,axis:ei,axisProps:A,dragging:V,focusedThumbIndex:J,getHiddenInputProps:(r={})=>{let i,a,o,d,h=b(r),f={onChange:(i=h||{},e=>{i.onChange?.(e),er(e,e.target.valueAsNumber)}),onFocus:(a=h||{},e=>{let t=Number(e.currentTarget.getAttribute("data-index"));v(e.target)&&Q(t),B(t),a?.onFocus?.(e)}),onBlur:(o=h||{},e=>{v(e.target)||Q(-1),B(-1),o?.onBlur?.(e)}),onKeyDown:(d=h||{},e=>{if(null!==L){let t=$[Number(e.currentTarget.getAttribute("data-index"))],r=null;("ArrowLeft"===e.key||"ArrowDown"===e.key)&&e.shiftKey||"PageDown"===e.key?r=Math.max(t-N,u):(("ArrowRight"===e.key||"ArrowUp"===e.key)&&e.shiftKey||"PageUp"===e.key)&&(r=Math.min(t+N,l)),null!==r&&(er(e,r),e.preventDefault())}d?.onKeyDown?.(e)})},p={...h,...f};return{tabIndex:D,"aria-labelledby":t,"aria-orientation":I,"aria-valuemax":R(l),"aria-valuemin":R(u),name:c,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":e.step??void 0,disabled:n,...r,...p,style:{...y,direction:s?"rtl":"ltr",width:"100%",height:"100%"}}},getRootProps:(e={})=>{let t,r=b(e),i={onMouseDown:(t=r||{},e=>{if(t.onMouseDown?.(e),n||e.defaultPrevented||0!==e.button)return;e.preventDefault();let r=w(e,U);if(!1!==r){let{newValue:t,activeIndex:n}=ea({finger:r});T({sliderRef:ee,activeIndex:n,setActive:z}),X(t),q&&!E(t,W)&&q(e,t,n)}H.current=0;let i=f(ee.current);i.addEventListener("mousemove",es,{passive:!0}),i.addEventListener("mouseup",eo)})},a={...r,...i};return{...e,ref:et,...a}},getThumbProps:(e={})=>{let t,r,n=b(e),i={onMouseOver:(t=n||{},e=>{t.onMouseOver?.(e),B(Number(e.currentTarget.getAttribute("data-index")))}),onMouseLeave:(r=n||{},e=>{r.onMouseLeave?.(e),B(-1)})};return{...e,...n,...i}},marks:K,open:j,range:Y,rootRef:et,trackLeap:ed,trackOffset:ec,values:$,getThumbStyle:e=>({pointerEvents:-1!==F&&F!==e?"none":void 0})}}({...ee,rootRef:t}),em={...ee,marked:ec.length>0&&ec.some(e=>e.label),dragging:eu,focusedThumbIndex:el,activeThumbIndex:ea},eg=(e=>{let{disabled:t,dragging:r,marked:n,orientation:i,track:s}=e;return function(e,t){let r={};for(let n in e){let i=e[n],a="",s=!0;for(let e=0;e<i.length;e+=1){let r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1)}r[n]=a}return r}({root:["root",t&&"disabled",r&&"dragging",n&&"marked","vertical"===i&&"vertical","inverted"===s&&"trackInverted",!1===s&&"trackFalse"],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled"],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]},function(e){let{disableDefaultClasses:t}=a.useContext(L);return r=>t?"":e(r)}(h))})(em),ev=J.root??"span",ey=R({elementType:ev,getSlotProps:er,externalSlotProps:Z.root,externalForwardedProps:Q,ownerState:em,className:[eg.root,u]}),ex=J.rail??"span",eb=R({elementType:ex,externalSlotProps:Z.rail,ownerState:em,className:eg.rail}),e_=J.track??"span",eS=R({elementType:e_,externalSlotProps:Z.track,additionalProps:{style:{...et[es].offset(eh),...et[es].leap(ef)}},ownerState:em,className:eg.track}),ew=J.thumb??"span",eM=R({elementType:ew,getSlotProps:ei,externalSlotProps:Z.thumb,ownerState:em,skipResolvingSlotProps:!0}),eT=J.valueLabel,eE=R({elementType:eT,externalSlotProps:Z.valueLabel,ownerState:em}),eA=J.mark??"span",eC=R({elementType:eA,externalSlotProps:Z.mark,ownerState:em,className:eg.mark}),eP=J.markLabel??"span",eI=R({elementType:eP,externalSlotProps:Z.markLabel,ownerState:em}
393),eO=J.input||"input",eR=R({elementType:eO,getSlotProps:en,externalSlotProps:Z.input,ownerState:em});return(0,n.jsxs)(ev,{...ey,children:[(0,n.jsx)(ex,{...eb}),(0,n.jsx)(e_,{...eS}),ec.filter(e=>e.value>=U&&e.value<=k).map((e,t)=>{let r,i=(e.value-U)*100/(k-U),l=et[es].offset(i);return r=!1===X?ed.includes(e.value):"normal"===X&&(eo?e.value>=ed[0]&&e.value<=ed[ed.length-1]:e.value<=ed[0])||"inverted"===X&&(eo?e.value<=ed[0]||e.value>=ed[ed.length-1]:e.value>=ed[0]),(0,n.jsxs)(a.Fragment,{children:[(0,n.jsx)(eA,{"data-index":t,...eC,...!o(eA)&&{markActive:r},style:{...l,...eC.style},className:(0,s.default)(eC.className,r&&eg.markActive)}),null!=e.label?(0,n.jsx)(eP,{"aria-hidden":!0,"data-index":t,...eI,...!o(eP)&&{markLabelActive:r},style:{...l,...eI.style},className:(0,s.default)(eg.markLabel,eI.className,r&&eg.markLabelActive),children:e.label}):null]},t)}),ed.map((e,t)=>{var a,u;let c=(e-U)*100/(k-U),h=et[es].offset(c),f=(a=Z.thumb,u={index:t,focused:el===t,active:ea===t},"function"==typeof a?a(em,u):a);return(0,n.jsxs)(ew,{"data-index":t,...eM,...f,className:(0,s.default)(eg.thumb,eM.className,f?.className,ea===t&&eg.active,el===t&&eg.focusVisible),style:{...h,...ep(t),...eM.style,...f?.style},children:[(0,n.jsx)(eO,{"data-index":t,"aria-label":I?I(t):r,"aria-valuenow":G(e),"aria-labelledby":l,"aria-valuetext":O?O(G(e),t):i,value:ed[t],...eR}),eT?(0,n.jsx)(eT,{...!o(eT)&&{valueLabelFormat:Y,index:t,disabled:d},...eE,children:"function"==typeof Y?Y(G(e),t):Y}):null]},t)})]})});var k=e.i(34662),U=e.i(81092),F=e.i(1851),z=e.i(6389);e.i(6175);var j=e.i(94174),B=e.i(70703),V=e.i(48391),G=e.i(18949),H=e.i(66886),W=e.i(46656),X=e.i(32557),q=e.i(91149),Y=e.i(31435);let $=(0,B.default)(()=>e.A(64581),{loadableGenerated:{modules:[45857]},ssr:!1}),K=e=>{let t={root:e=>({className:(0,s.default)(W.default.root,{[W.default.disabled]:e.disabled})}),thumb:{className:W.default.thumb},input:{className:W.default.input},rail:{className:W.default.rail},mark:{className:W.default.mark},markLabel:{className:W.default.markLabel}};return(0,n.jsx)(D,{...e,slotProps:t})},Z=({startDateUnixTime:e,endDateUnixTime:t,links:r,diffHours:i,labels:o=[],name:l="clouds",showTime:u=!1,showKpi:c=!1,locale:d})=>{let[h,f]=(0,a.useState)(!1),{forecastData:p}=(0,V.useAuroraContext)(),{currentTime:m,setCurrentTime:g}=(0,X.useTimeContext)(),{currentLocation:v,isLoading:y}=(0,q.useLocationContext)(),[x,b]=(0,a.useState)(()=>{let n=new Date(e),a=new Date(t),s=new Date;if(s>=n&&s<=a){let e=Math.ceil(Math.abs(s.getTime()-n.getTime())/36e5);return e>=r.length-1?r.length-1:e}return i>=r.length-1?r.length-1:i});(0,a.useEffect)(()=>{x>=r.length-1&&b(r.length-1)},[l,r,x]),(0,a.useEffect)(()=>{let e=r?.[x];if("satellite2"===l)h||f(!0);else if(e){let t=new Image;t.src=e.startsWith("https://")?e:`//wsrv.nl/?url=${e}`,f(t.complete)}},[l,r]),(0,a.useEffect)(()=>{let e=null;return h||(e=setTimeout(()=>{f(!0)},3500)),()=>{e&&clearTimeout(e)}},[h]);let _=e=>p?.kpi?.kpi?.[e]?.value?p?.kpi?.kpi?.[e]:p?.kpiLongterm?.kpi?.[Math.floor(e/24)]?p?.kpiLongterm?.kpi?.[Math.floor(e/24)]:{value:0},S=(0,a.useMemo)(()=>{let r=new Date(e),n=new Date(t),i=[];for(;r<=n;)i.push(new Date(r)),r.setDate(r.getDate()+1);return i},[e,t]);(0,a.useEffect)(()=>{g(new Date(e+36e5*x))},[x,e,g]),(0,a.useEffect)(()=>{if("satellite2"!==l)for(let e=0;e<r.length;e++)new Image().src=r[e].startsWith("https://")?r[e]:`//wsrv.nl/?url=${r[e]}`},[r,t,e]);let w=(0,a.useMemo)(()=>Array(4*S.length+1).fill(0).map((e,t)=>t),[S]),M=(0,a.useMemo)(()=>Array(24*S.length+1).fill(0).map((e,t)=>t),[S]),T=(0,a.useMemo)(()=>{if(y)return null;let e=(0,Y.isWithinBounds)(v.lat,v.lng);return{...(0,Y.latLonToImagePosition)(v.lat,v.lng),withinBounds:e}},[v.lat,v.lng,y]),E=(0,a.useMemo)(()=>Y.ICELAND_REFERENCE_TOWNS.map(e=>({...e,position:(0,Y.latLonToImagePosition)(e.lat,e.lng)})),[]);return(0,n.jsxs)("div",{className:W.default.mapView,children:[(0,n.jsxs)("div",{className:(0,s.default)(W.default.image,W.default[l||"clouds"],(h||"satellite2"===l)&&W.default.isImgLoaded),children:["satellite2"===l?(0,n.jsx)($,{locale:d,time:r[x]}):(0,n.jsxs)("div",{className:W.default.imageScaleWrapper,children:[r?.[x]?.startsWith("https://")?(0,n.jsx)("img",{src:r[x],alt:"",onLoad:()=>f(!0)},l):(0,n.jsx)("img",{src:`//wsrv.nl/?url=${r[x]}`,alt:"",onLoad:()=>f(!0)},l),"clouds"===l&&(0,n.jsxs)("div",{className:W.default.markersContainer,children:[T&&(0,n.jsx)("div",{className:(0,s.default)(W.default.userMarker,T.withinBounds&&W.default.userMarkerVisible),style:{left:`${100*T.x}%`,top:`${100*T.y}%`,opacity:+!!T.withinBounds}
393,title:"is"===d?"ÃÃn staðsetning":"Your location",children:(0,n.jsx)("span",{className:W.default.userMarkerTooltip,children:"is"===d?"ÃÃn staðsetning":"Your location"})}),E.map(e=>(0,n.jsx)("div",{className:(0,s.default)(W.default.referenceTown,e.dotOnRight&&W.default.referenceTownRight,!e.mobileVisible&&W.default.desktopOnly),style:{left:`${100*e.position.x}%`,top:`${100*e.position.y}%`},title:e.name,children:(0,n.jsx)("span",{className:W.default.townLabel,children:e.name})},e.name))]})]}),(0,n.jsx)("div",{className:W.default.imgLoader,children:(0,n.jsx)(H.default,{fillColor:"green"})}),(o.length>0||c)&&(0,n.jsxs)("div",{className:W.default.labels,children:[_(x)?.value&&(0,n.jsxs)("div",{className:W.default.kpiLabel,children:["Kp-index ",Math.round(_(x)?.value)]}),o.map(e=>(0,n.jsx)("div",{className:W.default.label,style:{color:e.color,backgroundColor:e.bgColor},children:e.label},e.label))]}),u&&(0,n.jsx)("div",{className:W.default.forecastTime,children:(0,n.jsxs)("div",{children:[(0,j.formatInTimeZone)(m,"UTC","is"===d?"EEE d. MMM HH:mm":"EEE, do MMM HH:mm",{locale:"is"===d?z.is:void 0})," ","en"===d&&"UTC"]})})]}),(0,n.jsx)("div",{className:W.default.sliderContainer,children:(0,n.jsxs)("div",{className:W.default.sliderWrapper,children:[(0,n.jsx)("div",{className:W.default.days,children:S.map((e,t)=>{var r;let i;return(0,n.jsx)("div",{className:W.default.day,children:(0,n.jsx)("span",{children:(0,F.format)((r=e.getTimezoneOffset(),(i=(0,U.toDate)(e,void 0)).setTime(i.getTime()+r*k.millisecondsInMinute),i),"E",{locale:"is"===d?z.is:void 0})})},e.getTime())})}),(0,n.jsx)(K,{defaultValue:30,step:1,min:0,max:24*S.length,value:x,onChange:(t,n)=>{let i=n;b(i=n<r.length?n:r.length-1),g(new Date(e+36e5*i));let a=r?.[x];if(a&&"satellite2"!==l){let e=new Image;e.src=a.startsWith("https://")?a:`//wsrv.nl/?url=${a}`,f(e.complete)}}}),(0,n.jsxs)("div",{className:W.default.ticks,children:[w.map(e=>(0,n.jsx)(a.Fragment,{children:(0,n.jsx)("div",{className:(0,s.default)(W.default.tick,6*e>r.length-1&&W.default.tickNotActive),style:{position:"absolute",left:`${e/(w.length-1)*100}%`},children:6*e%24})},e)),M.map((e,t)=>(0,n.jsx)(a.Fragment,{children:_(t)&&(0,n.jsx)("div",{className:(0,s.default)(W.default.event),style:{position:"absolute",left:`${t/(M.length-1)*100}%`,height:Math.min(_(t).value,6),backgroundColor:(0,G.getColor)(_(t).value,"kpi")}})},t))]})]})})]})};var J=e.i(18566);let Q={en:{highClouds:"High clouds",middleClouds:"Middle clouds",lowClouds:"Low clouds",clearSkies:"Clear skies"},is:{highClouds:"Háský",middleClouds:"Miðský",lowClouds:"Lágský",clearSkies:"HeiðskÃrt"}};e.s(["default",0,({locale:e})=>{let{forecastData:t}=(0,V.useAuroraContext)(),r=(0,J.useSearchParams)().get("tab"),s=(0,a.useMemo)(()=>{switch(r){case"clouds":default:return"clouds";case"aurora":return"aurora";case"solarwind":return"solarwind";case"satellite":return"satellite";case"satellite2":return"satellite2"}},[r]);return null==t?(0,n.jsx)(i.default,{locale:e}):(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(i.default,{locale:e}),children:(0,n.jsx)(Z,{locale:e,links:t?.[s]?.links,startDateUnixTime:t?.[s]?.startDateUnixTime,endDateUnixTime:t?.[s]?.endDateUnixTime,diffHours:t?.[s]?.diffHours,name:s,showTime:"clouds"===s||"satellite"===s,showKpi:"clouds"===s||"satellite"===s||"solarwind"===s,labels:"clouds"===s?[{label:Q[e].highClouds,color:"#ffffff",bgColor:"rgba(105,188,168,0.75)"},{label:Q[e].middleClouds,color:"#ffffff",bgColor:"rgba(125,40,82,0.75)"},{label:Q[e].lowClouds,color:"#ffffff",bgColor:"rgba(102,97,200,0.75)"},{label:Q[e].clearSkies,color:"#333",bgColor:"rgba(255, 255, 255,0.75)"}]:[]})})}],62546)},27705,e=>{e.v({bar:"AuroraScene-module-scss-module__nkoMoG__bar",gradient:"AuroraScene-module-scss-module__nkoMoG__gradient",probability:"AuroraScene-module-scss-module__nkoMoG__probability",scene:"AuroraScene-module-scss-module__nkoMoG__scene",stats:"AuroraScene-module-scss-module__nkoMoG__stats"})},40587,e=>{"use strict";var t=e.i(43476),r=e.i(1950),n=e.i(71645),i=e.i(8560),a=e.i(90072);e.s(["ACESFilmicToneMapping",()=>a.ACESFilmicToneMapping,"AddEquation",()=>a.AddEquation,"AddOperation",()=>a.AddOperation,"AdditiveAnimationBlendMode",()=>a.AdditiveAnimationBlendMode,"AdditiveBlending",()=>a.AdditiveBlending,"AgXToneMapping",()=>a.AgXToneMapping,"AlphaFormat",()=>a.AlphaFormat,"AlwaysCompare",()=>a.AlwaysCompare,"AlwaysDepth",()=>a.AlwaysDepth,"AlwaysStencilFunc",()=>a.AlwaysStencilFunc,"AmbientLight",()=>a.AmbientLight,"AnimationAction",()=>a.AnimationAction,"AnimationClip",()=>a.AnimationClip,"AnimationLoader",()=>a.AnimationLoader,"AnimationMixer",()=>a.AnimationMixer,"AnimationObjectGroup",()=>a.AnimationObjectGroup,"AnimationUtils",()=>a.AnimationUtils,"ArcCurve",()=>a.ArcCurve,"ArrayCamera",()=>a.ArrayCamera,"ArrowHelper",()=>a.ArrowHelper,"AttachedBindMode",()=>a.AttachedBindMode,"Audio",()=>a.Audio,"AudioAnalyser",()=>a.AudioAnalyser,"AudioContext",()=>a.AudioContext,"AudioListener",()=>a.AudioListener,"AudioLoader",()=>a.AudioLoader,"AxesHelper",()=>a.AxesHelper,"BackSide",()=>a.BackSide,"BasicDepthPacking",()=>a.BasicDepthPacking,"BasicShadowMap",()=>a.BasicShadowMap,"BatchedMesh",()=>a.BatchedMesh,"BezierInterpolant",()=>a.BezierInterpolant,"Bone",()=>a.Bone,"BooleanKeyframeTrack",()=>a.BooleanKeyframeTrack,"Box2",()=>
393a.Box2,"Box3",()=>a.Box3,"Box3Helper",()=>a.Box3Helper,"BoxGeometry",()=>a.BoxGeometry,"BoxHelper",()=>a.BoxHelper,"BufferAttribute",()=>a.BufferAttribute,"BufferGeometry",()=>a.BufferGeometry,"BufferGeometryLoader",()=>a.BufferGeometryLoader,"ByteType",()=>a.ByteType,"Cache",()=>a.Cache,"Camera",()=>a.Camera,"CameraHelper",()=>a.CameraHelper,"CanvasTexture",()=>a.CanvasTexture,"CapsuleGeometry",()=>a.CapsuleGeometry,"CatmullRomCurve3",()=>a.CatmullRomCurve3,"CineonToneMapping",()=>a.CineonToneMapping,"CircleGeometry",()=>a.CircleGeometry,"ClampToEdgeWrapping",()=>a.ClampToEdgeWrapping,"Clock",()=>a.Clock,"Color",()=>a.Color,"ColorKeyframeTrack",()=>a.ColorKeyframeTrack,"ColorManagement",()=>a.ColorManagement,"Compatibility",()=>a.Compatibility,"CompressedArrayTexture",()=>a.CompressedArrayTexture,"CompressedCubeTexture",()=>a.CompressedCubeTexture,"CompressedTexture",()=>a.CompressedTexture,"CompressedTextureLoader",()=>a.CompressedTextureLoader,"ConeGeometry",()=>a.ConeGeometry,"ConstantAlphaFactor",()=>a.ConstantAlphaFactor,"ConstantColorFactor",()=>a.ConstantColorFactor,"Controls",()=>a.Controls,"CubeCamera",()=>a.CubeCamera,"CubeDepthTexture",()=>a.CubeDepthTexture,"CubeReflectionMapping",()=>a.CubeReflectionMapping,"CubeRefractionMapping",()=>a.CubeRefractionMapping,"CubeTexture",()=>a.CubeTexture,"CubeTextureLoader",()=>a.CubeTextureLoader,"CubeUVReflectionMapping",()=>a.CubeUVReflectionMapping,"CubicBezierCurve",()=>a.CubicBezierCurve,"CubicBezierCurve3",()=>a.CubicBezierCurve3,"CubicInterpolant",()=>a.CubicInterpolant,"CullFaceBack",()=>a.CullFaceBack,"CullFaceFront",()=>a.CullFaceFront,"CullFaceFrontBack",()=>a.CullFaceFrontBack,"CullFaceNone",()=>a.CullFaceNone,"Curve",()=>a.Curve,"CurvePath",()=>a.CurvePath,"CustomBlending",()=>a.CustomBlending,"CustomToneMapping",()=>a.CustomToneMapping,"CylinderGeometry",()=>a.CylinderGeometry,"Cylindrical",()=>a.Cylindrical,"Data3DTexture",()=>a.Data3DTexture,"DataArrayTexture",()=>a.DataArrayTexture,"DataTexture",()=>a.DataTexture,"DataTextureLoader",()=>a.DataTextureLoader,"DataUtils",()=>a.DataUtils,"DecrementStencilOp",()=>a.DecrementStencilOp,"DecrementWrapStencilOp",()=>a.DecrementWrapStencilOp,"DefaultLoadingManager",()=>a.DefaultLoadingManager,"DepthFormat",()=>a.DepthFormat,"DepthStencilFormat",()=>a.DepthStencilFormat,"DepthTexture",()=>a.DepthTexture,"DetachedBindMode",()=>a.DetachedBindMode,"DirectionalLight",()=>a.DirectionalLight,"DirectionalLightHelper",()=>a.DirectionalLightHelper,"DiscreteInterpolant",()=>a.DiscreteInterpolant,"DodecahedronGeometry",()=>a.DodecahedronGeometry,"DoubleSide",()=>a.DoubleSide,"DstAlphaFactor",()=>a.DstAlphaFactor,"DstColorFactor",()=>a.DstColorFactor,"DynamicCopyUsage",()=>a.DynamicCopyUsage,"DynamicDrawUsage",()=>a.DynamicDrawUsage,"DynamicReadUsage",()=>a.DynamicReadUsage,"EdgesGeometry",()=>a.EdgesGeometry,"EllipseCurve",()=>a.EllipseCurve,"EqualCompare",()=>a.EqualCompare,"EqualDepth",()=>a.EqualDepth,"EqualStencilFunc",()=>a.EqualStencilFunc,"EquirectangularReflectionMapping",()=>a.EquirectangularReflectionMapping,"EquirectangularRefractionMapping",()=>a.EquirectangularRefractionMapping,"Euler",()=>a.Euler,"EventDispatcher",()=>a.EventDispatcher,"ExternalTexture",()=>a.ExternalTexture,"ExtrudeGeometry",()=>a.ExtrudeGeometry,"FileLoader",()=>a.FileLoader,"Float16BufferAttribute",()=>
393a.Float16BufferAttribute,"Float32BufferAttribute",()=>a.Float32BufferAttribute,"FloatType",()=>a.FloatType,"Fog",()=>a.Fog,"FogExp2",()=>a.FogExp2,"FramebufferTexture",()=>a.FramebufferTexture,"FrontSide",()=>a.FrontSide,"Frustum",()=>a.Frustum,"FrustumArray",()=>a.FrustumArray,"GLBufferAttribute",()=>a.GLBufferAttribute,"GLSL1",()=>a.GLSL1,"GLSL3",()=>a.GLSL3,"GreaterCompare",()=>a.GreaterCompare,"GreaterDepth",()=>a.GreaterDepth,"GreaterEqualCompare",()=>a.GreaterEqualCompare,"GreaterEqualDepth",()=>a.GreaterEqualDepth,"GreaterEqualStencilFunc",()=>a.GreaterEqualStencilFunc,"GreaterStencilFunc",()=>a.GreaterStencilFunc,"GridHelper",()=>a.GridHelper,"Group",()=>a.Group,"HTMLTexture",()=>a.HTMLTexture,"HalfFloatType",()=>a.HalfFloatType,"HemisphereLight",()=>a.HemisphereLight,"HemisphereLightHelper",()=>a.HemisphereLightHelper,"IcosahedronGeometry",()=>a.IcosahedronGeometry,"ImageBitmapLoader",()=>a.ImageBitmapLoader,"ImageLoader",()=>a.ImageLoader,"ImageUtils",()=>a.ImageUtils,"IncrementStencilOp",()=>a.IncrementStencilOp,"IncrementWrapStencilOp",()=>a.IncrementWrapStencilOp,"InstancedBufferAttribute",()=>
393a.InstancedBufferAttribute,"InstancedBufferGeometry",()=>a.InstancedBufferGeometry,"InstancedInterleavedBuffer",()=>a.InstancedInterleavedBuffer,"InstancedMesh",()=>a.InstancedMesh,"Int16BufferAttribute",()=>a.Int16BufferAttribute,"Int32BufferAttribute",()=>a.Int32BufferAttribute,"Int8BufferAttribute",()=>a.Int8BufferAttribute,"IntType",()=>a.IntType,"InterleavedBuffer",()=>a.InterleavedBuffer,"InterleavedBufferAttribute",()=>a.InterleavedBufferAttribute,"Interpolant",()=>a.Interpolant,"InterpolateBezier",()=>a.InterpolateBezier,"InterpolateDiscrete",()=>a.InterpolateDiscrete,"InterpolateLinear",()=>a.InterpolateLinear,"InterpolateSmooth",()=>a.InterpolateSmooth,"InterpolationSamplingMode",()=>a.InterpolationSamplingMode,"InterpolationSamplingType",()=>a.InterpolationSamplingType,"InvertStencilOp",()=>a.InvertStencilOp,"KeepStencilOp",()=>a.KeepStencilOp,"KeyframeTrack",()=>a.KeyframeTrack,"LOD",()=>a.LOD,"LatheGeometry",()=>a.LatheGeometry,"Layers",()=>a.Layers,"LessCompare",()=>a.LessCompare,"LessDepth",()=>a.LessDepth,"LessEqualCompare",()=>a.LessEqualCompare,"LessEqualDepth",()=>a.LessEqualDepth,"LessEqualStencilFunc",()=>a.LessEqualStencilFunc,"LessStencilFunc",()=>a.LessStencilFunc,"Light",()=>
393a.Light,"LightProbe",()=>a.LightProbe,"Line",()=>a.Line,"Line3",()=>a.Line3,"LineBasicMaterial",()=>a.LineBasicMaterial,"LineCurve",()=>a.LineCurve,"LineCurve3",()=>a.LineCurve3,"LineDashedMaterial",()=>a.LineDashedMaterial,"LineLoop",()=>a.LineLoop,"LineSegments",()=>a.LineSegments,"LinearFilter",()=>a.LinearFilter,"LinearInterpolant",()=>a.LinearInterpolant,"LinearMipMapLinearFilter",()=>a.LinearMipMapLinearFilter,"LinearMipMapNearestFilter",()=>a.LinearMipMapNearestFilter,"LinearMipmapLinearFilter",()=>a.LinearMipmapLinearFilter,"LinearMipmapNearestFilter",()=>a.LinearMipmapNearestFilter,"LinearSRGBColorSpace",()=>a.LinearSRGBColorSpace,"LinearToneMapping",()=>a.LinearToneMapping,"LinearTransfer",()=>a.LinearTransfer,"Loader",()=>a.Loader,"LoaderUtils",()=>a.LoaderUtils,"LoadingManager",()=>a.LoadingManager,"LoopOnce",()=>a.LoopOnce,"LoopPingPong",()=>a.LoopPingPong,"LoopRepeat",()=>a.LoopRepeat,"MOUSE",()=>a.MOUSE,"Material",()=>a.Material,"MaterialBlending",()=>a.MaterialBlending,"MaterialLoader",()=>a.MaterialLoader,"MathUtils",()=>a.MathUtils,"Matrix2",()=>a.Matrix2,"Matrix3",()=>a.Matrix3,"Matrix4",()=>a.Matrix4,"MaxEquation",()=>a.MaxEquation,"Mesh",()=>a.Mesh,"MeshBasicMaterial",()=>a.MeshBasicMaterial,"MeshDepthMaterial",()=>a.MeshDepthMaterial,"MeshDistanceMaterial",()=>a.MeshDistanceMaterial,"MeshLambertMaterial",()=>a.MeshLambertMaterial,"MeshMatcapMaterial",()=>a.MeshMatcapMaterial,"MeshNormalMaterial",()=>a.MeshNormalMaterial,"MeshPhongMaterial",()=>a.MeshPhongMaterial,"MeshPhysicalMaterial",()=>a.MeshPhysicalMaterial,"MeshStandardMaterial",()=>a.MeshStandardMaterial,"MeshToonMaterial",()=>a.MeshToonMaterial,"MinEquation",()=>a.MinEquation,"MirroredRepeatWrapping",()=>a.MirroredRepeatWrapping,"MixOperation",()=>a.MixOperation,"MultiplyBlending",()=>a.MultiplyBlending,"MultiplyOperation",()=>a.MultiplyOperation,"NearestFilter",()=>a.NearestFilter,"NearestMipMapLinearFilter",()=>a.NearestMipMapLinearFilter,"NearestMipMapNearestFilter",()=>a.NearestMipMapNearestFilter,"NearestMipmapLinearFilter",()=>a.NearestMipmapLinearFilter,"NearestMipmapNearestFilter",()=>a.NearestMipmapNearestFilter,"NeutralToneMapping",()=>a.NeutralToneMapping,"NeverCompare",()=>a.NeverCompare,"NeverDepth",()=>a.NeverDepth,"NeverStencilFunc",()=>a.NeverStencilFunc,"NoBlending",()=>a.NoBlending,"NoColorSpace",()=>a.NoColorSpace,"NoNormalPacking",()=>a.NoNormalPacking,"NoToneMapping",()=>a.NoToneMapping,"NormalAnimationBlendMode",()=>a.NormalAnimationBlendMode,"NormalBlending",()=>a.NormalBlending,"NormalGAPacking",()=>a.NormalGAPacking,"NormalRGPacking",()=>a.NormalRGPacking,"NotEqualCompare",()=>a.NotEqualCompare,"NotEqualDepth",()=>a.NotEqualDepth,"NotEqualStencilFunc",()=>a.NotEqualStencilFunc,"NumberKeyframeTrack",()=>a.NumberKeyframeTrack,"Object3D",()=>a.Object3D,"ObjectLoader",()=>a.ObjectLoader,"ObjectSpaceNormalMap",()=>a.ObjectSpaceNormalMap,"OctahedronGeometry",()=>a.OctahedronGeometry,"OneFactor",()=>a.OneFactor,"OneMinusConstantAlphaFactor",()=>a.OneMinusConstantAlphaFactor,"OneMinusConstantColorFactor",()=>a.OneMinusConstantColorFactor,"OneMinusDstAlphaFactor",()=>a.OneMinusDstAlphaFactor,"OneMinusDstColorFactor",()=>a.OneMinusDstColorFactor,"OneMinusSrcAlphaFactor",()=>a.OneMinusSrcAlphaFactor,"OneMinusSrcColorFactor",()=>a.OneMinusSrcColorFactor,"OrthographicCamera",()=>a.OrthographicCamera,"PCFShadowMap",()=>a.PCFShadowMap,"PCFSoftShadowMap",()=>a.PCFSoftShadowMap,"PMREMGenerator",()=>i.PMREMGenerator,"Path",()=>a.Path,"PerspectiveCamera",()=>a.PerspectiveCamera,"Plane",()=>a.Plane,"PlaneGeometry",()=>a.PlaneGeometry,"PlaneHelper",()=>a.PlaneHelper,"PointLight",()=>a.PointLight,"PointLightHelper",()=>a.PointLightHelper,"Points",()=>a.Points,"PointsMaterial",()=>a.PointsMaterial,"PolarGridHelper",()=>a.PolarGridHelper,"PolyhedronGeometry",()=>a.PolyhedronGeometry,"PositionalAudio",()=>a.PositionalAudio,"PropertyBinding",()=>a.PropertyBinding,"PropertyMixer",()=>a.PropertyMixer,"QuadraticBezierCurve",()=>a.QuadraticBezierCurve,"QuadraticBezierCurve3",()=>a.QuadraticBezierCurve3,"Quaternion",()=>a.Quaternion,"QuaternionKeyframeTrack",()=>a.QuaternionKeyframeTrack,"QuaternionLinearInterpolant",()=>a.QuaternionLinearInterpolant,"R11_EAC_Format",()=>a.R11_EAC_Format,"RED_GREEN_RGTC2_Format",()=>
393a.RED_GREEN_RGTC2_Format,"RED_RGTC1_Format",()=>a.RED_RGTC1_Format,"REVISION",()=>a.REVISION,"RG11_EAC_Format",()=>a.RG11_EAC_Format,"RGBADepthPacking",()=>a.RGBADepthPacking,"RGBAFormat",()=>a.RGBAFormat,"RGBAIntegerFormat",()=>a.RGBAIntegerFormat,"RGBA_ASTC_10x10_Format",()=>a.RGBA_ASTC_10x10_Format,"RGBA_ASTC_10x5_Format",()=>a.RGBA_ASTC_10x5_Format,"RGBA_ASTC_10x6_Format",()=>a.RGBA_ASTC_10x6_Format,"RGBA_ASTC_10x8_Format",()=>a.RGBA_ASTC_10x8_Format,"RGBA_ASTC_12x10_Format",()=>a.RGBA_ASTC_12x10_Format,"RGBA_ASTC_12x12_Format",()=>a.RGBA_ASTC_12x12_Format,"RGBA_ASTC_4x4_Format",()=>a.RGBA_ASTC_4x4_Format,"RGBA_ASTC_5x4_Format",()=>a.RGBA_ASTC_5x4_Format,"RGBA_ASTC_5x5_Format",()=>a.RGBA_ASTC_5x5_Format,"RGBA_ASTC_6x5_Format",()=>a.RGBA_ASTC_6x5_Format,"RGBA_ASTC_6x6_Format",()=>a.RGBA_ASTC_6x6_Format,"RGBA_ASTC_8x5_Format",()=>a.RGBA_ASTC_8x5_Format,"RGBA_ASTC_8x6_Format",()=>a.RGBA_ASTC_8x6_Format,"RGBA_ASTC_8x8_Format",()=>a.RGBA_ASTC_8x8_Format,"RGBA_BPTC_Format",()=>a.RGBA_BPTC_Format,"RGBA_ETC2_EAC_Format",()=>a.RGBA_ETC2_EAC_Format,"RGBA_PVRTC_2BPPV1_Format",()=>a.RGBA_PVRTC_2BPPV1_Format,"RGBA_PVRTC_4BPPV1_Format",()=>a.RGBA_PVRTC_4BPPV1_Format,"RGBA_S3TC_DXT1_Format",()=>a.RGBA_S3TC_DXT1_Format,"RGBA_S3TC_DXT3_Format",()=>a.RGBA_S3TC_DXT3_Format,"RGBA_S3TC_DXT5_Format",()=>a.RGBA_S3TC_DXT5_Format,"RGBDepthPacking",()=>a.RGBDepthPacking,"RGBFormat",()=>a.RGBFormat,"RGBIntegerFormat",()=>a.RGBIntegerFormat,"RGB_BPTC_SIGNED_Format",()=>a.RGB_BPTC_SIGNED_Format,"RGB_BPTC_UNSIGNED_Format",()=>a.RGB_BPTC_UNSIGNED_Format,"RGB_ETC1_Format",()=>a.RGB_ETC1_Format,"RGB_ETC2_Format",()=>a.RGB_ETC2_Format,"RGB_PVRTC_2BPPV1_Format",()=>a.RGB_PVRTC_2BPPV1_Format,"RGB_PVRTC_4BPPV1_Format",()=>a.RGB_PVRTC_4BPPV1_Format,"RGB_S3TC_DXT1_Format",()=>a.RGB_S3TC_DXT1_Format,"RGDepthPacking",()=>a.RGDepthPacking,"RGFormat",()=>a.RGFormat,"RGIntegerFormat",()=>a.RGIntegerFormat,"RawShaderMaterial",()=>a.RawShaderMaterial,"Ray",()=>a.Ray,"Raycaster",()=>a.Raycaster,"RectAreaLight",()=>a.RectAreaLight,"RedFormat",()=>a.RedFormat,"RedIntegerFormat",()=>a.RedIntegerFormat,"ReinhardToneMapping",()=>a.ReinhardToneMapping,"RenderTarget",()=>a.RenderTarget,"RenderTarget3D",()=>a.RenderTarget3D,"RepeatWrapping",()=>a.RepeatWrapping,"ReplaceStencilOp",()=>a.ReplaceStencilOp,"ReverseSubtractEquation",()=>a.ReverseSubtractEquation,"RingGeometry",()=>a.RingGeometry,"SIGNED_R11_EAC_Format",()=>a.SIGNED_R11_EAC_Format,"SIGNED_RED_GREEN_RGTC2_Format",()=>a.SIGNED_RED_GREEN_RGTC2_Format,"SIGNED_RED_RGTC1_Format",()=>a.SIGNED_RED_RGTC1_Format,"SIGNED_RG11_EAC_Format",()=>a.SIGNED_RG11_EAC_Format,"SRGBColorSpace",()=>a.SRGBColorSpace,"SRGBTransfer",()=>a.SRGBTransfer,"Scene",()=>a.Scene,"ShaderChunk",()=>i.ShaderChunk,"ShaderLib",()=>i.ShaderLib,"ShaderMaterial",()=>a.ShaderMaterial,"ShadowMaterial",()=>a.ShadowMaterial,"Shape",()=>a.Shape,"ShapeGeometry",()=>a.ShapeGeometry,"ShapePath",()=>a.ShapePath,"ShapeUtils",()=>a.ShapeUtils,"ShortType",()=>a.ShortType,"Skeleton",()=>a.Skeleton,"SkeletonHelper",()=>a.SkeletonHelper,"SkinnedMesh",()=>a.SkinnedMesh,"Source",()=>a.Source,"Sphere",()=>a.Sphere,"SphereGeometry",()=>a.SphereGeometry,"Spherical",()=>a.Spherical,"SphericalHarmonics3",()=>a.SphericalHarmonics3,"SplineCurve",()=>a.SplineCurve,"SpotLight",()=>a.SpotLight,"SpotLightHelper",()=>a.SpotLightHelper,"Sprite",()=>a.Sprite,"SpriteMaterial",()=>a.SpriteMaterial,"SrcAlphaFactor",()=>a.SrcAlphaFactor,"SrcAlphaSaturateFactor",()=>a.SrcAlphaSaturateFactor,"SrcColorFactor",()=>a.SrcColorFactor,"StaticCopyUsage",()=>a.StaticCopyUsage,"StaticDrawUsage",()=>a.StaticDrawUsage,"StaticReadUsage",()=>a.StaticReadUsage,"StereoCamera",()=>a.StereoCamera,"StreamCopyUsage",()=>a.StreamCopyUsage,"StreamDrawUsage",()=>a.StreamDrawUsage,"StreamReadUsage",()=>a.StreamReadUsage,"StringKeyframeTrack",()=>a.StringKeyframeTrack,"SubtractEquation",()=>a.SubtractEquation,"SubtractiveBlending",()=>a.SubtractiveBlending,"TOUCH",()=>a.TOUCH,"TangentSpaceNormalMap",()=>a.TangentSpaceNormalMap,"TetrahedronGeometry",()=>a.TetrahedronGeometry,"Texture",()=>a.Texture,"TextureLoader",()=>a.TextureLoader,"TextureUtils",()=>a.TextureUtils,"Timer",()=>a.Timer,"TimestampQuery",()=>a.TimestampQuery,"TorusGeometry",()=>a.TorusGeometry,"TorusKnotGeometry",()=>
393a.TorusKnotGeometry,"Triangle",()=>a.Triangle,"TriangleFanDrawMode",()=>a.TriangleFanDrawMode,"TriangleStripDrawMode",()=>a.TriangleStripDrawMode,"TrianglesDrawMode",()=>a.TrianglesDrawMode,"TubeGeometry",()=>a.TubeGeometry,"UVMapping",()=>a.UVMapping,"Uint16BufferAttribute",()=>a.Uint16BufferAttribute,"Uint32BufferAttribute",()=>a.Uint32BufferAttribute,"Uint8BufferAttribute",()=>a.Uint8BufferAttribute,"Uint8ClampedBufferAttribute",()=>a.Uint8ClampedBufferAttribute,"Uniform",()=>a.Uniform,"UniformsGroup",()=>a.UniformsGroup,"UniformsLib",()=>i.UniformsLib,"UniformsUtils",()=>a.UniformsUtils,"UnsignedByteType",()=>a.UnsignedByteType,"UnsignedInt101111Type",()=>a.UnsignedInt101111Type,"UnsignedInt248Type",()=>a.UnsignedInt248Type,"UnsignedInt5999Type",()=>a.UnsignedInt5999Type,"UnsignedIntType",()=>a.UnsignedIntType,"UnsignedShort4444Type",()=>a.UnsignedShort4444Type,"UnsignedShort5551Type",()=>a.UnsignedShort5551Type,"UnsignedShortType",()=>a.UnsignedShortType,"VSMShadowMap",()=>a.VSMShadowMap,"Vector2",()=>a.Vector2,"Vector3",()=>a.Vector3,"Vector4",()=>a.Vector4,"VectorKeyframeTrack",()=>a.VectorKeyframeTrack,"VideoFrameTexture",()=>a.VideoFrameTexture,"VideoTexture",()=>a.VideoTexture,"WebGL3DRenderTarget",()=>a.WebGL3DRenderTarget,"WebGLArrayRenderTarget",()=>a.WebGLArrayRenderTarget,"WebGLCoordinateSystem",()=>a.WebGLCoordinateSystem,"WebGLCubeRenderTarget",()=>i.WebGLCubeRenderTarget,"WebGLRenderTarget",()=>a.WebGLRenderTarget,"WebGLRenderer",()=>i.WebGLRenderer,"WebGLUtils",()=>i.WebGLUtils,"WebGPUCoordinateSystem",()=>a.WebGPUCoordinateSystem,"WebXRController",()=>a.WebXRController,"WireframeGeometry",()=>a.WireframeGeometry,"WrapAroundEnding",()=>a.WrapAroundEnding,"ZeroCurvatureEnding",()=>a.ZeroCurvatureEnding,"ZeroFactor",()=>a.ZeroFactor,"ZeroSlopeEnding",()=>a.ZeroSlopeEnding,"ZeroStencilOp",()=>a.ZeroStencilOp,"createCanvasElement",()=>a.createCanvasElement,"error",()=>a.error,"getConsoleFunction",()=>a.getConsoleFunction,"log",()=>a.log,"setConsoleFunction",()=>a.setConsoleFunction,"warn",()=>a.warn,"warnOnce",()=>a.warnOnce],32009);var s=e.i(32009);function o(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}let l=["x","y","top","bottom","left","right","width","height"];var u=e.i(46791);function c({ref:e,children:i,fallback:a,resize:u,style:d,gl:h,events:f=r.f,eventSource:p,eventPrefix:m,shadows:g,linear:v,flat:y,legacy:x,orthographic:b,frameloop:_,dpr:S,performance:w,raycaster:M,camera:T,scene:E,onPointerMissed:A,onCreated:C,...P}){n.useMemo(()=>(0,r.e)(s),[]);let I=(0,r.u)(),[O,R]=function({debounce:e,scroll:t,polyfill:r,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){var a,s,u;let c=r||("u"<typeof window?class{}:window.ResizeObserver);if(!c)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[d,h]=(0,n.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),f=(0,n.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:d,orientationHandler:null}),p=e?"number"==typeof e?e:e.scroll:null,m=e?"number"==typeof e?e:e.resize:null,g=(0,n.useRef)(!1);(0,n.useEffect)(()=>(g.current=!0,()=>void(g.current=!1)));let[v,y,x]=(0,n.useMemo)(()=>{let e=()=>{let e,t;if(!f.current.element)return;let{left:r,top:n,width:a,height:s,bottom:o,right:u,x:c,y:d}=f.current.element.getBoundingClientRect(),p={left:r,top:n,width:a,height:s,bottom:o,right:u,x:c,y:d};f.current.element instanceof HTMLElement&&i&&(p.height=f.current.element.offsetHeight,p.width=f.current.element.offsetWidth),Object.freeze(p),g.current&&(e=f.current.lastBounds,t=p,!l.every(r=>e[r]===t[r]))&&h(f.current.lastBounds=p)};return[e,m?o(e,m):e,p?o(e,p):e]},[h,i,p,m]);function b(){f.current.scrollContainers&&(f.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",x,!0)),f.current.scrollContainers=null),f.current.resizeObserver&&(f.current.resizeObserver.disconnect(),f.current.resizeObserver=null),f.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",f.current.orientationHandler))}function _(){f.current.element&&(f.current.resizeObserver=new c(x),f.current.resizeObserver.observe(f.current.element),t&&f.current.scrollC
393ontainers&&f.current.scrollContainers.forEach(e=>e.addEventListener("scroll",x,{capture:!0,passive:!0})),f.current.orientationHandler=()=>{x()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",f.current.orientationHandler))}return a=x,s=!!t,(0,n.useEffect)(()=>{if(s)return window.addEventListener("scroll",a,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",a,!0)},[a,s]),u=y,(0,n.useEffect)(()=>(window.addEventListener("resize",u),()=>void window.removeEventListener("resize",u)),[u]),(0,n.useEffect)(()=>{b(),_()},[t,x,y]),(0,n.useEffect)(()=>b,[]),[e=>{e&&e!==f.current.element&&(b(),f.current.element=e,f.current.scrollContainers=function e(t){let r=[];if(!t||t===document.body)return r;let{overflow:n,overflowX:i,overflowY:a}=window.getComputedStyle(t);return[n,i,a].some(e=>"auto"===e||"scroll"===e)&&r.push(t),[...r,...e(t.parentElement)]}(e),_())},d,v]}({scroll:!0,debounce:{scroll:50,resize:0},...u}),L=n.useRef(null),N=n.useRef(null);n.useImperativeHandle(e,()=>L.current);let D=(0,r.a)(A),[k,U]=n.useState(!1),[F,z]=n.useState(!1);if(k)throw k;if(F)throw F;let j=n.useRef(null);(0,r.b)(()=>{let e=L.current;R.width>0&&R.height>0&&e&&(j.current||(j.current=(0,r.c)(e)),async function(){await j.current.configure({gl:h,scene:E,events:f,shadows:g,linear:v,flat:y,legacy:x,orthographic:b,frameloop:_,dpr:S,performance:w,raycaster:M,camera:T,size:R,onPointerMissed:(...e)=>null==D.current?void 0:D.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(p?(0,r.i)(p)?p.current:p:N.current),m&&e.setEvents({compute:(e,t)=>{let r=e[m+"X"],n=e[m+"Y"];t.pointer.set(r/t.size.width*2-1,-(2*(n/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==C||C(e)}}),j.current.render((0,t.jsx)(I,{children:(0,t.jsx)(r.E,{set:z,children:(0,t.jsx)(n.Suspense,{fallback:(0,t.jsx)(r.B,{set:U}),children:null!=i?i:null})})}))}())}),n.useEffect(()=>{let e=L.current;if(e)return()=>(0,r.d)(e)},[]);let B=p?"none":"auto";return(0,t.jsx)("div",{ref:N,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...d},...P,children:(0,t.jsx)("div",{ref:O,style:{width:"100%",height:"100%"},children:(0,t.jsx)("canvas",{ref:L,style:{display:"block"},children:a})})})}function d(e){return(0,t.jsx)(u.FiberProvider,{children:(0,t.jsx)(c,{...e})})}function h(){return(h=Object.assign.bind()).apply(null,arguments)}e.i(89499);var f=e.i(28600),p=e.i(25234),m=Object.defineProperty;class g{constructor(){((e,t)=>{let r,n;n=void 0,(r="symbol"!=typeof t?t+"":t)in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n})(this,"_listeners")}addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let r=this._listeners[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let r=t.slice(0);for(let t=0,n=r.length;t<n;t++)r[t].call(this,e);e.target=null}}}var v=Object.defineProperty,y=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?v(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};let x=new a.Ray,b=new a.Plane,_=Math.cos(Math.PI/180*70),S=(e,t)=>(e%t+t)%t;class w extends g{constructor(e,t){super(),y(this,"object"),y(this,"domElement"),y(this,"enabled",!0),y(this,"target",new a.Vector3),y(this,"minDistance",0),y(this,"maxDistance",1/0),y(this,"minZoom",0),y(this,"maxZoom",1/0),y(this,"minPolarAngle",0),y(this,"maxPolarAngle",Math.PI),y(this,"minAzimuthAngle",-1/0),y(this,"maxAzimuthAngle",1/0),y(this,"enableDamping",!1),y(this,"dampingFactor",.05),y(this,"enableZoom",!0),y(this,"zoomSpeed",1),y(this,"enableRotate",!0),y(this,"rotateSpeed",1),y(this,"enablePan",!0),y(this,"panSpeed",1),y(this,"screenSpacePanning",!0),y(this,"keyPanSpeed",7),y(this,"zoomToCursor",!1),y(this,"autoRotate",!1),y(this,"autoRotateSpeed",2),y(this,"reverseOrbit",!1),y(this,"reverseHorizontalOrbit",!1),y(this,"reverseVerticalOrbit",!1),y(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),y(this,"mouseButtons",{LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN}),y(this,"touches",{ONE:a.TOUCH.ROTATE,TWO:a.TOUCH.DOLLY_PAN}),y(this,"target0"),y(this,"position0"),y(this,"zoom0"),y(this,"_domElementKeyEvents",null),y(this,"getPolarAngle"),y(this,"getAzimuthalAngle"),y(this,"setPolarAngle"),y(this,"setAzimuthalAngle"),y(this,"getDistance"),y(this,"getZoomScale"),y(this,"listenToKeyEvents"),y(this,"stopListenToKeyEvents"),y(this,"saveState"),y(this,"reset"),y(this,"update"),y(this,"connect"),y(this,"dispose"),y(this,"dollyIn"),y(this,"dollyOut"),y(this,"getScale"),y(this,"setScale"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=e=>{let t=S(e,2*Math.PI),n=c.phi;n<0&&(n+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-n);2*Math.PI-i<i&&(t<n?t+=2*Math.PI:n+=2*Math.PI),d.phi=t-n,r.update(
393)},this.setAzimuthalAngle=e=>{let t=S(e,2*Math.PI),n=c.theta;n<0&&(n+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-n);2*Math.PI-i<i&&(t<n?t+=2*Math.PI:n+=2*Math.PI),d.theta=t-n,r.update()},this.getDistance=()=>r.object.position.distanceTo(r.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",ee),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ee),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(n),r.update(),l=o.NONE},this.update=(()=>{let t=new a.Vector3,i=new a.Vector3(0,1,0),s=new a.Quaternion().setFromUnitVectors(e.up,i),p=s.clone().invert(),m=new a.Vector3,g=new a.Quaternion,v=2*Math.PI;return function(){let y=r.object.position;s.setFromUnitVectors(e.up,i),p.copy(s).invert(),t.copy(y).sub(r.target),t.applyQuaternion(s),c.setFromVector3(t),r.autoRotate&&l===o.NONE&&N(2*Math.PI/60/60*r.autoRotateSpeed),r.enableDamping?(c.theta+=d.theta*r.dampingFactor,c.phi+=d.phi*r.dampingFactor):(c.theta+=d.theta,c.phi+=d.phi);let S=r.minAzimuthAngle,w=r.maxAzimuthAngle;isFinite(S)&&isFinite(w)&&(S<-Math.PI?S+=v:S>Math.PI&&(S-=v),w<-Math.PI?w+=v:w>Math.PI&&(w-=v),S<=w?c.theta=Math.max(S,Math.min(w,c.theta)):c.theta=c.theta>(S+w)/2?Math.max(S,c.theta):Math.min(w,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),!0===r.enableDamping?r.target.addScaledVector(f,r.dampingFactor):r.target.add(f),r.zoomToCursor&&I||r.object.isOrthographicCamera?c.radius=B(c.radius):c.radius=B(c.radius*h),t.setFromSpherical(c),t.applyQuaternion(p),y.copy(r.target).add(t),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),!0===r.enableDamping?(d.theta*=1-r.dampingFactor,d.phi*=1-r.dampingFactor,f.multiplyScalar(1-r.dampingFactor)):(d.set(0,0,0),f.set(0,0,0));let M=!1;if(r.zoomToCursor&&I){let n=null;if(r.object instanceof a.PerspectiveCamera&&r.object.isPerspectiveCamera){let e=t.length();n=B(e*h);let i=e-n;r.object.position.addScaledVector(C,i),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){let e=new a.Vector3(P.x,P.y,0);e.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/h)),r.object.updateProjectionMatrix(),M=!0;let i=new a.Vector3(P.x,P.y,0);i.unproject(r.object),r.object.position.sub(i).add(e),r.object.updateMatrixWorld(),n=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;null!==n&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(n).add(r.object.position):(x.origin.copy(r.object.position),x.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(x.direction))<_?e.lookAt(r.target):(b.setFromNormalAndCoplanarPoint(r.object.up,r.target),x.intersectPlane(b,r.target))))}else r.object instanceof a.OrthographicCamera&&r.object.isOrthographicCamera&&(M=1!==h)&&(r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/h)),r.object.updateProjectionMatrix());return h=1,I=!1,!!(M||m.distanceToSquared(r.object.position)>u||8*(1-g.dot(r.object.quaternion))>u)&&(r.dispatchEvent(n),m.copy(r.object.position),g.copy(r.object.quaternion),M=!1,!0)}})(),this.connect=e=>{r.domElement=e,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",et),r.domElement.addEventListener("pointerdown",K),r.domElement.addEventListener("pointercancel",J),r.domElement.addEventListener("wheel",Q)},this.dispose=()=>{var e,t,n,i,a,s;r.domElement&&(r.domElement.style.touchAction="auto"),null==(e=r.domElement)||e.removeEventListener("contextmenu",et),null==(t=r.domElement)||t.removeEventListener("pointerdown",K),null==(n=r.domElement)||n.removeEventListener("pointercancel",J),null==(i=r.domElement)||i.removeEventListener("wheel",Q),null==(a=r.domElement)||a.ownerDocument.removeEventListener("pointermove",Z),null==(s=r.domElement)||s.ownerDocument.removeEventListener("pointerup",J),null!==r._domElementKeyEvents&&r._domElementKeyEvents.removeEventListener("keydown",ee)};const r=this,n={type:"change"},i={type:"start"},s={type:"end"},o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=o.NONE;const u=1e-6,c=new a.Spherical,d=new a.Spherical;let h=1;
393const f=new a.Vector3,p=new a.Vector2,m=new a.Vector2,g=new a.Vector2,v=new a.Vector2,w=new a.Vector2,M=new a.Vector2,T=new a.Vector2,E=new a.Vector2,A=new a.Vector2,C=new a.Vector3,P=new a.Vector2;let I=!1;const O=[],R={};function L(){return Math.pow(.95,r.zoomSpeed)}function N(e){r.reverseOrbit||r.reverseHorizontalOrbit?d.theta+=e:d.theta-=e}function D(e){r.reverseOrbit||r.reverseVerticalOrbit?d.phi+=e:d.phi-=e}const k=(()=>{let e=new a.Vector3;return function(t,r){e.setFromMatrixColumn(r,0),e.multiplyScalar(-t),f.add(e)}})(),U=(()=>{let e=new a.Vector3;return function(t,n){!0===r.screenSpacePanning?e.setFromMatrixColumn(n,1):(e.setFromMatrixColumn(n,0),e.crossVectors(r.object.up,e)),e.multiplyScalar(t),f.add(e)}})(),F=(()=>{let e=new a.Vector3;return function(t,n){let i=r.domElement;if(i&&r.object instanceof a.PerspectiveCamera&&r.object.isPerspectiveCamera){let a=r.object.position;e.copy(a).sub(r.target);let s=e.length();k(2*t*(s*=Math.tan(r.object.fov/2*Math.PI/180))/i.clientHeight,r.object.matrix),U(2*n*s/i.clientHeight,r.object.matrix)}else i&&r.object instanceof a.OrthographicCamera&&r.object.isOrthographicCamera?(k(t*(r.object.right-r.object.left)/r.object.zoom/i.clientWidth,r.object.matrix),U(n*(r.object.top-r.object.bottom)/r.object.zoom/i.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function z(e){r.object instanceof a.PerspectiveCamera&&r.object.isPerspectiveCamera||r.object instanceof a.OrthographicCamera&&r.object.isOrthographicCamera?h=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function j(e){if(!r.zoomToCursor||!r.domElement)return;I=!0;let t=r.domElement.getBoundingClientRect(),n=e.clientX-t.left,i=e.clientY-t.top,a=t.width,s=t.height;P.x=n/a*2-1,P.y=-(i/s*2)+1,C.set(P.x,P.y,1).unproject(r.object).sub(r.object.position).normalize()}function B(e){return Math.max(r.minDistance,Math.min(r.maxDistance,e))}function V(e){p.set(e.clientX,e.clientY)}function G(e){v.set(e.clientX,e.clientY)}function H(){if(1==O.length)p.set(O[0].pageX,O[0].pageY);else{let e=.5*(O[0].pageX+O[1].pageX),t=.5*(O[0].pageY+O[1].pageY);p.set(e,t)}}function W(){if(1==O.length)v.set(O[0].pageX,O[0].pageY);else{let e=.5*(O[0].pageX+O[1].pageX),t=.5*(O[0].pageY+O[1].pageY);
393v.set(e,t)}}function X(){let e=O[0].pageX-O[1].pageX,t=O[0].pageY-O[1].pageY,r=Math.sqrt(e*e+t*t);T.set(0,r)}function q(e){if(1==O.length)m.set(e.pageX,e.pageY);else{let t=en(e),r=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);m.set(r,n)}g.subVectors(m,p).multiplyScalar(r.rotateSpeed);let t=r.domElement;t&&(N(2*Math.PI*g.x/t.clientHeight),D(2*Math.PI*g.y/t.clientHeight)),p.copy(m)}function Y(e){if(1==O.length)w.set(e.pageX,e.pageY);else{let t=en(e),r=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);w.set(r,n)}M.subVectors(w,v).multiplyScalar(r.panSpeed),F(M.x,M.y),v.copy(w)}function $(e){var t;let n=en(e),i=e.pageX-n.x,a=e.pageY-n.y,s=Math.sqrt(i*i+a*a);E.set(0,s),A.set(0,Math.pow(E.y/T.y,r.zoomSpeed)),t=A.y,z(h/t),T.copy(E)}function K(e){var t,n,s;!1!==r.enabled&&(0===O.length&&(null==(t=r.domElement)||t.ownerDocument.addEventListener("pointermove",Z),null==(n=r.domElement)||n.ownerDocument.addEventListener("pointerup",J)),s=e,O.push(s),"touch"===e.pointerType?function(e){switch(er(e),O.length){case 1:switch(r.touches.ONE){case a.TOUCH.ROTATE:if(!1===r.enableRotate)return;H(),l=o.TOUCH_ROTATE;break;case a.TOUCH.PAN:if(!1===r.enablePan)return;W(),l=o.TOUCH_PAN;break;default:l=o.NONE}break;case 2:switch(r.touches.TWO){case a.TOUCH.DOLLY_PAN:if(!1===r.enableZoom&&!1===r.enablePan)return;r.enableZoom&&X(),r.enablePan&&W(),l=o.TOUCH_DOLLY_PAN;break;case a.TOUCH.DOLLY_ROTATE:if(!1===r.enableZoom&&!1===r.enableRotate)return;r.enableZoom&&X(),r.enableRotate&&H(),l=o.TOUCH_DOLLY_ROTATE;break;default:l=o.NONE}break;default:l=o.NONE}l!==o.NONE&&r.dispatchEvent(i)}(e):function(e){let t;switch(e.button){case 0:t=r.mouseButtons.LEFT;break;case 1:t=r.mouseButtons.MIDDLE;break;case 2:t=r.mouseButtons.RIGHT;break;default:t=-1}switch(t){case a.MOUSE.DOLLY:if(!1===r.enableZoom)return;j(e),T.set(e.clientX,e.clientY),l=o.DOLLY;break;case a.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===r.enablePan)return;G(e),l=o.PAN}else{if(!1===r.enableRotate)return;V(e),l=o.ROTATE}break;case a.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===r.enableRotate)return;V(e),l=o.ROTATE}else{if(!1===r.enablePan)return;G(e),l=o.PAN}break;default:l=o.NONE}l!==o.NONE&&r.dispatchEvent(i)}(e))}function Z(e){!1!==r.enabled&&("touch"===e.pointerType?function(e){switch(er(e),l){case o.TOUCH_ROTATE:if(!1===r.enableRotate)return;q(e),r.update();break;case o.TOUCH_PAN:if(!1===r.enablePan)return;Y(e),r.update();break;case o.TOUCH_DOLLY_PAN:if(!1===r.enableZoom&&!1===r.enablePan)return;r.enableZoom&&$(e),r.enablePan&&Y(e),r.update();break;case o.TOUCH_DOLLY_ROTATE:if(!1===r.enableZoom&&!1===r.enableRotate)return;r.enableZoom&&$(e),r.enableRotate&&q(e),r.update();break;default:l=o.NONE}}(e):function(e){if(!1!==r.enabled)switch(l){case o.ROTATE:let t;if(!1===r.enableRotate)return;m.set(e.clientX,e.clientY),g.subVectors(m,p).multiplyScalar(r.rotateSpeed),(t=r.domElement)&&(N(2*Math.PI*g.x/t.clientHeight),D(2*Math.PI*g.y/t.clientHeight)),p.copy(m),r.update();break;case o.DOLLY:var n,i;if(!1===r.enableZoom)return;(E.set(e.clientX,e.clientY),A.subVectors(E,T),A.y>0)?(n=L(),z(h/n)):A.y<0&&(i=L(),z(h*i)),T.copy(E),r.update();break;case o.PAN:if(!1===r.enablePan)return;w.set(e.clientX,e.clientY),M.subVectors(w,v).multiplyScalar(r.panSpeed),F(M.x,M.y),v.copy(w),r.update()}}(e))}function J(e){var t,n,i;(function(e){delete R[e.pointerId];for(let t=0;t<O.length;t++)if(O[t].pointerId==e.pointerId)return void O.splice(t,1)})(e),0===O.length&&(null==(t=r.domElement)||t.releasePointerCapture(e.pointerId),null==(n=r.domElement)||n.ownerDocument.removeEventListener("pointermove",Z),null==(i=r.domElement)||i.ownerDocument.removeEventListener("pointerup",J)),r.dispatchEvent(s),l=o.NONE}function Q(e){if(!1!==r.enabled&&!1!==r.enableZoom&&(l===o.NONE||l===o.ROTATE)){var t,n;e.preventDefault(),r.dispatchEvent(i),(j(e),e.deltaY<0)?(t=L(),z(h*t)):e.deltaY>0&&(n=L(),z(h/n)),r.update(),r.dispatchEvent(s)}}function ee(e){if(!1!==r.enabled&&!1!==r.enablePan){let t=!1;switch(e.code){case r.keys.UP:F(0,r.keyPanSpeed),t=!0;break;case r.keys.BOTTOM:F(0,-r.keyPanSpeed),t=!0;break;case r.keys.LEFT:F(r.keyPanSpeed,0),t=!0;break;case r.keys.RIGHT:F(-r.keyPanSpeed,0),t=!0}
393t&&(e.preventDefault(),r.update())}}function et(e){!1!==r.enabled&&e.preventDefault()}function er(e){let t=R[e.pointerId];void 0===t&&(t=new a.Vector2,R[e.pointerId]=t),t.set(e.pageX,e.pageY)}function en(e){return R[(e.pointerId===O[0].pointerId?O[1]:O[0]).pointerId]}this.dollyIn=(e=L())=>{z(h*e),r.update()},this.dollyOut=(e=L())=>{z(h/e),r.update()},this.getScale=()=>h,this.setScale=e=>{z(e),r.update()},this.getZoomScale=()=>L(),void 0!==t&&this.connect(t),this.update()}}let M=n.forwardRef(({makeDefault:e,camera:t,regress:r,domElement:i,enableDamping:a=!0,keyEvents:s=!1,onChange:o,onStart:l,onEnd:u,...c},d)=>{let m=(0,f.useThree)(e=>e.invalidate),g=(0,f.useThree)(e=>e.camera),v=(0,f.useThree)(e=>e.gl),y=(0,f.useThree)(e=>e.events),x=(0,f.useThree)(e=>e.setEvents),b=(0,f.useThree)(e=>e.set),_=(0,f.useThree)(e=>e.get),S=(0,f.useThree)(e=>e.performance),M=t||g,T=i||y.connected||v.domElement,E=n.useMemo(()=>new w(M),[M]);return(0,p.useFrame)(()=>{E.enabled&&E.update()},-1),n.useEffect(()=>(s&&E.connect(!0===s?T:s),E.connect(T),()=>void E.dispose()),[s,T,r,E,m]),n.useEffect(()=>{let e=e=>{m(),r&&S.regress(),o&&o(e)},t=e=>{l&&l(e)},n=e=>{u&&u(e)};return E.addEventListener("change",e),E.addEventListener("start",t),E.addEventListener("end",n),()=>{E.removeEventListener("start",t),E.removeEventListener("end",n),E.removeEventListener("change",e)}},[o,l,u,E,m,x]),n.useEffect(()=>{if(e){let e=_().controls;return b({controls:E}),()=>b({controls:e})}},[e,E]),n.createElement("primitive",h({ref:d,object:E,enableDamping:a},c))});var T=e.i(27705);e.s(["default",0,({children:e,locale:r})=>(0,t.jsx)("div",{className:T.default.scene,children:(0,t.jsxs)(d,{camera:{position:[5,10,2],zoom:1.5},children:[(0,t.jsx)(M,{maxDistance:100,minDistance:7,enableDamping:!0,enablePan:!1}),e]})})],40587)},44419,e=>{"use strict";var t=e.i(43476),r=e.i(90072),n=e.i(25234),i=e.i(1950),i=i,a=e.i(28600),s=e.i(71645);function o(e,t,r){let n=document.createElement("canvas").getContext("2d");if(null==n)throw Error("Could not create canvas 2d context");let i=`${t}px arial`;n.font=i;let a=n.measureText(r).width;n.canvas.width=e,n.canvas.height=t,n.font=i,n.textBaseline="middle",n.textAlign="center",n.clearRect(0,0,2*e,2*t);let s=Math.min(1,e/a);return n.translate(e/2,t/2),n.scale(s,1),n.fillStyle="white",n.fillText(r,0,0),n.canvas}var l=e.i(16107);let u=` 394 varying vec2 vUv; 395 varying vec3 vNormal; 396 varying vec3 vPosition; 397 398 void main() { 399 vUv = uv; 400 vNormal = normalize(normalMatrix * normal); 401 vPosition = position; 402 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 403 } 404 `,c=` 405 uniform sampler2D auroraTexture; 406 uniform float time; 407 varying vec2 vUv; 408 varying vec3 vNormal; 409 varying vec3 vPosition; 410 411 void main() { 412 // Offset by 0.5 to rotate texture 180 degrees horizontally 413 vec2 uv = vec2(fract(vUv.x + 0.5), vUv.y); 414 415 // Animated high-frequency waves - flowing curtain effect 416 const float PI = 3.14159265359; 417 418 float verticalShift = 0.0; 419 verticalShift += sin(uv.x * 60.0 * PI + time * 1.2) * 0.0015; 420 verticalShift += sin(uv.x * 80.0 * PI - time * 1.0) * 0.0012; 421 verticalShift += sin(uv.x * 100.0 * PI + uv.y * 5.0 + time * 1.4) * 0.0008; 422 verticalShift += sin(uv.x * 120.0 * PI - time * 1.1) * 0.0006; 423 verticalShift += cos(uv.x * 150.0 * PI + uv.y * 3.0 + time * 1.6) * 0.0005; 424 425 vec2 waveUv = uv + vec2(0.0, verticalShift); 426 427 // Light blur for smoothness 428 vec4 color = vec4(0.0); 429 float total = 0.0; 430 for (int i = -1; i <= 1; i++) { 431 for (int j = -1; j <= 1; j++) { 432 vec2 offset = vec2(float(i), float(j)) * 0.002; 433 float weight = 1.0 / (1.0 + float(i*i + j*j)); 434 color += texture2D(auroraTexture, waveUv + offset) * weight; 435 total += weight; 436 } 437 } 438 color /= total; 439 440 // Polar concentration - stronger near poles 441 float latitude = abs(vUv.y - 0.5) * 2.0; 442 color.a *= (0.3 + smoothstep(0.2, 0.7, latitude) * 0.7); 443 444 // Atmospheric edge glow 445 vec3 viewDir = normalize(cameraPosition - vPosition); 446 float fresnel = pow(1.0 - abs(dot(viewDir, vNormal)), 2.5); 447 color.a *= (0.85 + fresnel * 0.15); 448 449 if (color.a < 0.01) discard; 450 gl_FragColor = color; 451 } 452 `,d=document.createElement("canvas");d.width=1024,d.height=512;let h=d.getContext("2d"),f=()=>{let{coordinates:e,fetchData:i}=(0,l.useAuroraHemi)(),a=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=setInterval(()=>{i()},3e4);return i(),()=>clearInterval(e)},[]),(0,s.useEffect)(()=>
452{if(!h||!a.current||!e||0===e.length)return;let t=function(e,t){let n=d.width,i=d.height;t.clearRect(0,0,n,i);let a=Array(181).fill(0).map(()=>Array(360).fill(0));e.forEach(e=>{if(!e)return;let t=Math.floor(e[0]),r=Math.floor(e[1]+90),n=e[2];r>=0&&r<181&&t>=0&&t<360&&(a[r][t]=n)});let s=t.createImageData(n,i),o=s.data;for(let e=0;e<i;e++)for(let t=0;t<n;t++){let r,s,l,u=t/n*360-180+180,c=90-e/i*180+90,d=Math.floor(u)%360,h=(d+1)%360,f=Math.min(Math.floor(c),180),p=Math.min(f+1,180),m=u-Math.floor(u),g=c-Math.floor(c),v=a[f][d]*(1-m)*(1-g)+a[f][h]*m*(1-g)+a[p][d]*(1-m)*g+a[p][h]*m*g;if(v<1)continue;if(v<38){r=0,s=255;let e=v/38;l=e*e*90}else if(v<70){let e=(v-38)/32;r=Math.floor(255*e),s=255,l=90+50*e}else{let e=Math.min((v-70)/25,1);r=255,s=Math.floor((1-e)*255),l=140+50*e}let y=(e*n+t)*4;o[y]=r,o[y+1]=s,o[y+2]=0,o[y+3]=l}t.putImageData(s,0,0);let l=new r.CanvasTexture(d);return l.wrapS=r.ClampToEdgeWrapping,l.wrapT=r.ClampToEdgeWrapping,l.minFilter=r.LinearFilter,l}(e,h);a.current.uniforms.auroraTexture.value=t,a.current.uniforms.auroraTexture.value.needsUpdate=!0},[e]);let o=(0,s.useMemo)(()=>({auroraTexture:{value:null},time:{value:0}}),[]);return(0,n.useFrame)(e=>{a.current&&(a.current.uniforms.time.value=e.clock.getElapsedTime())}),(0,t.jsxs)("mesh",{children:[(0,t.jsx)("sphereGeometry",{args:[5.1,64,64]}),(0,t.jsx)("shaderMaterial",{ref:a,fragmentShader:c,vertexShader:u,uniforms:o,transparent:!0})]})};var p=e.i(91149);let m=` 453 varying vec2 vUv; 454 varying vec3 vNormal; 455 varying mat3 vTbn; 456 varying vec3 vPosition; 457 458 attribute vec4 tangent; // "geometry.computeTangents()" is needed. 459 460 void main() { 461 vUv = uv; 462 vNormal = normalize(mat3(modelMatrix) * normal);//vNormal = normal; 463 // vPosition = (modelMatrix * vec4(position, 1.0)).xyz; 464 vPosition = mat3(modelMatrix) * position; 465 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 466 vec3 t = normalize(tangent.xyz); 467 vec3 n = normalize(normal.xyz); 468 vec3 b = normalize(cross(t, n)); 469 470 471 t = mat3(modelMatrix) * t; 472 b = mat3(modelMatrix) * b; 473 n = mat3(modelMatrix) * n; 474 vTbn = mat3(t, b, n); 475 } 476`,g=` 477 uniform sampler2D dayTexture; 478 uniform sampler2D nightTexture; 479 uniform sampler2D normalTexture; 480 uniform sampler2D specularTexture; 481 uniform vec3 sunDirection; 482 uniform vec3 u_position; 483 // uniform vec3 u_position; 484 485 486 varying vec2 vUv; 487 varying vec3 vNormal; 488 varying mat3 vTbn; 489 varying vec3 vPosition; 490 varying vec3 vNormalWorld; 491 492 493 void main() { 494 float normalPower = 5.0; 495 vec3 sunDir = normalize(sunDirection); 496 vec3 t_normal = texture2D( normalTexture, vUv ).xyz * 2.0 - 1.0; 497 vec3 normal = normalize(vTbn * t_normal); 498 499 float cosAngleSunToNormal = dot(vNormal, sunDir); // Compute cosine sun to normal 500 float mixAmountTexture = 1. / (1. + exp(-15. * cosAngleSunToNormal)); // Updated -20 to -15 for smoother transition 501 502 float cosAngleSunToSurface = dot(normal, sunDir); // Compute cosine sun to normal 503 mixAmountTexture *= 1.0 + normalPower * (cosAngleSunToSurface - cosAngleSunToNormal); 504 // mixAmountTexture *= mixAmountHemisphere; 505 mixAmountTexture = clamp(mixAmountTexture, 0., 1.); 506 507 508 vec3 dayColor = texture2D(dayTexture, vUv).rgb; 509 vec3 nightColor = texture2D(nightTexture, vUv).rgb; 510 511 // Combine night and day colors 512 vec3 color = mix( nightColor, dayColor, mixAmountTexture ); // Select day or night texture 513 514 vec3 surfacePosition = u_position + vPosition; 515 // Specular map texture with reflection 516 float reflectRatio = texture2D(specularTexture, vUv).r; 517 reflectRatio = 0.6 * reflectRatio + 0.1; 518 vec3 reflectVec = reflect(-sunDir, normal); // reflected vector of sunlight 519 float specPower = clamp(dot(reflectVec, normalize(cameraPosition - surfacePosition)), 0., 1.); // dot product between reflected light and camera vector 520 color += mixAmountTexture * pow(specPower, 20.0) * reflectRatio; 521 522 gl_FragColor = vec4(color, 1.); 523 } 524`;e.s(["default",0,({locale:e})=>{let l=(0,s.useRef)(null),u=(0,s.useRef)(null),c=(0,s.useRef)(!1),{currentLocation:d,isLoading:h}=(0,p.useLocationContext)(),{camera:v,controls:y}=(0,a.useThree)(),[x,b,_,S]=(0,i.G)(r.TextureLoader,["https://blobify.eclipse2026.is/eclipse-2026/spaces
524/main/assets/media/mrc7biu80wwxci.jpg","https://blobify.eclipse2026.is/eclipse-2026/spaces/main/assets/media/mrc7bpuav1rydy.jpg","https://blobify.eclipse2026.is/eclipse-2026/spaces/main/assets/media/mrc7wb5f2k6ene.jpg","https://blobify.eclipse2026.is/eclipse-2026/spaces/main/assets/media/mrc7bv3m8nxpqw.jpg"]);x.anisotropy=8,b.anisotropy=8,_.anisotropy=8;let w=(0,s.useMemo)(()=>({dayTexture:{value:x},nightTexture:{value:b},normalTexture:{value:_},specularTexture:{value:S},sunDirection:{value:new r.Vector3(.5,.7,.5)},u_position:{value:new r.Vector3(0,0,0)}}),[]),M=(0,s.useMemo)(()=>{let e=new r.SphereGeometry(5,64,64);return e.computeTangents(),e},[]);(0,n.useFrame)(e=>{if(l.current){let t,n,i;if(l.current.uniforms.sunDirection.value=(n=Math.PI/180*(23.44*Math.cos(360/365*((Date.UTC((t=new Date).getFullYear(),t.getMonth(),t.getDate())-Date.UTC(t.getFullYear(),0,0))/864e5+10)*(Math.PI/180))),i=(t.getUTCHours()+t.getUTCMinutes()/60+t.getUTCSeconds()/3600)/24*2*Math.PI,new r.Vector3(Math.cos(i),Math.sin(n),Math.sin(i)).normalize().multiplyScalar(-1)),u.current){let t=.5+.3*Math.sin(4*e.clock.elapsedTime);u.current.opacity=t}}});let T=(0,s.useMemo)(()=>new r.CanvasTexture(o(90,30,"Iceland")),[]),E="is"===e?"Ãú ert hér":"You are here",A=(0,s.useMemo)(()=>new r.CanvasTexture(o(120,25,E)),[E]),C=(0,s.useMemo)(()=>{var e,t;let n,i;return e=d.lat,t=d.lng,n=Math.PI/180*e,i=-(Math.PI/180*t),new r.Vector3(Math.cos(n)*Math.cos(i)*5.01,5.01*Math.sin(n),Math.cos(n)*Math.sin(i)*5.01)},[d.lat,d.lng]);return(0,s.useEffect)(()=>{if(!h&&!c.current){let e=C.clone().normalize().multiplyScalar(11);v.position.set(e.x,e.y,e.z),v.lookAt(0,0,0),y&&"target"in y&&y.target&&y.target.set(0,0,0),c.current=!0}},[h,C,v,y]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("mesh",{geometry:M,children:(0,t.jsx)("shaderMaterial",{ref:l,fragmentShader:g,vertexShader:m,uniforms:w})}),(0,t.jsxs)("mesh",{children:[(0,t.jsx)("sphereGeometry",{args:[5.08,64,64]}),(0,t.jsx)("meshBasicMaterial",{color:43775,side:r.BackSide,opacity:.2,transparent:!0})]}),(0,t.jsx)("mesh",{children:(0,t.jsx)("sprite",{position:[1.82,4.85,.65],scale:[.45,.15,1],children:(0,t.jsx)("spriteMaterial",{map:T,transparent:!0})})}),!h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("mesh",{position:C,renderOrder:999,children:[(0,t.jsx)("sphereGeometry",{args:[.035,16,16]}),(0,t.jsx)("meshBasicMaterial",{ref:u,color:"#ff0000",transparent:!0,opacity:.8,depthTest:!1})]}),(0,t.jsx)("sprite",{position:[C.x,C.y+.2,C.z],scale:[.6,.125,1],renderOrder:999,children:(0,t.jsx)("spriteMaterial",{map:A,transparent:!0,depthTest:!1})})]}),(0,t.jsx)(f,{})]})}],44419)},34051,e=>{e.v({close:"index-module-scss-module__3ozmbG__close",contentWrapper:"index-module-scss-module__3ozmbG__contentWrapper",isVisible:"index-module-scss-module__3ozmbG__isVisible",mediaWrapper:"index-module-scss-module__3ozmbG__mediaWrapper",popup:"index-module-scss-module__3ozmbG__popup",showBackdrop:"index-module-scss-module__3ozmbG__showBackdrop"})},99751,e=>{"use strict";var t=e.i(43476),r=e.i(43794),n=e.i(71645),i=e.i(34051);e.s(["default",0,({onClose:e,mediaChildren:a,contentChildren:s,showBackdrop:o})=>{let[l,u]=(0,n.useState)(!1),c=(0,n.useRef)(null);(0,n.useEffect)(()=>{setTimeout(()=>{u(!0)},50)},[]),(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&d()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}});let d=()=>{u(!1),setTimeout(()=>{e()},400)};return(0,t.jsx)("div",{className:(0,r.default)(i.default.popup,l&&i.default.isVisible,o&&i.default.showBackdrop),onClick:e=>{!(!c.current||!(e.target instanceof Node)||c.current.contains(e.target))&&d()},children:(0,t.jsxs)("div",{ref:c,children:[a&&(0,t.jsx)("div",{className:i.default.mediaWrapper,children:a}),s&&(0,t.jsx)("div",{className:i.default.contentWrapper,children:s}),(0,t.jsx)("button",{title:"Close",className:i.default.close,onClick:d,"aria-label":"Close modal"})]})})}])},75432,e=>{e.v({tooltip:"index-module-scss-module__zoeuva__tooltip",view:"index-module-scss-module__zoeuva__view"})},42052,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(237),a=e.i(1725),s=e.i(72526),o=e.i(31195),l=e.i(34239),u=e.i(85183),c=e.i(93230),d=e.i(48391),h=e.i(18949),f=e.i(75432);let p=[1,2,3,4,5,6,7,8,9],m=({active:e,payload:r,label:n})=>e&&r&&r.length?(0,t.jsx)("div",{className:f.default.tooltip,children:(0,t.jsx)("p",{className:"label",children:`${n}: ${r[0].value} Kpi`})}):null;e.s(["default",0,()=>
524{let[e,g]=(0,n.useState)(!1),{forecastData:v}=(0,d.useAuroraContext)();(0,n.useEffect)(()=>{g(!0)},[]);let y=(0,n.useMemo)(()=>{if(v?.kpi?.kpi==null)return[];let e=[];for(let t=0;t<v?.kpi.kpi.length;t++)e.push({name:(0,r.formatInTimeZone)(new Date(v?.kpi.kpi[t].date),"UTC","d MMM HH"),kpi:Math.round(v?.kpi.kpi[t].value)});return e},[v]);if(!e)return null;let x=Math.max(...y.map(e=>e.kpi));return(0,t.jsx)("div",{className:f.default.view,children:(0,t.jsx)(o.ResponsiveContainer,{width:"99%",height:400,children:(0,t.jsxs)(a.AreaChart,{accessibilityLayer:!1,data:y,margin:{top:30,right:0,left:0,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"kpiShortTerm",x1:"0",y1:"0",x2:"0",y2:1,children:[(0,t.jsx)("stop",{stopColor:(0,h.getColor)(x,"kpi"),offset:0}),p.map(e=>{let r=e/x,n=Math.round(x*(1-r));return n>x||n<0?null:(0,t.jsx)("stop",{stopColor:(0,h.getColor)(n,"kpi"),offset:r},n)})]})}),(0,t.jsx)(s.CartesianGrid,{strokeDasharray:"1 4",opacity:.5}),(0,t.jsx)(u.XAxis,{dataKey:"name",tick:{fontSize:11},minTickGap:10,tickMargin:30,angle:-45,height:70}),(0,t.jsx)(c.YAxis,{domain:[0,9],width:20,tickCount:10}),(0,t.jsx)(l.Tooltip,{content:(0,t.jsx)(m,{})}),(0,t.jsx)(i.Area,{type:"monotone",dataKey:"kpi",stroke:"#999",fillOpacity:.8,fill:"url(#kpiShortTerm)",activeDot:{r:8}})]})})})}])},99211,e=>{e.v({inView:"index-module-scss-module__ScLuea__inView",smoothTransition:"index-module-scss-module__ScLuea__smoothTransition"})},30386,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(43794),i=e.i(99211),a=e.i(54513);e.s(["default",0,({children:e,triggerOnce:s=!1,delay:o=0,style:l})=>{let[u,c]=(0,r.useState)(!1),{ref:d,inView:h}=(0,a.useInView)({threshold:void 0,triggerOnce:s,delay:o});return(0,r.useEffect)(()=>{let e=setTimeout(()=>{c(!0)},50);return()=>{clearTimeout(e)}},[]),(0,t.jsx)("div",{ref:d,style:u&&h||!l?void 0:l,className:(0,n.default)(i.default.smoothTransition,u&&h&&i.default.inView),children:e})}])},72382,e=>{e.v({graph:"index-module-scss-module__w_6czq__graph"})},3684,e=>{"use strict";var t=e.i(43476);e.i(6175);var r=e.i(94174),n=e.i(71645),i=e.i(237),a=e.i(1725),s=e.i(494),o=e.i(55153),l=e.i(31195),u=e.i(34239),c=e.i(85183),d=e.i(93230),h=e.i(40455),f=e.i(31797),p=e.i(18949),m=e.i(86838),g=e.i(72382);let v=[100,200,300,400,500,600,700,800,900];e.s(["default",0,({syncId:e,locale:y})=>{let[x,b]=(0,n.useState)(!1),{realtimeData:_,closestEarthIndex:S}=(0,f.useRealtimeContext)();(0,n.useEffect)(()=>{b(!0)},[]);let w=(0,n.useMemo)(()=>_.map(e=>({...e,label:(0,r.formatInTimeZone)(e.arrivalTime,"UTC","HH:mm")})),[_]);if(!x)return null;let M=_.length>0?Math.max(..._.map(e=>e.speed)):0,T=_.length>0?Math.min(..._.map(e=>e.speed)):0,E=_?.[S]?.speed;return(0,t.jsxs)("div",{className:g.default.graph,children:[(0,t.jsxs)("p",{children:[m.GlobalLocalization[y].now,":"," ",null!=E?`${E} km/s`:"N/A",null!=E&&(0,t.jsx)("span",{style:{color:(0,p.getWindColorFromValue)(E)},children:"â"})]}),(0,t.jsx)(l.ResponsiveContainer,{width:"99%",height:250,children:(0,t.jsxs)(a.AreaChart,{accessibilityLayer:!1,syncId:e,data:w,margin:{top:25,right:10,left:0,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsx)("linearGradient",{id:"speed",x1:"0",y1:"0",x2:"0",y2:1,children:w.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("stop",{stopColor:(0,p.getColor)(M,"solarwinds"),offset:0}),v.map(e=>{let r=e/M,n=Math.round(M*(1-r));return n>M||n<0?null:(0,t.jsx)("stop",{stopColor:(0,p.getColor)(n,"solarwinds"),offset:r},n)})]})})}),(0,t.jsx)(c.XAxis,{dataKey:"label",tick:{fontSize:11},tickSize:12,height:40,interval:10}),(0,t.jsx)(d.YAxis,{domain:[T>300?300:200,M>900?1e3:M>700?800:700],width:60,type:"number",dataKey:"speed",label:(0,t.jsx)(s.Label,{dx:-24,style:{textAnchor:"middle",fontSize:"90%",paddingRight:10},angle:270,value:m.GlobalLocalization[y].windSpeed+" km/s"})}),(0,t.jsx)(u.Tooltip,{content:(0,t.jsx)(({active:e,payload:n,label:i})=>e&&n&&n.length?(0,t.jsxs)(h.TooltipWrapper,{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:m.GlobalLocalization[y].observedTime}),":"," ",(0,r.formatInTimeZone)(n[0].payload.observedTime,"UTC","HH:mm")]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:m.GlobalLocalization[y].arrivalTime}),": ",i]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:m.GlobalLocalization[y].windSpeed}),":"," ",n[0].payload.speed," km/s"]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:m.GlobalLocalization[y].density}),":"," ",n[0].payload.density," ",m.GlobalLocalization[y].protons,"/cm3"]})]}):null,{}),position:{y:0}}),(0,t.jsx)(i.Area,{animationDuration:0,type:"monotone",dataKey:"speed",stroke:"#999",fillOpacity:.8,fill:"url(#speed)",activeDot:{r:6,stroke:"#ccc",fillOpacity:.9}}
524),(0,t.jsx)(o.ReferenceLine,{x:(0,r.formatInTimeZone)(new Date,"UTC","HH:mm"),children:(0,t.jsx)(s.Label,{value:m.GlobalLocalization[y].earth,position:"top"})}),(0,t.jsx)(o.ReferenceLine,{y:700,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getWindColorFromValue)(700)}),(0,t.jsx)(o.ReferenceLine,{y:600,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getWindColorFromValue)(600)}),(0,t.jsx)(o.ReferenceLine,{y:500,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getWindColorFromValue)(500)}),(0,t.jsx)(o.ReferenceLine,{y:400,opacity:.3,strokeDasharray:"10 10",stroke:(0,p.getWindColorFromValue)(400)})]})})]})}])},19520,e=>{e.v({solarwindView:"index-module-scss-module__DI3f0W__solarwindView"})},29972,e=>{"use strict";var t=e.i(43476),r=e.i(83363),n=e.i(19520),i=e.i(61037),a=e.i(71645),s=e.i(63784),o=e.i(6389),l=e.i(31797),u=e.i(86838);let c={en:{windSpeed:"Wind speed",density:"Density",lastUpdated:"Last updated"},is:{windSpeed:"Vindhraði",density:"Ãéttleiki",lastUpdated:"SÃðast uppfært"}};e.s(["default",0,({locale:e})=>{let[d,h]=(0,a.useState)(!1),{realtimeData:f,closestEarthIndex:p,latestItem:m}=(0,l.useRealtimeContext)();(0,a.useEffect)(()=>{h(!0)},[]);let g=(0,a.useMemo)(()=>null==f?null:f[p],[f,p]);return d?(0,t.jsxs)("div",{className:n.default.solarwindView,children:[(0,t.jsx)(r.default,{type:"solarwinds",startGaugeValue:200,endGaugeValue:1e3,value:g?.speed||0,numTicks:9,startAngle:92,endAngle:268}),(0,t.jsxs)(i.default,{children:[(0,t.jsx)("span",{children:c[e].windSpeed}),g?(0,t.jsxs)("span",{children:[g.speed," km/s"]}):(0,t.jsx)("span",{children:"N/A"})]}),(0,t.jsxs)(i.default,{children:[(0,t.jsx)("span",{children:c[e].density}),g?(0,t.jsxs)("span",{children:[g.density," ",u.GlobalLocalization[e].protons,"/cm",(0,t.jsx)("sup",{children:"3"})]}):(0,t.jsx)("span",{children:"N/A"})]}),(0,t.jsxs)(i.default,{children:[(0,t.jsx)("span",{children:c[e].lastUpdated}),m?(0,t.jsx)("span",{children:(0,s.formatDistance)(m.time,new Date,{locale:"is"===e?o.is:void 0,includeSeconds:!0,addSuffix:!0})}):(0,t.jsx)("span",{children:"N/A"})]})]}):null}])},70415,e=>{e.v({tooltip:"index-module-scss-module__DxvFkG__tooltip"})},55153,23197,40455,e=>{"use strict";var t=e.i(71645),r=e.i(7670),n=e.i(97865),i=e.i(494),a=e.i(94395),s=e.i(44171),o=e.i(46710),l=e.i(31725),u=e.i(27241),c=e.i(61764),d=e.i(75337),h=e.i(89763),f=e.i(43404),p=e.i(51883),m=e.i(29601),g=e.i(18457),v=e.i(22075);class y{constructor(e){var t=e.x,r=e.y;this.xAxisScale=t,this.yAxisScale=r}map(e,t){var r,n,i=t.position;return{x:null!=(r=this.xAxisScale.map(e.x,{position:i}))?r:0,y:null!=(n=this.yAxisScale.map(e.y,{position:i}))?n:0}}mapWithFallback(e,t){var r,n,i,a,s=t.position,o=t.fallback;return i="rangeMin"===o?this.yAxisScale.rangeMin():"rangeMax"===o?this.yAxisScale.rangeMax():0,a="rangeMin"===o?this.xAxisScale.rangeMin():"rangeMax"===o?this.xAxisScale.rangeMax():0,{x:null!=(r=this.xAxisScale.map(e.x,{position:s}))?r:a,y:null!=(n=this.yAxisScale.map(e.y,{position:s}))?n:i}}isInRange(e){var t=e.x,r=e.y,n=null==t||this.xAxisScale.isInRange(t),i=null==r||this.yAxisScale.isInRange(r);return n&&i}}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _(){return(_=Object.assign.bind()).apply(null,arguments)}function S(e){var r=(0,u.useAppDispatch)();return(0,t.useEffect)(()=>(r((0,l.addLine)(e)),()=>{r((0,l.removeLine)(e))})),null}function w(e){var l=e.xAxisId,p=e.yAxisId,g=e.shape,x=e.className,S=e.ifOverflow,w=(0,d.useIsPanorama)(),M=(0,h.useClipPathId)(),T=(0,u.useAppSelector)(e=>(0,c.selectXAxisSettings)(e,l)),E=(0,u.useAppSelector)(e=>(0,c.selectYAxisSettings)(e,p)),A=(0,u.useAppSelector)(e=>(0,c.selectAxisScale)(e,"xAxis",l,w)),C=(0,u.useAppSelector)(e=>(0,c.selectAxisScale)(e,"yAxis",p,w)),P=(0,o.useViewBox)();if(!M||!P||null==T||null==E||null==A||null==C)return null;var I=((e,t,r,n,i,s,o)=>{var l,u,c=o.x,d=o.y,h=o.segment,f=o.ifOverflow,p=(0,a.isNumOrStr)(c);if((0,a.isNumOrStr)(d)){var m=r.x,g=r.width,x=t.map(d,{position:n});if(!(0,v.isWellBehavedNumber)(x)||"discard"===f&&!t.isInRange(x))return null;var b=[{x:m+g,y:x},{x:m,y:x}];return"left"===s?b.reverse():b}if(p){var _=r.y,S=r.height,w=e.map(c,{position:n});if(!(0,v.isWellBehavedNumber)(w)||"discard"===f&&!e.isInRange(w))return null;var M=[{x:w,y:_+S},{x:w,y:_}];return"top"===i?M.reverse():M}return null!=h&&2===h.length?(u=[(l=new y({x:e,y:t})).mapWithFallback(h[0],{position:n,fallback:"rangeMin"}),l.mapWithFallback(h[1],{position:n,fallback:"rangeMax"})],"discard"===f&&u.some(e=>!l.isInRange(e))?null:u):null})(A,C,P,e.position,T.orientation,E.orientation,e);if(!I)return null;var O=I[0],R=I[1];if(null==O||null==R)return null;var L=O.x,N=O.y,D=R.x,k=R.y,U=b(b({clipPath:"hidden"===S?"url(#".concat(M,")"):void 0},(0,f.svgPropertiesAndEvents)(e)),{},{x1:L,y1:N,x2:D,y2:k}),F=(0,s.rectWithCoords)({x1:L,y1:N,x2:D,y2:k});return t.createElement(m.ZIndexLayer,{zIndex:e.zIndex},t.createElement(n.Layer,{className:(0,r.clsx)("recharts-reference-line",x)},((e,r)=>{var n;if(t.isValidElement(e))n=t.cloneElement(e,r);else if("function"==typeof e)n=e(r);else{if(!(0,v.isWellBehavedNumber)(r.x1)||!(0,v.isWellBehavedNumber)(r.y1)||!(0,v.isWellBehavedNumber)(r.x2)||!(0,v.isWellBehavedNumber)(r.y2))return null;n=t.createElement("line",_({},r,{className:"recharts-reference-line-line"}))}return n})(g,U),t.createElement(i.CartesianLabelContextProvider,_({},F,{lowerWidth:F.width,upperWidth:F.width}),t.createElement(i.CartesianLabelFromLabelProp,{label:e.label}),e.children)))}e.s(["CartesianScaleHelperImpl",0,y],23197);var M={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:g.DefaultZIndexes.line};function T(e){var r=(0,p.resolveDefaultProps)(e,M);return t.createElement(t.Fragment,null,t.createElement(S,{yAxisId:r.yAxisId,xAxisId:r.xAxisId,ifOverflow:r.ifOverflow,x:r.x,y:r.y,segment:r.segment}),t.createElement(w,r))}
524T.displayName="ReferenceLine",e.s(["ReferenceLine",0,T],55153);var E=e.i(43476),A=e.i(70415);e.s(["TooltipWrapper",0,({children:e})=>(0,E.jsx)("div",{className:A.default.tooltip,children:e})],40455)},72951,17772,54513,e=>{"use strict";let t={"aurora-cams":{path:"/auroracams/:slug"},page:{path:"/:locale/:slug",locales:{en:"/:slug",is:"/is/:slug"}},story:{path:"/:locale/stories/:slug",locales:{en:"/stories/:slug",is:"/is/sogur/:slug"}}};function r(e){let t=(e,t)=>{let r="object"==typeof e?e.contentType?.split(";",1)[0]?.trim().toLowerCase():void 0;if(r)return["image/jpeg","image/png","image/gif","image/webp","image/svg+xml"].includes(r);let n=t.split(/[?#]/,1)[0]??t,i=n.match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase();return!!(!i||["jpg","jpeg","png","gif","webp","svg"].includes(i))||!["avif","heic","heif","jxl","tif","tiff"].includes(i)};function r(n,i={}){if(!n)return"";let a="string"==typeof n?n:n.url;if(!a)return"";if(!e.allowedOrigins.some(e=>a.startsWith(e))||!t(n,a))return a;let{width:s,height:o,quality:l=80,fit:u="cover",format:c="auto",gravity:d,dpr:h}=i,f=e=>Math.round(1e4*e)/1e4,p=e=>Math.min(1,Math.max(0,e)),m=i.crop??("object"==typeof n?n.crop:void 0),g=d??("object"==typeof n?n.focalPoint:void 0);m&&g&&"string"!=typeof g&&(g={x:p((g.x-m.x)/m.width),y:p((g.y-m.y)/m.height)});let v=[];if(s&&v.push(`width=${s}`),o&&v.push(`height=${o}`),v.push(`quality=${l}`),v.push(`fit=${u}`),v.push(`format=${c}`),m){let e=f(Math.max(0,m.y)),t=f(Math.max(0,1-(m.x+m.width))),r=f(Math.max(0,1-(m.y+m.height))),n=f(Math.max(0,m.x));v.push(`trim=${e};${t};${r};${n}`)}g&&v.push("string"==typeof g?`gravity=${g}`:`gravity=${f(g.x)}x${f(g.y)}`),h&&v.push(`dpr=${h}`);let y=a;return a.startsWith(e.domain+"/")&&(y=a.slice(e.domain.length+1)),`${e.domain}/cdn-cgi/image/${v.join(",")}/${y}`}function i(e,a=n,s={}){if(!e)return;let o="string"==typeof e?e:e.url;if(o&&t(e,o))return a.map(t=>`${r(e,{...s,width:t})} ${t}w`).join(", ")}return{cfImage:r,cfSrcSet:i,blobifyImage:function(e,t){let a;if(!e?.url)return null;let{sizes:s,locale:o="en",alt:l,fallbackAlt:u,widths:c=n,...d}=t,h=i(e,c,d),f=c[Math.floor(c.length/2)]??c[c.length-1]??1280,p=r(e,{...d,width:f});if("string"==typeof l)a=l;else if(e.alt&&"object"==typeof e.alt){let t=e.alt;a=t[o]??t[Object.keys(t)[0]??""]??u??""}else a=u??"";return{src:p,srcSet:h,sizes:s,width:e.width,height:e.height,alt:a}}}}let n=[320,640,768,1024,1280,1536,1920,2560];function i(e,t){let r="object"!=typeof e||null===e||Array.isArray(e)?e:e[t]??e[Object.keys(e)[0]];return null!=r?String(r):""}e.s(["createCfImageHelpers",0,r,"resolveLinkUrl",0,function(e,r="en",n){if(e){if("external"===e.type||"asset"===e.type)return e.url;if("internal"===e.type&&e.content){let a=e.content;return function(e,r,n="en",a){if(t[e]?.parentField)throw Error("resolveUrl cannot resolve hierarchical routes. Use client.resolveUrlAsync(model, item, locale) instead.");return function(e,r,n="en",a,s=""){let o=t[e];if(!o)return`/${e}/${r.id}`;let l=o.locales?.[n]||o.path,u=o.homeSlug?.[n],c=(l.match(/:([a-zA-Z][a-zA-Z0-9]*)/g)||[]).map(e=>e.slice(1)).find(e=>"locale"!==e&&"id"!==e&&"space"!==e&&"parentPath"!==e),d=void 0===c?void 0:i(r.fields[c],n);if(void 0!==u&&""!==u&&d===u){let e=l.replace(/:([a-zA-Z][a-zA-Z0-9]*)\??/g,(e,t)=>"locale"===t?n:"id"===t?r.id:"space"===t&&a||"");return(e=e.replace(/\/{2,}/g,"/")).length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),""===e&&(e="/"),e}let h=l.replace(/:parentPath\b/g,s).replace(":locale",n).replace(":id",r.id).replace(":space",a||"").replace(/:([a-zA-Z][a-zA-Z0-9]*)\??/g,(e,t)=>i(r.fields[t],n));return(h=h.replace(/\/{2,}/g,"/")).length>1&&h.endsWith("/")&&(h=h.slice(0,-1)),""===h&&(h="/"),h}(e,r,n,a)}(e.model,a,r,n)}}}],72951);let a="https://blobify.eclipse2026.is",{cfImage:s,blobifyImage:o}=r({domain:a,allowedOrigins:[a]});e.s(["BODY_IMAGE_WIDTHS",0,[320,640,750,828,1080,1200,1536,1920],"blobifyImage",0,o,"cfImage",0,s],17772);var l,u,c=e.i(71645),d=Object.defineProperty,h=new Map,f=new WeakMap,p=0;c.Component;var m=Reflect.get(c,"useInsertionEffect"),g=null!=m?m:c.useEffect,v=(null==(l=c.version)?void 0:l.startsWith("19."))||!1,y="u"<typeof window?c.useEffect:c.useLayoutEffect;e.s(["useInView",0,function({threshold:e,delay:t,trackVisibility:r,rootMargin:n,scrollMargin:i,root:a,triggerOnce:s,skip:o,initialInView:l,fallbackInView:d,onChange:x}={}){let b=c.useRef(l),[_,S]=c.useState({inView:!!l,entry:void 0}),w=function(e,{threshold:t,root:r,rootMargin:n,scrollMargin:i,trackVisibility:a,delay:s,fallbackInView:o,skip:l,triggerOnce:d}){let y=c.useRef(e),x=c.useRef({node:null,stop:void 0,owner:null});return m||(y.current=e),g(()=>{y.current=e},[e]),c.useCallback(function e(c){let m,g,b=x.current;if(!c&&b.owner!==e)return;if(c===b.node)return b.owner=e,v?b.stop:void 0;let _=b.stop;if(b.stop=void 0,null==_||_(),!c||l){b.node=null,b.owner=c?e:null;return}function S(){null==m||m(),b.stop===S&&(b.node=null,b.stop=void 0)}return b.node=c,b.owner=e,b.stop=S,m=function(e,t,r={},n=u){if(void 0===window.IntersectionObserver&&void 0!==n){let i=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}let{id:i,observer:a,elements:s}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?!(r=e.root)?"0":(f.has(r)||(p+=1,f.set(r,p.toString())),f.get(r)):e[t]}`}).toString(),r=h.get(t);if(!r){let n,i=new Map,a=new IntersectionObserver(t=>{t.forEach(t=>{var r;let a=t.isIntersecting&&n.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=a),[...null!=(r=i.get(t.target))?r:[]].forEac
524h(e=>{e(a,t)})})},e);n=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:a,elements:i},h.set(t,r)}return r}(r),o=s.get(e)||[];s.has(e)||s.set(e,o),o.push(t),a.observe(e);let l=!1;return function(){l||(l=!0,o.splice(o.indexOf(t),1),0===o.length&&(s.delete(e),a.unobserve(e)),0===s.size&&(a.disconnect(),h.delete(i)))}}(c,(e,t)=>{y.current(e,t,g),g=e,d&&e&&S()},{threshold:t,root:r,rootMargin:n,scrollMargin:i,trackVisibility:a,delay:s},o),b.stop!==S&&m(),v?b.stop:void 0},[Array.isArray(t)?t.toString():t,r,n,i,a,s,o,l,d])}((e,t)=>{let r=b.current;b.current=e,(void 0!==r||e)&&(S({inView:e,entry:t}),null==x||x(e,t))},{threshold:e,root:a,rootMargin:n,scrollMargin:i,trackVisibility:r,delay:t,fallbackInView:d,skip:o,triggerOnce:s}),M=c.useRef({node:null,reset:!1}),T=c.useCallback(function(e){e?(M.current.node=e,M.current.reset=!1):M.current.node&&(M.current.node=null,M.current.reset=!0);let t=w(e);if(t)return()=>{t(),M.current.node===e&&(M.current.node=null,M.current.reset=!0)}},[w]);y(()=>{!M.current.reset||(M.current.reset=!1,s||o||(S({inView:!!l,entry:void 0}),b.current=l))});let E=[T,_.inView,_.entry];return E.ref=E[0],E.inView=E[1],E.entry=E[2],E}],54513)},39992,e=>{e.v({inactive:"index-module-scss-module__GmITJq__inactive",tab:"index-module-scss-module__GmITJq__tab",tabs:"index-module-scss-module__GmITJq__tabs"})},83304,e=>{"use strict";var t=e.i(43476),r=e.i(7670),n=e.i(18566),i=e.i(39992),a=e.i(22016),s=e.i(86838);e.s(["Tab",0,({item:e,locale:o})=>{let l=(0,n.useSearchParams)(),u=l.get("tab")===e.slug||null===l.get("tab")&&""===e.slug;return(0,t.jsx)(a.default,{className:(0,r.default)(i.default.tab,{[i.default.inactive]:!u}),scroll:!1,href:e.slug?`?tab=${e.slug}`:(0,s.getRootLocalePage)(o),children:e.text})}])},18949,e=>{"use strict";let t=e=>e>.1?"#8cc051":e<=-10?"#c80000":e<=-5?"#ff9600":e<=.1?"#ffc800":"#8cc051",r=e=>e>=700?"#c80000":e>=500&&e<700?"#ff9600":e<500&&e>=350?"#ffc800":e>=0&&e<350?"#8cc051":"#ccc",n=e=>e<=30?"#4ade80":e<=50?"#ff9600":"#c80000";e.s(["getBtColorFromValue",0,e=>e>=30?"#c80000":e>=20?"#ff9600":e>=10?"#ffc800":"#8cc051","getBzColorFromValue",0,t,"getColor",0,(e,i)=>{switch(i){case"kpi":let a;return 9===(a=e)?"#c80000":a>=8&&a<9?"#ff0000":a>=7&&a<8?"#ff9600":a>=6&&a<7?"#ffc800":a>=4&&a<6?"#f6eb14":a<4?"#8cc051":"#ccc";case"solarwinds":return r(e);case"magnetic":case"bz":return t(e);case"hemisphere":return n(e)}},"getDensityColorFromValue",0,e=>e>=60?"#c80000":e>=40?"#ff9600":e>=20?"#ffc800":"#8cc051","getHemispherePowerColorFromValue",0,n,"getWindColorFromValue",0,r])},86838,e=>{"use strict";e.s(["GlobalLocalization",0,{is:{time:"TÃmi",earth:"Jörðin",arrivalTime:"KomutÃmi",observedTime:"SkráningartÃmi",btLevel:"Bt stuðull",windSpeed:"Vindhraði",density:"Ãéttleiki",lastUpdated:"SÃðast uppfært",protons:"róteindir",now:"Núna",status:"Staða",currentActivity:"Núverandi virkni",activity:{low:"Lág virkni",moderate:"Miðlungs virkni",high:"Há virkni",storm:"Stormur"},activityDescription:{low:"Dauf norðurljós möguleg",moderate:"Björt norðurljós lÃkleg",high:"Sterk norðurljós lÃkleg",storm:"Mjög sterk norðurljós lÃkleg"},activityLevel:{low:"Lág",moderate:"Miðlungs",high:"Há",storm:"Stormur"}},en:{time:"Time",earth:"Earth",arrivalTime:"Arrival time",observedTime:"Observed time",btLevel:"Bt level",windSpeed:"Wind speed",density:"Density",lastUpdated:"Last updated",protons:"protons",now:"Now",status:"Status",currentActivity:"Current activity",activity:{low:"Low activity",moderate:"Moderate activity",high:"High activity",storm:"Storm"},activityDescription:{low:"Faint aurora possible",moderate:"Bright aurora likely",high:"Strong aurora likely",storm:"Intense aurora very likely"},activityLevel:{low:"Low",moderate:"Moderate",high:"High",storm:"Storm"}}},"getRootLocalePage",0,e=>{switch(e){case"en":default:return"/";case"is":return"/is"}}])}]);
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.