var Cg=Object.defineProperty,Sg=Object.defineProperties;var Eg=Object.getOwnPropertyDescriptors;var Wm=Object.getOwnPropertySymbols;var xg=Object.prototype.hasOwnProperty,bg=Object.prototype.propertyIsEnumerable;var Ka=Math.pow,hg=(t,e,r)=>e in t?Cg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pt=(t,e)=>{for(var r in e||(e={}))xg.call(e,r)&&hg(t,r,e[r]);if(Wm)for(var r of Wm(e))bg.call(e,r)&&hg(t,r,e[r]);return t},ei=(t,e)=>Sg(t,Eg(e));var fd=(t,e)=>{var r={};for(var n in t)xg.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Wm)for(var n of Wm(t))e.indexOf(n)<0&&bg.call(t,n)&&(r[n]=t[n]);return r};var tp=(t,e,r)=>(hg(t,typeof e!="symbol"?e+"":e,r),r);var Gr=(t,e,r)=>new Promise((n,o)=>{var s=v=>{try{l(r.next(v))}catch(x){o(x)}},c=v=>{try{l(r.throw(v))}catch(x){o(x)}},l=v=>v.done?n(v.value):Promise.resolve(v.value).then(s,c);l((r=r.apply(t,e)).next())});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();function makeMap(t,e){const r=Object.create(null),n=t.split(",");for(let o=0;o!!r[o.toLowerCase()]:o=>!!r[o]}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE$1=/^on[^a-z]/,isOn$1=t=>onRE$1.test(t),isModelListener=t=>t.startsWith("onUpdate:"),extend$1=Object.assign,remove=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},hasOwnProperty$4=Object.prototype.hasOwnProperty,hasOwn$1=(t,e)=>hasOwnProperty$4.call(t,e),isArray$3=Array.isArray,isMap=t=>toTypeString$1(t)==="[object Map]",isSet=t=>toTypeString$1(t)==="[object Set]",isDate$2=t=>toTypeString$1(t)==="[object Date]",isRegExp$2=t=>toTypeString$1(t)==="[object RegExp]",isFunction$3=t=>typeof t=="function",isString$4=t=>typeof t=="string",isSymbol=t=>typeof t=="symbol",isObject$4=t=>t!==null&&typeof t=="object",isPromise$2=t=>isObject$4(t)&&isFunction$3(t.then)&&isFunction$3(t.catch),objectToString$1=Object.prototype.toString,toTypeString$1=t=>objectToString$1.call(t),toRawType=t=>toTypeString$1(t).slice(8,-1),isPlainObject$3=t=>toTypeString$1(t)==="[object Object]",isIntegerKey=t=>isString$4(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(t=>t.replace(camelizeRE,(e,r)=>r?r.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(t=>t.replace(hyphenateRE,"-$1").toLowerCase()),capitalize$1=cacheStringFunction(t=>t.charAt(0).toUpperCase()+t.slice(1)),toHandlerKey=cacheStringFunction(t=>t?`on${capitalize$1(t)}`:""),hasChanged=(t,e)=>!Object.is(t,e),invokeArrayFns=(t,e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},looseToNumber=t=>{const e=parseFloat(t);return isNaN(e)?t:e},toNumber=t=>{const e=isString$4(t)?Number(t):NaN;return isNaN(e)?t:e};let _globalThis$1;const getGlobalThis$1=()=>_globalThis$1||(_globalThis$1=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}),GLOBALS_WHITE_LISTED="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console",isGloballyWhitelisted=makeMap(GLOBALS_WHITE_LISTED);function normalizeStyle(t){if(isArray$3(t)){const e={};for(let r=0;r{if(r){const n=r.split(propertyDelimiterRE);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function normalizeClass(t){let e="";if(isString$4(t))e=t;else if(isArray$3(t))for(let r=0;rlooseEqual(r,e))}const toDisplayString$1=t=>isString$4(t)?t:t==null?"":isArray$3(t)||isObject$4(t)&&(t.toString===objectToString$1||!isFunction$3(t.toString))?JSON.stringify(t,replacer,2):String(t),replacer=(t,e)=>e&&e.__v_isRef?replacer(t,e.value):isMap(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,o])=>(r[`${n} =>`]=o,r),{})}:isSet(e)?{[`Set(${e.size})`]:[...e.values()]}:isObject$4(e)&&!isArray$3(e)&&!isPlainObject$3(e)?String(e):e;let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const r=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=r}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let r,n;for(r=0,n=this.effects.length;r{const e=new Set(t);return e.w=0,e.n=0,e},wasTracked=t=>(t.w&trackOpBit)>0,newTracked=t=>(t.n&trackOpBit)>0,initDepMarkers=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n{(w==="length"||w>=v)&&l.push(x)})}else switch(r!==void 0&&l.push(c.get(r)),e){case"add":isArray$3(t)?isIntegerKey(r)&&l.push(c.get("length")):(l.push(c.get(ITERATE_KEY)),isMap(t)&&l.push(c.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$3(t)||(l.push(c.get(ITERATE_KEY)),isMap(t)&&l.push(c.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(t)&&l.push(c.get(ITERATE_KEY));break}if(l.length===1)l[0]&&triggerEffects(l[0]);else{const v=[];for(const x of l)x&&v.push(...x);triggerEffects(createDep(v))}}function triggerEffects(t,e){const r=isArray$3(t)?t:[...t];for(const n of r)n.computed&&triggerEffect(n);for(const n of r)n.computed||triggerEffect(n)}function triggerEffect(t,e){(t!==activeEffect||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function getDepFromReactive(t,e){var r;return(r=targetMap.get(t))==null?void 0:r.get(e)}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(isSymbol)),get$1=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),shallowReadonlyGet=createGetter(!0,!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const n=toRaw(this);for(let s=0,c=this.length;s{t[e]=function(...r){pauseTracking();const n=toRaw(this)[e].apply(this,r);return resetTracking(),n}}),t}function hasOwnProperty$3(t){const e=toRaw(this);return track(e,"has",t),e.hasOwnProperty(t)}function createGetter(t=!1,e=!1){return function(n,o,s){if(o==="__v_isReactive")return!t;if(o==="__v_isReadonly")return t;if(o==="__v_isShallow")return e;if(o==="__v_raw"&&s===(t?e?shallowReadonlyMap:readonlyMap:e?shallowReactiveMap:reactiveMap).get(n))return n;const c=isArray$3(n);if(!t){if(c&&hasOwn$1(arrayInstrumentations,o))return Reflect.get(arrayInstrumentations,o,s);if(o==="hasOwnProperty")return hasOwnProperty$3}const l=Reflect.get(n,o,s);return(isSymbol(o)?builtInSymbols.has(o):isNonTrackableKeys(o))||(t||track(n,"get",o),e)?l:isRef(l)?c&&isIntegerKey(o)?l:l.value:isObject$4(l)?t?readonly(l):reactive(l):l}}const set$1=createSetter(),shallowSet=createSetter(!0);function createSetter(t=!1){return function(r,n,o,s){let c=r[n];if(isReadonly(c)&&isRef(c)&&!isRef(o))return!1;if(!t&&(!isShallow(o)&&!isReadonly(o)&&(c=toRaw(c),o=toRaw(o)),!isArray$3(r)&&isRef(c)&&!isRef(o)))return c.value=o,!0;const l=isArray$3(r)&&isIntegerKey(n)?Number(n)t,getProto=t=>Reflect.getPrototypeOf(t);function get(t,e,r=!1,n=!1){t=t.__v_raw;const o=toRaw(t),s=toRaw(e);r||(e!==s&&track(o,"get",e),track(o,"get",s));const{has:c}=getProto(o),l=n?toShallow:r?toReadonly:toReactive;if(c.call(o,e))return l(t.get(e));if(c.call(o,s))return l(t.get(s));t!==o&&t.get(e)}function has$2(t,e=!1){const r=this.__v_raw,n=toRaw(r),o=toRaw(t);return e||(t!==o&&track(n,"has",t),track(n,"has",o)),t===o?r.has(t):r.has(t)||r.has(o)}function size(t,e=!1){return t=t.__v_raw,!e&&track(toRaw(t),"iterate",ITERATE_KEY),Reflect.get(t,"size",t)}function add$1(t){t=toRaw(t);const e=toRaw(this);return getProto(e).has.call(e,t)||(e.add(t),trigger(e,"add",t,t)),this}function set(t,e){e=toRaw(e);const r=toRaw(this),{has:n,get:o}=getProto(r);let s=n.call(r,t);s||(t=toRaw(t),s=n.call(r,t));const c=o.call(r,t);return r.set(t,e),s?hasChanged(e,c)&&trigger(r,"set",t,e):trigger(r,"add",t,e),this}function deleteEntry(t){const e=toRaw(this),{has:r,get:n}=getProto(e);let o=r.call(e,t);o||(t=toRaw(t),o=r.call(e,t)),n&&n.call(e,t);const s=e.delete(t);return o&&trigger(e,"delete",t,void 0),s}function clear(){const t=toRaw(this),e=t.size!==0,r=t.clear();return e&&trigger(t,"clear",void 0,void 0),r}function createForEach(t,e){return function(n,o){const s=this,c=s.__v_raw,l=toRaw(c),v=e?toShallow:t?toReadonly:toReactive;return!t&&track(l,"iterate",ITERATE_KEY),c.forEach((x,w)=>n.call(o,v(x),v(w),s))}}function createIterableMethod(t,e,r){return function(...n){const o=this.__v_raw,s=toRaw(o),c=isMap(s),l=t==="entries"||t===Symbol.iterator&&c,v=t==="keys"&&c,x=o[t](...n),w=r?toShallow:e?toReadonly:toReactive;return!e&&track(s,"iterate",v?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:_,done:b}=x.next();return b?{value:_,done:b}:{value:l?[w(_[0]),w(_[1])]:w(_),done:b}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(t){return function(...e){return t==="delete"?!1:this}}function createInstrumentations(){const t={get(s){return get(this,s)},get size(){return size(this)},has:has$2,add:add$1,set,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(s){return get(this,s,!1,!0)},get size(){return size(this)},has:has$2,add:add$1,set,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},r={get(s){return get(this,s,!0)},get size(){return size(this,!0)},has(s){return has$2.call(this,s,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},n={get(s){return get(this,s,!0,!0)},get size(){return size(this,!0)},has(s){return has$2.call(this,s,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=createIterableMethod(s,!1,!1),r[s]=createIterableMethod(s,!0,!1),e[s]=createIterableMethod(s,!1,!0),n[s]=createIterableMethod(s,!0,!0)}),[t,r,e,n]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(t,e){const r=e?t?shallowReadonlyInstrumentations:shallowInstrumentations:t?readonlyInstrumentations:mutableInstrumentations;return(n,o,s)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?n:Reflect.get(hasOwn$1(r,o)&&o in n?r:n,o,s)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(t){return t.__v_skip||!Object.isExtensible(t)?0:targetTypeMap(toRawType(t))}function reactive(t){return isReadonly(t)?t:createReactiveObject(t,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(t){return createReactiveObject(t,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(t){return createReactiveObject(t,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(t){return createReactiveObject(t,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(t,e,r,n,o){if(!isObject$4(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=o.get(t);if(s)return s;const c=getTargetType(t);if(c===0)return t;const l=new Proxy(t,c===2?n:r);return o.set(t,l),l}function isReactive(t){return isReadonly(t)?isReactive(t.__v_raw):!!(t&&t.__v_isReactive)}function isReadonly(t){return!!(t&&t.__v_isReadonly)}function isShallow(t){return!!(t&&t.__v_isShallow)}function isProxy(t){return isReactive(t)||isReadonly(t)}function toRaw(t){const e=t&&t.__v_raw;return e?toRaw(e):t}function markRaw(t){return def(t,"__v_skip",!0),t}const toReactive=t=>isObject$4(t)?reactive(t):t,toReadonly=t=>isObject$4(t)?readonly(t):t;function trackRefValue(t){shouldTrack&&activeEffect&&(t=toRaw(t),trackEffects(t.dep||(t.dep=createDep())))}function triggerRefValue(t,e){t=toRaw(t);const r=t.dep;r&&triggerEffects(r)}function isRef(t){return!!(t&&t.__v_isRef===!0)}function ref(t){return createRef(t,!1)}function shallowRef(t){return createRef(t,!0)}function createRef(t,e){return isRef(t)?t:new RefImpl(t,e)}class RefImpl{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:toRaw(e),this._value=r?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const r=this.__v_isShallow||isShallow(e)||isReadonly(e);e=r?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:toReactive(e),triggerRefValue(this))}}function triggerRef(t){triggerRefValue(t)}function unref(t){return isRef(t)?t.value:t}function toValue(t){return isFunction$3(t)?t():unref(t)}const shallowUnwrapHandlers={get:(t,e,r)=>unref(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const o=t[e];return isRef(o)&&!isRef(r)?(o.value=r,!0):Reflect.set(t,e,r,n)}};function proxyRefs(t){return isReactive(t)?t:new Proxy(t,shallowUnwrapHandlers)}class CustomRefImpl{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:r,set:n}=e(()=>trackRefValue(this),()=>triggerRefValue(this));this._get=r,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function customRef(t){return new CustomRefImpl(t)}function toRefs(t){const e=isArray$3(t)?new Array(t.length):{};for(const r in t)e[r]=propertyToRef(t,r);return e}class ObjectRefImpl{constructor(e,r,n){this._object=e,this._key=r,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function toRef(t,e,r){return isRef(t)?t:isFunction$3(t)?new GetterRefImpl(t):isObject$4(t)&&arguments.length>1?propertyToRef(t,e,r):ref(t)}function propertyToRef(t,e,r){const n=t[e];return isRef(n)?n:new ObjectRefImpl(t,e,r)}class ComputedRefImpl{constructor(e,r,n,o){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ReactiveEffect(e,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=toRaw(this);return trackRefValue(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function computed$1(t,e,r=!1){let n,o;const s=isFunction$3(t);return s?(n=t,o=NOOP):(n=t.get,o=t.set),new ComputedRefImpl(n,o,s||!o,r)}function warn$1(t,...e){}function assertNumber(t,e){}function callWithErrorHandling(t,e,r,n){let o;try{o=n?t(...n):t()}catch(s){handleError(s,e,r)}return o}function callWithAsyncErrorHandling(t,e,r,n){if(isFunction$3(t)){const s=callWithErrorHandling(t,e,r,n);return s&&isPromise$2(s)&&s.catch(c=>{handleError(c,e,r)}),s}const o=[];for(let s=0;s>>1;getId(queue[n])flushIndex&&queue.splice(e,1)}function queuePostFlushCb(t){isArray$3(t)?pendingPostFlushCbs.push(...t):(!activePostFlushCbs||!activePostFlushCbs.includes(t,t.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(t),queueFlush()}function flushPreFlushCbs(t,e=isFlushing?flushIndex+1:0){for(;egetId(r)-getId(n)),postFlushIndex=0;postFlushIndext.id==null?1/0:t.id,comparator=(t,e)=>{const r=getId(t)-getId(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function flushJobs(t){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);const e=NOOP;try{for(flushIndex=0;flushIndexdevtools$1.emit(o,...s)),buffer$2=[]):typeof window!="undefined"&&window.HTMLElement&&!((n=(r=window.navigator)==null?void 0:r.userAgent)!=null&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{setDevtoolsHook(s,e)}),setTimeout(()=>{devtools$1||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,buffer$2=[])},3e3)):buffer$2=[]}function emit(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||EMPTY_OBJ;let o=r;const s=e.startsWith("update:"),c=s&&e.slice(7);if(c&&c in n){const w=`${c==="modelValue"?"model":c}Modifiers`,{number:_,trim:b}=n[w]||EMPTY_OBJ;b&&(o=r.map(E=>isString$4(E)?E.trim():E)),_&&(o=r.map(looseToNumber))}let l,v=n[l=toHandlerKey(e)]||n[l=toHandlerKey(camelize(e))];!v&&s&&(v=n[l=toHandlerKey(hyphenate(e))]),v&&callWithAsyncErrorHandling(v,t,6,o);const x=n[l+"Once"];if(x){if(!t.emitted)t.emitted={};else if(t.emitted[l])return;t.emitted[l]=!0,callWithAsyncErrorHandling(x,t,6,o)}}function normalizeEmitsOptions(t,e,r=!1){const n=e.emitsCache,o=n.get(t);if(o!==void 0)return o;const s=t.emits;let c={},l=!1;if(!isFunction$3(t)){const v=x=>{const w=normalizeEmitsOptions(x,e,!0);w&&(l=!0,extend$1(c,w))};!r&&e.mixins.length&&e.mixins.forEach(v),t.extends&&v(t.extends),t.mixins&&t.mixins.forEach(v)}return!s&&!l?(isObject$4(t)&&n.set(t,null),null):(isArray$3(s)?s.forEach(v=>c[v]=null):extend$1(c,s),isObject$4(t)&&n.set(t,c),c)}function isEmitListener(t,e){return!t||!isOn$1(e)?!1:(e=e.slice(2).replace(/Once$/,""),hasOwn$1(t,e[0].toLowerCase()+e.slice(1))||hasOwn$1(t,hyphenate(e))||hasOwn$1(t,e))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(t){const e=currentRenderingInstance;return currentRenderingInstance=t,currentScopeId=t&&t.type.__scopeId||null,e}function pushScopeId(t){currentScopeId=t}function popScopeId(){currentScopeId=null}const withScopeId=t=>withCtx;function withCtx(t,e=currentRenderingInstance,r){if(!e||t._n)return t;const n=(...o)=>{n._d&&setBlockTracking(-1);const s=setCurrentRenderingInstance(e);let c;try{c=t(...o)}finally{setCurrentRenderingInstance(s),n._d&&setBlockTracking(1)}return c};return n._n=!0,n._c=!0,n._d=!0,n}function markAttrsAccessed(){}function renderComponentRoot(t){const{type:e,vnode:r,proxy:n,withProxy:o,props:s,propsOptions:[c],slots:l,attrs:v,emit:x,render:w,renderCache:_,data:b,setupState:E,ctx:I,inheritAttrs:O}=t;let N,A;const z=setCurrentRenderingInstance(t);try{if(r.shapeFlag&4){const V=o||n;N=normalizeVNode(w.call(V,V,_,s,E,b,I)),A=v}else{const V=e;N=normalizeVNode(V.length>1?V(s,{attrs:v,slots:l,emit:x}):V(s,null)),A=e.props?v:getFunctionalFallthrough(v)}}catch(V){blockStack.length=0,handleError(V,t,1),N=createVNode(Comment)}let G=N;if(A&&O!==!1){const V=Object.keys(A),{shapeFlag:ne}=G;V.length&&ne&7&&(c&&V.some(isModelListener)&&(A=filterModelListeners(A,c)),G=cloneVNode(G,A))}return r.dirs&&(G=cloneVNode(G),G.dirs=G.dirs?G.dirs.concat(r.dirs):r.dirs),r.transition&&(G.transition=r.transition),N=G,setCurrentRenderingInstance(z),N}function filterSingleRoot(t){let e;for(let r=0;r{let e;for(const r in t)(r==="class"||r==="style"||isOn$1(r))&&((e||(e={}))[r]=t[r]);return e},filterModelListeners=(t,e)=>{const r={};for(const n in t)(!isModelListener(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function shouldUpdateComponent(t,e,r){const{props:n,children:o,component:s}=t,{props:c,children:l,patchFlag:v}=e,x=s.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&v>=0){if(v&1024)return!0;if(v&16)return n?hasPropsChanged(n,c,x):!!c;if(v&8){const w=e.dynamicProps;for(let _=0;_t.__isSuspense,SuspenseImpl={name:"Suspense",__isSuspense:!0,process(t,e,r,n,o,s,c,l,v,x){t==null?mountSuspense(e,r,n,o,s,c,l,v,x):patchSuspense(t,e,r,n,o,c,l,v,x)},hydrate:hydrateSuspense,create:createSuspenseBoundary,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(t,e){const r=t.props&&t.props[e];isFunction$3(r)&&r()}function mountSuspense(t,e,r,n,o,s,c,l,v){const{p:x,o:{createElement:w}}=v,_=w("div"),b=t.suspense=createSuspenseBoundary(t,o,n,e,_,r,s,c,l,v);x(null,b.pendingBranch=t.ssContent,_,null,n,b,s,c),b.deps>0?(triggerEvent(t,"onPending"),triggerEvent(t,"onFallback"),x(null,t.ssFallback,e,r,n,null,s,c),setActiveBranch(b,t.ssFallback)):b.resolve(!1,!0)}function patchSuspense(t,e,r,n,o,s,c,l,{p:v,um:x,o:{createElement:w}}){const _=e.suspense=t.suspense;_.vnode=e,e.el=t.el;const b=e.ssContent,E=e.ssFallback,{activeBranch:I,pendingBranch:O,isInFallback:N,isHydrating:A}=_;if(O)_.pendingBranch=b,isSameVNodeType(b,O)?(v(O,b,_.hiddenContainer,null,o,_,s,c,l),_.deps<=0?_.resolve():N&&(v(I,E,r,n,o,null,s,c,l),setActiveBranch(_,E))):(_.pendingId++,A?(_.isHydrating=!1,_.activeBranch=O):x(O,o,_),_.deps=0,_.effects.length=0,_.hiddenContainer=w("div"),N?(v(null,b,_.hiddenContainer,null,o,_,s,c,l),_.deps<=0?_.resolve():(v(I,E,r,n,o,null,s,c,l),setActiveBranch(_,E))):I&&isSameVNodeType(b,I)?(v(I,b,r,n,o,_,s,c,l),_.resolve(!0)):(v(null,b,_.hiddenContainer,null,o,_,s,c,l),_.deps<=0&&_.resolve()));else if(I&&isSameVNodeType(b,I))v(I,b,r,n,o,_,s,c,l),setActiveBranch(_,b);else if(triggerEvent(e,"onPending"),_.pendingBranch=b,_.pendingId++,v(null,b,_.hiddenContainer,null,o,_,s,c,l),_.deps<=0)_.resolve();else{const{timeout:z,pendingId:G}=_;z>0?setTimeout(()=>{_.pendingId===G&&_.fallback(E)},z):z===0&&_.fallback(E)}}function createSuspenseBoundary(t,e,r,n,o,s,c,l,v,x,w=!1){const{p:_,m:b,um:E,n:I,o:{parentNode:O,remove:N}}=x;let A;const z=isVNodeSuspensible(t);z&&e!=null&&e.pendingBranch&&(A=e.pendingId,e.deps++);const G=t.props?toNumber(t.props.timeout):void 0,V={vnode:t,parent:e,parentComponent:r,isSVG:c,container:n,hiddenContainer:o,anchor:s,deps:0,pendingId:0,timeout:typeof G=="number"?G:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:w,isUnmounted:!1,effects:[],resolve(ne=!1,W=!1){const{vnode:B,activeBranch:q,pendingBranch:D,pendingId:F,effects:re,parentComponent:le,container:fe}=V;if(V.isHydrating)V.isHydrating=!1;else if(!ne){const Te=q&&D.transition&&D.transition.mode==="out-in";Te&&(q.transition.afterLeave=()=>{F===V.pendingId&&b(D,fe,ke,0)});let{anchor:ke}=V;q&&(ke=I(q),E(q,le,V,!0)),Te||b(D,fe,ke,0)}setActiveBranch(V,D),V.pendingBranch=null,V.isInFallback=!1;let me=V.parent,ye=!1;for(;me;){if(me.pendingBranch){me.effects.push(...re),ye=!0;break}me=me.parent}ye||queuePostFlushCb(re),V.effects=[],z&&e&&e.pendingBranch&&A===e.pendingId&&(e.deps--,e.deps===0&&!W&&e.resolve()),triggerEvent(B,"onResolve")},fallback(ne){if(!V.pendingBranch)return;const{vnode:W,activeBranch:B,parentComponent:q,container:D,isSVG:F}=V;triggerEvent(W,"onFallback");const re=I(B),le=()=>{!V.isInFallback||(_(null,ne,D,re,q,null,F,l,v),setActiveBranch(V,ne))},fe=ne.transition&&ne.transition.mode==="out-in";fe&&(B.transition.afterLeave=le),V.isInFallback=!0,E(B,q,null,!0),fe||le()},move(ne,W,B){V.activeBranch&&b(V.activeBranch,ne,W,B),V.container=ne},next(){return V.activeBranch&&I(V.activeBranch)},registerDep(ne,W){const B=!!V.pendingBranch;B&&V.deps++;const q=ne.vnode.el;ne.asyncDep.catch(D=>{handleError(D,ne,0)}).then(D=>{if(ne.isUnmounted||V.isUnmounted||V.pendingId!==ne.suspenseId)return;ne.asyncResolved=!0;const{vnode:F}=ne;handleSetupResult(ne,D,!1),q&&(F.el=q);const re=!q&&ne.subTree.el;W(ne,F,O(q||ne.subTree.el),q?null:I(ne.subTree),V,c,v),re&&N(re),updateHOCHostEl(ne,F.el),B&&--V.deps===0&&V.resolve()})},unmount(ne,W){V.isUnmounted=!0,V.activeBranch&&E(V.activeBranch,r,ne,W),V.pendingBranch&&E(V.pendingBranch,r,ne,W)}};return V}function hydrateSuspense(t,e,r,n,o,s,c,l,v){const x=e.suspense=createSuspenseBoundary(e,n,r,t.parentNode,document.createElement("div"),null,o,s,c,l,!0),w=v(t,x.pendingBranch=e.ssContent,r,x,s,c);return x.deps===0&&x.resolve(!1,!0),w}function normalizeSuspenseChildren(t){const{shapeFlag:e,children:r}=t,n=e&32;t.ssContent=normalizeSuspenseSlot(n?r.default:r),t.ssFallback=n?normalizeSuspenseSlot(r.fallback):createVNode(Comment)}function normalizeSuspenseSlot(t){let e;if(isFunction$3(t)){const r=isBlockTreeEnabled&&t._c;r&&(t._d=!1,openBlock()),t=t(),r&&(t._d=!0,e=currentBlock,closeBlock())}return isArray$3(t)&&(t=filterSingleRoot(t)),t=normalizeVNode(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(r=>r!==t)),t}function queueEffectWithSuspense(t,e){e&&e.pendingBranch?isArray$3(t)?e.effects.push(...t):e.effects.push(t):queuePostFlushCb(t)}function setActiveBranch(t,e){t.activeBranch=e;const{vnode:r,parentComponent:n}=t,o=r.el=e.el;n&&n.subTree===r&&(n.vnode.el=o,updateHOCHostEl(n,o))}function isVNodeSuspensible(t){var e;return((e=t.props)==null?void 0:e.suspensible)!=null&&t.props.suspensible!==!1}function watchEffect(t,e){return doWatch(t,null,e)}function watchPostEffect(t,e){return doWatch(t,null,{flush:"post"})}function watchSyncEffect(t,e){return doWatch(t,null,{flush:"sync"})}const INITIAL_WATCHER_VALUE={};function watch(t,e,r){return doWatch(t,e,r)}function doWatch(t,e,{immediate:r,deep:n,flush:o,onTrack:s,onTrigger:c}=EMPTY_OBJ){var l;const v=getCurrentScope()===((l=currentInstance)==null?void 0:l.scope)?currentInstance:null;let x,w=!1,_=!1;if(isRef(t)?(x=()=>t.value,w=isShallow(t)):isReactive(t)?(x=()=>t,n=!0):isArray$3(t)?(_=!0,w=t.some(V=>isReactive(V)||isShallow(V)),x=()=>t.map(V=>{if(isRef(V))return V.value;if(isReactive(V))return traverse(V);if(isFunction$3(V))return callWithErrorHandling(V,v,2)})):isFunction$3(t)?e?x=()=>callWithErrorHandling(t,v,2):x=()=>{if(!(v&&v.isUnmounted))return b&&b(),callWithAsyncErrorHandling(t,v,3,[E])}:x=NOOP,e&&n){const V=x;x=()=>traverse(V())}let b,E=V=>{b=z.onStop=()=>{callWithErrorHandling(V,v,4)}},I;if(isInSSRComponentSetup)if(E=NOOP,e?r&&callWithAsyncErrorHandling(e,v,3,[x(),_?[]:void 0,E]):x(),o==="sync"){const V=useSSRContext();I=V.__watcherHandles||(V.__watcherHandles=[])}else return NOOP;let O=_?new Array(t.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const N=()=>{if(!!z.active)if(e){const V=z.run();(n||w||(_?V.some((ne,W)=>hasChanged(ne,O[W])):hasChanged(V,O)))&&(b&&b(),callWithAsyncErrorHandling(e,v,3,[V,O===INITIAL_WATCHER_VALUE?void 0:_&&O[0]===INITIAL_WATCHER_VALUE?[]:O,E]),O=V)}else z.run()};N.allowRecurse=!!e;let A;o==="sync"?A=N:o==="post"?A=()=>queuePostRenderEffect(N,v&&v.suspense):(N.pre=!0,v&&(N.id=v.uid),A=()=>queueJob(N));const z=new ReactiveEffect(x,A);e?r?N():O=z.run():o==="post"?queuePostRenderEffect(z.run.bind(z),v&&v.suspense):z.run();const G=()=>{z.stop(),v&&v.scope&&remove(v.scope.effects,z)};return I&&I.push(G),G}function instanceWatch(t,e,r){const n=this.proxy,o=isString$4(t)?t.includes(".")?createPathGetter(n,t):()=>n[t]:t.bind(n,n);let s;isFunction$3(e)?s=e:(s=e.handler,r=e);const c=currentInstance;setCurrentInstance(this);const l=doWatch(o,s.bind(n),r);return c?setCurrentInstance(c):unsetCurrentInstance(),l}function createPathGetter(t,e){const r=e.split(".");return()=>{let n=t;for(let o=0;o{traverse(r,e)});else if(isPlainObject$3(t))for(const r in t)traverse(t[r],e);return t}function withDirectives(t,e){const r=currentRenderingInstance;if(r===null)return t;const n=getExposeProxy(r)||r.proxy,o=t.dirs||(t.dirs=[]);for(let s=0;s{t.isMounted=!0}),onBeforeUnmount(()=>{t.isUnmounting=!0}),t}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(t,{slots:e}){const r=getCurrentInstance$1(),n=useTransitionState();let o;return()=>{const s=e.default&&getTransitionRawChildren(e.default(),!0);if(!s||!s.length)return;let c=s[0];if(s.length>1){for(const O of s)if(O.type!==Comment){c=O;break}}const l=toRaw(t),{mode:v}=l;if(n.isLeaving)return emptyPlaceholder(c);const x=getKeepAliveChild(c);if(!x)return emptyPlaceholder(c);const w=resolveTransitionHooks(x,l,n,r);setTransitionHooks(x,w);const _=r.subTree,b=_&&getKeepAliveChild(_);let E=!1;const{getTransitionKey:I}=x.type;if(I){const O=I();o===void 0?o=O:O!==o&&(o=O,E=!0)}if(b&&b.type!==Comment&&(!isSameVNodeType(x,b)||E)){const O=resolveTransitionHooks(b,l,n,r);if(setTransitionHooks(b,O),v==="out-in")return n.isLeaving=!0,O.afterLeave=()=>{n.isLeaving=!1,r.update.active!==!1&&r.update()},emptyPlaceholder(c);v==="in-out"&&x.type!==Comment&&(O.delayLeave=(N,A,z)=>{const G=getLeavingNodesForType(n,b);G[String(b.key)]=b,N._leaveCb=()=>{A(),N._leaveCb=void 0,delete w.delayedLeave},w.delayedLeave=z})}return c}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function resolveTransitionHooks(t,e,r,n){const{appear:o,mode:s,persisted:c=!1,onBeforeEnter:l,onEnter:v,onAfterEnter:x,onEnterCancelled:w,onBeforeLeave:_,onLeave:b,onAfterLeave:E,onLeaveCancelled:I,onBeforeAppear:O,onAppear:N,onAfterAppear:A,onAppearCancelled:z}=e,G=String(t.key),V=getLeavingNodesForType(r,t),ne=(q,D)=>{q&&callWithAsyncErrorHandling(q,n,9,D)},W=(q,D)=>{const F=D[1];ne(q,D),isArray$3(q)?q.every(re=>re.length<=1)&&F():q.length<=1&&F()},B={mode:s,persisted:c,beforeEnter(q){let D=l;if(!r.isMounted)if(o)D=O||l;else return;q._leaveCb&&q._leaveCb(!0);const F=V[G];F&&isSameVNodeType(t,F)&&F.el._leaveCb&&F.el._leaveCb(),ne(D,[q])},enter(q){let D=v,F=x,re=w;if(!r.isMounted)if(o)D=N||v,F=A||x,re=z||w;else return;let le=!1;const fe=q._enterCb=me=>{le||(le=!0,me?ne(re,[q]):ne(F,[q]),B.delayedLeave&&B.delayedLeave(),q._enterCb=void 0)};D?W(D,[q,fe]):fe()},leave(q,D){const F=String(t.key);if(q._enterCb&&q._enterCb(!0),r.isUnmounting)return D();ne(_,[q]);let re=!1;const le=q._leaveCb=fe=>{re||(re=!0,D(),fe?ne(I,[q]):ne(E,[q]),q._leaveCb=void 0,V[F]===t&&delete V[F])};V[F]=t,b?W(b,[q,le]):le()},clone(q){return resolveTransitionHooks(q,e,r,n)}};return B}function emptyPlaceholder(t){if(isKeepAlive(t))return t=cloneVNode(t),t.children=null,t}function getKeepAliveChild(t){return isKeepAlive(t)?t.children?t.children[0]:void 0:t}function setTransitionHooks(t,e){t.shapeFlag&6&&t.component?setTransitionHooks(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function getTransitionRawChildren(t,e=!1,r){let n=[],o=0;for(let s=0;s1)for(let s=0;sextend$1({name:t.name},e,{setup:t}))():t}const isAsyncWrapper=t=>!!t.type.__asyncLoader;function defineAsyncComponent(t){isFunction$3(t)&&(t={loader:t});const{loader:e,loadingComponent:r,errorComponent:n,delay:o=200,timeout:s,suspensible:c=!0,onError:l}=t;let v=null,x,w=0;const _=()=>(w++,v=null,b()),b=()=>{let E;return v||(E=v=e().catch(I=>{if(I=I instanceof Error?I:new Error(String(I)),l)return new Promise((O,N)=>{l(I,()=>O(_()),()=>N(I),w+1)});throw I}).then(I=>E!==v&&v?v:(I&&(I.__esModule||I[Symbol.toStringTag]==="Module")&&(I=I.default),x=I,I)))};return defineComponent$1({name:"AsyncComponentWrapper",__asyncLoader:b,get __asyncResolved(){return x},setup(){const E=currentInstance;if(x)return()=>createInnerComp(x,E);const I=z=>{v=null,handleError(z,E,13,!n)};if(c&&E.suspense||isInSSRComponentSetup)return b().then(z=>()=>createInnerComp(z,E)).catch(z=>(I(z),()=>n?createVNode(n,{error:z}):null));const O=ref(!1),N=ref(),A=ref(!!o);return o&&setTimeout(()=>{A.value=!1},o),s!=null&&setTimeout(()=>{if(!O.value&&!N.value){const z=new Error(`Async component timed out after ${s}ms.`);I(z),N.value=z}},s),b().then(()=>{O.value=!0,E.parent&&isKeepAlive(E.parent.vnode)&&queueJob(E.parent.update)}).catch(z=>{I(z),N.value=z}),()=>{if(O.value&&x)return createInnerComp(x,E);if(N.value&&n)return createVNode(n,{error:N.value});if(r&&!A.value)return createVNode(r)}}})}function createInnerComp(t,e){const{ref:r,props:n,children:o,ce:s}=e.vnode,c=createVNode(t,n,o);return c.ref=r,c.ce=s,delete e.vnode.ce,c}const isKeepAlive=t=>t.type.__isKeepAlive,KeepAliveImpl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const r=getCurrentInstance$1(),n=r.ctx;if(!n.renderer)return()=>{const z=e.default&&e.default();return z&&z.length===1?z[0]:z};const o=new Map,s=new Set;let c=null;const l=r.suspense,{renderer:{p:v,m:x,um:w,o:{createElement:_}}}=n,b=_("div");n.activate=(z,G,V,ne,W)=>{const B=z.component;x(z,G,V,0,l),v(B.vnode,z,G,V,B,l,ne,z.slotScopeIds,W),queuePostRenderEffect(()=>{B.isDeactivated=!1,B.a&&invokeArrayFns(B.a);const q=z.props&&z.props.onVnodeMounted;q&&invokeVNodeHook(q,B.parent,z)},l)},n.deactivate=z=>{const G=z.component;x(z,b,null,1,l),queuePostRenderEffect(()=>{G.da&&invokeArrayFns(G.da);const V=z.props&&z.props.onVnodeUnmounted;V&&invokeVNodeHook(V,G.parent,z),G.isDeactivated=!0},l)};function E(z){resetShapeFlag(z),w(z,r,l,!0)}function I(z){o.forEach((G,V)=>{const ne=getComponentName(G.type);ne&&(!z||!z(ne))&&O(V)})}function O(z){const G=o.get(z);!c||!isSameVNodeType(G,c)?E(G):c&&resetShapeFlag(c),o.delete(z),s.delete(z)}watch(()=>[t.include,t.exclude],([z,G])=>{z&&I(V=>matches(z,V)),G&&I(V=>!matches(G,V))},{flush:"post",deep:!0});let N=null;const A=()=>{N!=null&&o.set(N,getInnerChild(r.subTree))};return onMounted(A),onUpdated(A),onBeforeUnmount(()=>{o.forEach(z=>{const{subTree:G,suspense:V}=r,ne=getInnerChild(G);if(z.type===ne.type&&z.key===ne.key){resetShapeFlag(ne);const W=ne.component.da;W&&queuePostRenderEffect(W,V);return}E(z)})}),()=>{if(N=null,!e.default)return null;const z=e.default(),G=z[0];if(z.length>1)return c=null,z;if(!isVNode$1(G)||!(G.shapeFlag&4)&&!(G.shapeFlag&128))return c=null,G;let V=getInnerChild(G);const ne=V.type,W=getComponentName(isAsyncWrapper(V)?V.type.__asyncResolved||{}:ne),{include:B,exclude:q,max:D}=t;if(B&&(!W||!matches(B,W))||q&&W&&matches(q,W))return c=V,G;const F=V.key==null?ne:V.key,re=o.get(F);return V.el&&(V=cloneVNode(V),G.shapeFlag&128&&(G.ssContent=V)),N=F,re?(V.el=re.el,V.component=re.component,V.transition&&setTransitionHooks(V,V.transition),V.shapeFlag|=512,s.delete(F),s.add(F)):(s.add(F),D&&s.size>parseInt(D,10)&&O(s.values().next().value)),V.shapeFlag|=256,c=V,isSuspense(G.type)?G:V}}},KeepAlive=KeepAliveImpl;function matches(t,e){return isArray$3(t)?t.some(r=>matches(r,e)):isString$4(t)?t.split(",").includes(e):isRegExp$2(t)?t.test(e):!1}function onActivated(t,e){registerKeepAliveHook(t,"a",e)}function onDeactivated(t,e){registerKeepAliveHook(t,"da",e)}function registerKeepAliveHook(t,e,r=currentInstance){const n=t.__wdc||(t.__wdc=()=>{let o=r;for(;o;){if(o.isDeactivated)return;o=o.parent}return t()});if(injectHook(e,n,r),r){let o=r.parent;for(;o&&o.parent;)isKeepAlive(o.parent.vnode)&&injectToKeepAliveRoot(n,e,r,o),o=o.parent}}function injectToKeepAliveRoot(t,e,r,n){const o=injectHook(e,t,n,!0);onUnmounted(()=>{remove(n[e],o)},r)}function resetShapeFlag(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function getInnerChild(t){return t.shapeFlag&128?t.ssContent:t}function injectHook(t,e,r=currentInstance,n=!1){if(r){const o=r[t]||(r[t]=[]),s=e.__weh||(e.__weh=(...c)=>{if(r.isUnmounted)return;pauseTracking(),setCurrentInstance(r);const l=callWithAsyncErrorHandling(e,r,t,c);return unsetCurrentInstance(),resetTracking(),l});return n?o.unshift(s):o.push(s),s}}const createHook=t=>(e,r=currentInstance)=>(!isInSSRComponentSetup||t==="sp")&&injectHook(t,(...n)=>e(...n),r),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(t,e=currentInstance){injectHook("ec",t,e)}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(t,e){return resolveAsset(COMPONENTS,t,!0,e)||t}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(t){return isString$4(t)?resolveAsset(COMPONENTS,t,!1)||t:t||NULL_DYNAMIC_COMPONENT}function resolveDirective(t){return resolveAsset(DIRECTIVES,t)}function resolveAsset(t,e,r=!0,n=!1){const o=currentRenderingInstance||currentInstance;if(o){const s=o.type;if(t===COMPONENTS){const l=getComponentName(s,!1);if(l&&(l===e||l===camelize(e)||l===capitalize$1(camelize(e))))return s}const c=resolve(o[t]||s[t],e)||resolve(o.appContext[t],e);return!c&&n?s:c}}function resolve(t,e){return t&&(t[e]||t[camelize(e)]||t[capitalize$1(camelize(e))])}function renderList(t,e,r,n){let o;const s=r&&r[n];if(isArray$3(t)||isString$4(t)){o=new Array(t.length);for(let c=0,l=t.length;ce(c,l,void 0,s&&s[l]));else{const c=Object.keys(t);o=new Array(c.length);for(let l=0,v=c.length;l{const s=n.fn(...o);return s&&(s.key=n.key),s}:n.fn)}return t}function renderSlot(t,e,r={},n,o){if(currentRenderingInstance.isCE||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.isCE)return e!=="default"&&(r.name=e),createVNode("slot",r,n&&n());let s=t[e];s&&s._c&&(s._d=!1),openBlock();const c=s&&ensureValidVNode$1(s(r)),l=createBlock(Fragment,{key:r.key||c&&c.key||`_${e}`},c||(n?n():[]),c&&t._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function ensureValidVNode$1(t){return t.some(e=>isVNode$1(e)?!(e.type===Comment||e.type===Fragment&&!ensureValidVNode$1(e.children)):!0)?t:null}function toHandlers(t,e){const r={};for(const n in t)r[e&&/[A-Z]/.test(n)?`on:${n}`:toHandlerKey(n)]=t[n];return r}const getPublicInstance=t=>t?isStatefulComponent(t)?getExposeProxy(t)||t.proxy:getPublicInstance(t.parent):null,publicPropertiesMap=extend$1(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>getPublicInstance(t.parent),$root:t=>getPublicInstance(t.root),$emit:t=>t.emit,$options:t=>resolveMergedOptions(t),$forceUpdate:t=>t.f||(t.f=()=>queueJob(t.update)),$nextTick:t=>t.n||(t.n=nextTick.bind(t.proxy)),$watch:t=>instanceWatch.bind(t)}),hasSetupBinding=(t,e)=>t!==EMPTY_OBJ&&!t.__isScriptSetup&&hasOwn$1(t,e),PublicInstanceProxyHandlers={get({_:t},e){const{ctx:r,setupState:n,data:o,props:s,accessCache:c,type:l,appContext:v}=t;let x;if(e[0]!=="$"){const E=c[e];if(E!==void 0)switch(E){case 1:return n[e];case 2:return o[e];case 4:return r[e];case 3:return s[e]}else{if(hasSetupBinding(n,e))return c[e]=1,n[e];if(o!==EMPTY_OBJ&&hasOwn$1(o,e))return c[e]=2,o[e];if((x=t.propsOptions[0])&&hasOwn$1(x,e))return c[e]=3,s[e];if(r!==EMPTY_OBJ&&hasOwn$1(r,e))return c[e]=4,r[e];shouldCacheAccess&&(c[e]=0)}}const w=publicPropertiesMap[e];let _,b;if(w)return e==="$attrs"&&track(t,"get",e),w(t);if((_=l.__cssModules)&&(_=_[e]))return _;if(r!==EMPTY_OBJ&&hasOwn$1(r,e))return c[e]=4,r[e];if(b=v.config.globalProperties,hasOwn$1(b,e))return b[e]},set({_:t},e,r){const{data:n,setupState:o,ctx:s}=t;return hasSetupBinding(o,e)?(o[e]=r,!0):n!==EMPTY_OBJ&&hasOwn$1(n,e)?(n[e]=r,!0):hasOwn$1(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:o,propsOptions:s}},c){let l;return!!r[c]||t!==EMPTY_OBJ&&hasOwn$1(t,c)||hasSetupBinding(e,c)||(l=s[0])&&hasOwn$1(l,c)||hasOwn$1(n,c)||hasOwn$1(publicPropertiesMap,c)||hasOwn$1(o.config.globalProperties,c)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:hasOwn$1(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$1({},PublicInstanceProxyHandlers,{get(t,e){if(e!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(t,e,t)},has(t,e){return e[0]!=="_"&&!isGloballyWhitelisted(e)}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(t){}function defineOptions(t){}function defineSlots(){return null}function defineModel(){}function withDefaults(t,e){return null}function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function useModel(t,e,r){const n=getCurrentInstance$1();if(r&&r.local){const o=ref(t[e]);return watch(()=>t[e],s=>o.value=s),watch(o,s=>{s!==t[e]&&n.emit(`update:${e}`,s)}),o}else return{__v_isRef:!0,get value(){return t[e]},set value(o){n.emit(`update:${e}`,o)}}}function getContext(){const t=getCurrentInstance$1();return t.setupContext||(t.setupContext=createSetupContext(t))}function normalizePropsOrEmits(t){return isArray$3(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}function mergeDefaults(t,e){const r=normalizePropsOrEmits(t);for(const n in e){if(n.startsWith("__skip"))continue;let o=r[n];o?isArray$3(o)||isFunction$3(o)?o=r[n]={type:o,default:e[n]}:o.default=e[n]:o===null&&(o=r[n]={default:e[n]}),o&&e[`__skip_${n}`]&&(o.skipFactory=!0)}return r}function mergeModels(t,e){return!t||!e?t||e:isArray$3(t)&&isArray$3(e)?t.concat(e):extend$1({},normalizePropsOrEmits(t),normalizePropsOrEmits(e))}function createPropsRestProxy(t,e){const r={};for(const n in t)e.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>t[n]});return r}function withAsyncContext(t){const e=getCurrentInstance$1();let r=t();return unsetCurrentInstance(),isPromise$2(r)&&(r=r.catch(n=>{throw setCurrentInstance(e),n})),[r,()=>setCurrentInstance(e)]}let shouldCacheAccess=!0;function applyOptions(t){const e=resolveMergedOptions(t),r=t.proxy,n=t.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook$1(e.beforeCreate,t,"bc");const{data:o,computed:s,methods:c,watch:l,provide:v,inject:x,created:w,beforeMount:_,mounted:b,beforeUpdate:E,updated:I,activated:O,deactivated:N,beforeDestroy:A,beforeUnmount:z,destroyed:G,unmounted:V,render:ne,renderTracked:W,renderTriggered:B,errorCaptured:q,serverPrefetch:D,expose:F,inheritAttrs:re,components:le,directives:fe,filters:me}=e;if(x&&resolveInjections(x,n,null),c)for(const ke in c){const Le=c[ke];isFunction$3(Le)&&(n[ke]=Le.bind(r))}if(o){const ke=o.call(r,r);isObject$4(ke)&&(t.data=reactive(ke))}if(shouldCacheAccess=!0,s)for(const ke in s){const Le=s[ke],et=isFunction$3(Le)?Le.bind(r,r):isFunction$3(Le.get)?Le.get.bind(r,r):NOOP,it=!isFunction$3(Le)&&isFunction$3(Le.set)?Le.set.bind(r):NOOP,Ue=computed({get:et,set:it});Object.defineProperty(n,ke,{enumerable:!0,configurable:!0,get:()=>Ue.value,set:ht=>Ue.value=ht})}if(l)for(const ke in l)createWatcher(l[ke],n,r,ke);if(v){const ke=isFunction$3(v)?v.call(r):v;Reflect.ownKeys(ke).forEach(Le=>{provide(Le,ke[Le])})}w&&callHook$1(w,t,"c");function Te(ke,Le){isArray$3(Le)?Le.forEach(et=>ke(et.bind(r))):Le&&ke(Le.bind(r))}if(Te(onBeforeMount,_),Te(onMounted,b),Te(onBeforeUpdate,E),Te(onUpdated,I),Te(onActivated,O),Te(onDeactivated,N),Te(onErrorCaptured,q),Te(onRenderTracked,W),Te(onRenderTriggered,B),Te(onBeforeUnmount,z),Te(onUnmounted,V),Te(onServerPrefetch,D),isArray$3(F))if(F.length){const ke=t.exposed||(t.exposed={});F.forEach(Le=>{Object.defineProperty(ke,Le,{get:()=>r[Le],set:et=>r[Le]=et})})}else t.exposed||(t.exposed={});ne&&t.render===NOOP&&(t.render=ne),re!=null&&(t.inheritAttrs=re),le&&(t.components=le),fe&&(t.directives=fe)}function resolveInjections(t,e,r=NOOP){isArray$3(t)&&(t=normalizeInject(t));for(const n in t){const o=t[n];let s;isObject$4(o)?"default"in o?s=inject$1(o.from||n,o.default,!0):s=inject$1(o.from||n):s=inject$1(o),isRef(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:c=>s.value=c}):e[n]=s}}function callHook$1(t,e,r){callWithAsyncErrorHandling(isArray$3(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function createWatcher(t,e,r,n){const o=n.includes(".")?createPathGetter(r,n):()=>r[n];if(isString$4(t)){const s=e[t];isFunction$3(s)&&watch(o,s)}else if(isFunction$3(t))watch(o,t.bind(r));else if(isObject$4(t))if(isArray$3(t))t.forEach(s=>createWatcher(s,e,r,n));else{const s=isFunction$3(t.handler)?t.handler.bind(r):e[t.handler];isFunction$3(s)&&watch(o,s,t)}}function resolveMergedOptions(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:o,optionsCache:s,config:{optionMergeStrategies:c}}=t.appContext,l=s.get(e);let v;return l?v=l:!o.length&&!r&&!n?v=e:(v={},o.length&&o.forEach(x=>mergeOptions(v,x,c,!0)),mergeOptions(v,e,c)),isObject$4(e)&&s.set(e,v),v}function mergeOptions(t,e,r,n=!1){const{mixins:o,extends:s}=e;s&&mergeOptions(t,s,r,!0),o&&o.forEach(c=>mergeOptions(t,c,r,!0));for(const c in e)if(!(n&&c==="expose")){const l=internalOptionMergeStrats[c]||r&&r[c];t[c]=l?l(t[c],e[c]):e[c]}return t}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(t,e){return e?t?function(){return extend$1(isFunction$3(t)?t.call(this,this):t,isFunction$3(e)?e.call(this,this):e)}:e:t}function mergeInject(t,e){return mergeObjectOptions(normalizeInject(t),normalizeInject(e))}function normalizeInject(t){if(isArray$3(t)){const e={};for(let r=0;r1)return r&&isFunction$3(e)?e.call(n&&n.proxy):e}}function hasInjectionContext(){return!!(currentInstance||currentRenderingInstance||currentApp)}function initProps(t,e,r,n=!1){const o={},s={};def(s,InternalObjectKey,1),t.propsDefaults=Object.create(null),setFullProps(t,e,o,s);for(const c in t.propsOptions[0])c in o||(o[c]=void 0);r?t.props=n?o:shallowReactive(o):t.type.props?t.props=o:t.props=s,t.attrs=s}function updateProps(t,e,r,n){const{props:o,attrs:s,vnode:{patchFlag:c}}=t,l=toRaw(o),[v]=t.propsOptions;let x=!1;if((n||c>0)&&!(c&16)){if(c&8){const w=t.vnode.dynamicProps;for(let _=0;_{v=!0;const[b,E]=normalizePropsOptions(_,e,!0);extend$1(c,b),E&&l.push(...E)};!r&&e.mixins.length&&e.mixins.forEach(w),t.extends&&w(t.extends),t.mixins&&t.mixins.forEach(w)}if(!s&&!v)return isObject$4(t)&&n.set(t,EMPTY_ARR),EMPTY_ARR;if(isArray$3(s))for(let w=0;w-1,E[1]=O<0||I-1||hasOwn$1(E,"default"))&&l.push(_)}}}const x=[c,l];return isObject$4(t)&&n.set(t,x),x}function validatePropName(t){return t[0]!=="$"}function getType(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function isSameType(t,e){return getType(t)===getType(e)}function getTypeIndex(t,e){return isArray$3(e)?e.findIndex(r=>isSameType(r,t)):isFunction$3(e)&&isSameType(e,t)?0:-1}const isInternalKey=t=>t[0]==="_"||t==="$stable",normalizeSlotValue=t=>isArray$3(t)?t.map(normalizeVNode):[normalizeVNode(t)],normalizeSlot=(t,e,r)=>{if(e._n)return e;const n=withCtx((...o)=>normalizeSlotValue(e(...o)),r);return n._c=!1,n},normalizeObjectSlots=(t,e,r)=>{const n=t._ctx;for(const o in t){if(isInternalKey(o))continue;const s=t[o];if(isFunction$3(s))e[o]=normalizeSlot(o,s,n);else if(s!=null){const c=normalizeSlotValue(s);e[o]=()=>c}}},normalizeVNodeSlots=(t,e)=>{const r=normalizeSlotValue(e);t.slots.default=()=>r},initSlots=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=toRaw(e),def(e,"_",r)):normalizeObjectSlots(e,t.slots={})}else t.slots={},e&&normalizeVNodeSlots(t,e);def(t.slots,InternalObjectKey,1)},updateSlots=(t,e,r)=>{const{vnode:n,slots:o}=t;let s=!0,c=EMPTY_OBJ;if(n.shapeFlag&32){const l=e._;l?r&&l===1?s=!1:(extend$1(o,e),!r&&l===1&&delete o._):(s=!e.$stable,normalizeObjectSlots(e,o)),c=e}else e&&(normalizeVNodeSlots(t,e),c={default:1});if(s)for(const l in o)!isInternalKey(l)&&!(l in c)&&delete o[l]};function setRef(t,e,r,n,o=!1){if(isArray$3(t)){t.forEach((b,E)=>setRef(b,e&&(isArray$3(e)?e[E]:e),r,n,o));return}if(isAsyncWrapper(n)&&!o)return;const s=n.shapeFlag&4?getExposeProxy(n.component)||n.component.proxy:n.el,c=o?null:s,{i:l,r:v}=t,x=e&&e.r,w=l.refs===EMPTY_OBJ?l.refs={}:l.refs,_=l.setupState;if(x!=null&&x!==v&&(isString$4(x)?(w[x]=null,hasOwn$1(_,x)&&(_[x]=null)):isRef(x)&&(x.value=null)),isFunction$3(v))callWithErrorHandling(v,l,12,[c,w]);else{const b=isString$4(v),E=isRef(v);if(b||E){const I=()=>{if(t.f){const O=b?hasOwn$1(_,v)?_[v]:w[v]:v.value;o?isArray$3(O)&&remove(O,s):isArray$3(O)?O.includes(s)||O.push(s):b?(w[v]=[s],hasOwn$1(_,v)&&(_[v]=w[v])):(v.value=[s],t.k&&(w[t.k]=v.value))}else b?(w[v]=c,hasOwn$1(_,v)&&(_[v]=c)):E&&(v.value=c,t.k&&(w[t.k]=c))};c?(I.id=-1,queuePostRenderEffect(I,r)):I()}}}let hasMismatch=!1;const isSVGContainer=t=>/svg/.test(t.namespaceURI)&&t.tagName!=="foreignObject",isComment=t=>t.nodeType===8;function createHydrationFunctions(t){const{mt:e,p:r,o:{patchProp:n,createText:o,nextSibling:s,parentNode:c,remove:l,insert:v,createComment:x}}=t,w=(A,z)=>{if(!z.hasChildNodes()){r(null,A,z),flushPostFlushCbs(),z._vnode=A;return}hasMismatch=!1,_(z.firstChild,A,null,null,null),flushPostFlushCbs(),z._vnode=A,hasMismatch&&console.error("Hydration completed but contains mismatches.")},_=(A,z,G,V,ne,W=!1)=>{const B=isComment(A)&&A.data==="[",q=()=>O(A,z,G,V,ne,B),{type:D,ref:F,shapeFlag:re,patchFlag:le}=z;let fe=A.nodeType;z.el=A,le===-2&&(W=!1,z.dynamicChildren=null);let me=null;switch(D){case Text:fe!==3?z.children===""?(v(z.el=o(""),c(A),A),me=A):me=q():(A.data!==z.children&&(hasMismatch=!0,A.data=z.children),me=s(A));break;case Comment:fe!==8||B?me=q():me=s(A);break;case Static:if(B&&(A=s(A),fe=A.nodeType),fe===1||fe===3){me=A;const ye=!z.children.length;for(let Te=0;Te{W=W||!!z.dynamicChildren;const{type:B,props:q,patchFlag:D,shapeFlag:F,dirs:re}=z,le=B==="input"&&re||B==="option";if(le||D!==-1){if(re&&invokeDirectiveHook(z,null,G,"created"),q)if(le||!W||D&48)for(const me in q)(le&&me.endsWith("value")||isOn$1(me)&&!isReservedProp(me))&&n(A,me,null,q[me],!1,void 0,G);else q.onClick&&n(A,"onClick",null,q.onClick,!1,void 0,G);let fe;if((fe=q&&q.onVnodeBeforeMount)&&invokeVNodeHook(fe,G,z),re&&invokeDirectiveHook(z,null,G,"beforeMount"),((fe=q&&q.onVnodeMounted)||re)&&queueEffectWithSuspense(()=>{fe&&invokeVNodeHook(fe,G,z),re&&invokeDirectiveHook(z,null,G,"mounted")},V),F&16&&!(q&&(q.innerHTML||q.textContent))){let me=E(A.firstChild,z,A,G,V,ne,W);for(;me;){hasMismatch=!0;const ye=me;me=me.nextSibling,l(ye)}}else F&8&&A.textContent!==z.children&&(hasMismatch=!0,A.textContent=z.children)}return A.nextSibling},E=(A,z,G,V,ne,W,B)=>{B=B||!!z.dynamicChildren;const q=z.children,D=q.length;for(let F=0;F{const{slotScopeIds:B}=z;B&&(ne=ne?ne.concat(B):B);const q=c(A),D=E(s(A),z,q,G,V,ne,W);return D&&isComment(D)&&D.data==="]"?s(z.anchor=D):(hasMismatch=!0,v(z.anchor=x("]"),q,D),D)},O=(A,z,G,V,ne,W)=>{if(hasMismatch=!0,z.el=null,W){const D=N(A);for(;;){const F=s(A);if(F&&F!==D)l(F);else break}}const B=s(A),q=c(A);return l(A),r(null,z,q,B,G,V,isSVGContainer(q),ne),B},N=A=>{let z=0;for(;A;)if(A=s(A),A&&isComment(A)&&(A.data==="["&&z++,A.data==="]")){if(z===0)return s(A);z--}return A};return[w,_]}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(t){return baseCreateRenderer(t)}function createHydrationRenderer(t){return baseCreateRenderer(t,createHydrationFunctions)}function baseCreateRenderer(t,e){const r=getGlobalThis$1();r.__VUE__=!0;const{insert:n,remove:o,patchProp:s,createElement:c,createText:l,createComment:v,setText:x,setElementText:w,parentNode:_,nextSibling:b,setScopeId:E=NOOP,insertStaticContent:I}=t,O=(Ne,ze,Ke,vt=null,Ft=null,Ot=null,_t=!1,Tn=null,on=!!ze.dynamicChildren)=>{if(Ne===ze)return;Ne&&!isSameVNodeType(Ne,ze)&&(vt=gt(Ne),ht(Ne,Ft,Ot,!0),Ne=null),ze.patchFlag===-2&&(on=!1,ze.dynamicChildren=null);const{type:$n,ref:Zt,shapeFlag:Et}=ze;switch($n){case Text:N(Ne,ze,Ke,vt);break;case Comment:A(Ne,ze,Ke,vt);break;case Static:Ne==null&&z(ze,Ke,vt,_t);break;case Fragment:le(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on);break;default:Et&1?ne(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on):Et&6?fe(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on):(Et&64||Et&128)&&$n.process(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on,Ze)}Zt!=null&&Ft&&setRef(Zt,Ne&&Ne.ref,Ot,ze||Ne,!ze)},N=(Ne,ze,Ke,vt)=>{if(Ne==null)n(ze.el=l(ze.children),Ke,vt);else{const Ft=ze.el=Ne.el;ze.children!==Ne.children&&x(Ft,ze.children)}},A=(Ne,ze,Ke,vt)=>{Ne==null?n(ze.el=v(ze.children||""),Ke,vt):ze.el=Ne.el},z=(Ne,ze,Ke,vt)=>{[Ne.el,Ne.anchor]=I(Ne.children,ze,Ke,vt,Ne.el,Ne.anchor)},G=({el:Ne,anchor:ze},Ke,vt)=>{let Ft;for(;Ne&&Ne!==ze;)Ft=b(Ne),n(Ne,Ke,vt),Ne=Ft;n(ze,Ke,vt)},V=({el:Ne,anchor:ze})=>{let Ke;for(;Ne&&Ne!==ze;)Ke=b(Ne),o(Ne),Ne=Ke;o(ze)},ne=(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on)=>{_t=_t||ze.type==="svg",Ne==null?W(ze,Ke,vt,Ft,Ot,_t,Tn,on):D(Ne,ze,Ft,Ot,_t,Tn,on)},W=(Ne,ze,Ke,vt,Ft,Ot,_t,Tn)=>{let on,$n;const{type:Zt,props:Et,shapeFlag:rn,transition:wt,dirs:Yn}=Ne;if(on=Ne.el=c(Ne.type,Ot,Et&&Et.is,Et),rn&8?w(on,Ne.children):rn&16&&q(Ne.children,on,null,vt,Ft,Ot&&Zt!=="foreignObject",_t,Tn),Yn&&invokeDirectiveHook(Ne,null,vt,"created"),B(on,Ne,Ne.scopeId,_t,vt),Et){for(const Fe in Et)Fe!=="value"&&!isReservedProp(Fe)&&s(on,Fe,null,Et[Fe],Ot,Ne.children,vt,Ft,He);"value"in Et&&s(on,"value",null,Et.value),($n=Et.onVnodeBeforeMount)&&invokeVNodeHook($n,vt,Ne)}Yn&&invokeDirectiveHook(Ne,null,vt,"beforeMount");const pt=(!Ft||Ft&&!Ft.pendingBranch)&&wt&&!wt.persisted;pt&&wt.beforeEnter(on),n(on,ze,Ke),(($n=Et&&Et.onVnodeMounted)||pt||Yn)&&queuePostRenderEffect(()=>{$n&&invokeVNodeHook($n,vt,Ne),pt&&wt.enter(on),Yn&&invokeDirectiveHook(Ne,null,vt,"mounted")},Ft)},B=(Ne,ze,Ke,vt,Ft)=>{if(Ke&&E(Ne,Ke),vt)for(let Ot=0;Ot{for(let $n=on;$n{const Tn=ze.el=Ne.el;let{patchFlag:on,dynamicChildren:$n,dirs:Zt}=ze;on|=Ne.patchFlag&16;const Et=Ne.props||EMPTY_OBJ,rn=ze.props||EMPTY_OBJ;let wt;Ke&&toggleRecurse(Ke,!1),(wt=rn.onVnodeBeforeUpdate)&&invokeVNodeHook(wt,Ke,ze,Ne),Zt&&invokeDirectiveHook(ze,Ne,Ke,"beforeUpdate"),Ke&&toggleRecurse(Ke,!0);const Yn=Ft&&ze.type!=="foreignObject";if($n?F(Ne.dynamicChildren,$n,Tn,Ke,vt,Yn,Ot):_t||Le(Ne,ze,Tn,null,Ke,vt,Yn,Ot,!1),on>0){if(on&16)re(Tn,ze,Et,rn,Ke,vt,Ft);else if(on&2&&Et.class!==rn.class&&s(Tn,"class",null,rn.class,Ft),on&4&&s(Tn,"style",Et.style,rn.style,Ft),on&8){const pt=ze.dynamicProps;for(let Fe=0;Fe{wt&&invokeVNodeHook(wt,Ke,ze,Ne),Zt&&invokeDirectiveHook(ze,Ne,Ke,"updated")},vt)},F=(Ne,ze,Ke,vt,Ft,Ot,_t)=>{for(let Tn=0;Tn{if(Ke!==vt){if(Ke!==EMPTY_OBJ)for(const Tn in Ke)!isReservedProp(Tn)&&!(Tn in vt)&&s(Ne,Tn,Ke[Tn],null,_t,ze.children,Ft,Ot,He);for(const Tn in vt){if(isReservedProp(Tn))continue;const on=vt[Tn],$n=Ke[Tn];on!==$n&&Tn!=="value"&&s(Ne,Tn,$n,on,_t,ze.children,Ft,Ot,He)}"value"in vt&&s(Ne,"value",Ke.value,vt.value)}},le=(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on)=>{const $n=ze.el=Ne?Ne.el:l(""),Zt=ze.anchor=Ne?Ne.anchor:l("");let{patchFlag:Et,dynamicChildren:rn,slotScopeIds:wt}=ze;wt&&(Tn=Tn?Tn.concat(wt):wt),Ne==null?(n($n,Ke,vt),n(Zt,Ke,vt),q(ze.children,Ke,Zt,Ft,Ot,_t,Tn,on)):Et>0&&Et&64&&rn&&Ne.dynamicChildren?(F(Ne.dynamicChildren,rn,Ke,Ft,Ot,_t,Tn),(ze.key!=null||Ft&&ze===Ft.subTree)&&traverseStaticChildren(Ne,ze,!0)):Le(Ne,ze,Ke,Zt,Ft,Ot,_t,Tn,on)},fe=(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on)=>{ze.slotScopeIds=Tn,Ne==null?ze.shapeFlag&512?Ft.ctx.activate(ze,Ke,vt,_t,on):me(ze,Ke,vt,Ft,Ot,_t,on):ye(Ne,ze,on)},me=(Ne,ze,Ke,vt,Ft,Ot,_t)=>{const Tn=Ne.component=createComponentInstance(Ne,vt,Ft);if(isKeepAlive(Ne)&&(Tn.ctx.renderer=Ze),setupComponent(Tn),Tn.asyncDep){if(Ft&&Ft.registerDep(Tn,Te),!Ne.el){const on=Tn.subTree=createVNode(Comment);A(null,on,ze,Ke)}return}Te(Tn,Ne,ze,Ke,Ft,Ot,_t)},ye=(Ne,ze,Ke)=>{const vt=ze.component=Ne.component;if(shouldUpdateComponent(Ne,ze,Ke))if(vt.asyncDep&&!vt.asyncResolved){ke(vt,ze,Ke);return}else vt.next=ze,invalidateJob(vt.update),vt.update();else ze.el=Ne.el,vt.vnode=ze},Te=(Ne,ze,Ke,vt,Ft,Ot,_t)=>{const Tn=()=>{if(Ne.isMounted){let{next:Zt,bu:Et,u:rn,parent:wt,vnode:Yn}=Ne,pt=Zt,Fe;toggleRecurse(Ne,!1),Zt?(Zt.el=Yn.el,ke(Ne,Zt,_t)):Zt=Yn,Et&&invokeArrayFns(Et),(Fe=Zt.props&&Zt.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Fe,wt,Zt,Yn),toggleRecurse(Ne,!0);const Ie=renderComponentRoot(Ne),ct=Ne.subTree;Ne.subTree=Ie,O(ct,Ie,_(ct.el),gt(ct),Ne,Ft,Ot),Zt.el=Ie.el,pt===null&&updateHOCHostEl(Ne,Ie.el),rn&&queuePostRenderEffect(rn,Ft),(Fe=Zt.props&&Zt.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Fe,wt,Zt,Yn),Ft)}else{let Zt;const{el:Et,props:rn}=ze,{bm:wt,m:Yn,parent:pt}=Ne,Fe=isAsyncWrapper(ze);if(toggleRecurse(Ne,!1),wt&&invokeArrayFns(wt),!Fe&&(Zt=rn&&rn.onVnodeBeforeMount)&&invokeVNodeHook(Zt,pt,ze),toggleRecurse(Ne,!0),Et&&Lt){const Ie=()=>{Ne.subTree=renderComponentRoot(Ne),Lt(Et,Ne.subTree,Ne,Ft,null)};Fe?ze.type.__asyncLoader().then(()=>!Ne.isUnmounted&&Ie()):Ie()}else{const Ie=Ne.subTree=renderComponentRoot(Ne);O(null,Ie,Ke,vt,Ne,Ft,Ot),ze.el=Ie.el}if(Yn&&queuePostRenderEffect(Yn,Ft),!Fe&&(Zt=rn&&rn.onVnodeMounted)){const Ie=ze;queuePostRenderEffect(()=>invokeVNodeHook(Zt,pt,Ie),Ft)}(ze.shapeFlag&256||pt&&isAsyncWrapper(pt.vnode)&&pt.vnode.shapeFlag&256)&&Ne.a&&queuePostRenderEffect(Ne.a,Ft),Ne.isMounted=!0,ze=Ke=vt=null}},on=Ne.effect=new ReactiveEffect(Tn,()=>queueJob($n),Ne.scope),$n=Ne.update=()=>on.run();$n.id=Ne.uid,toggleRecurse(Ne,!0),$n()},ke=(Ne,ze,Ke)=>{ze.component=Ne;const vt=Ne.vnode.props;Ne.vnode=ze,Ne.next=null,updateProps(Ne,ze.props,vt,Ke),updateSlots(Ne,ze.children,Ke),pauseTracking(),flushPreFlushCbs(),resetTracking()},Le=(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on=!1)=>{const $n=Ne&&Ne.children,Zt=Ne?Ne.shapeFlag:0,Et=ze.children,{patchFlag:rn,shapeFlag:wt}=ze;if(rn>0){if(rn&128){it($n,Et,Ke,vt,Ft,Ot,_t,Tn,on);return}else if(rn&256){et($n,Et,Ke,vt,Ft,Ot,_t,Tn,on);return}}wt&8?(Zt&16&&He($n,Ft,Ot),Et!==$n&&w(Ke,Et)):Zt&16?wt&16?it($n,Et,Ke,vt,Ft,Ot,_t,Tn,on):He($n,Ft,Ot,!0):(Zt&8&&w(Ke,""),wt&16&&q(Et,Ke,vt,Ft,Ot,_t,Tn,on))},et=(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on)=>{Ne=Ne||EMPTY_ARR,ze=ze||EMPTY_ARR;const $n=Ne.length,Zt=ze.length,Et=Math.min($n,Zt);let rn;for(rn=0;rnZt?He(Ne,Ft,Ot,!0,!1,Et):q(ze,Ke,vt,Ft,Ot,_t,Tn,on,Et)},it=(Ne,ze,Ke,vt,Ft,Ot,_t,Tn,on)=>{let $n=0;const Zt=ze.length;let Et=Ne.length-1,rn=Zt-1;for(;$n<=Et&&$n<=rn;){const wt=Ne[$n],Yn=ze[$n]=on?cloneIfMounted(ze[$n]):normalizeVNode(ze[$n]);if(isSameVNodeType(wt,Yn))O(wt,Yn,Ke,null,Ft,Ot,_t,Tn,on);else break;$n++}for(;$n<=Et&&$n<=rn;){const wt=Ne[Et],Yn=ze[rn]=on?cloneIfMounted(ze[rn]):normalizeVNode(ze[rn]);if(isSameVNodeType(wt,Yn))O(wt,Yn,Ke,null,Ft,Ot,_t,Tn,on);else break;Et--,rn--}if($n>Et){if($n<=rn){const wt=rn+1,Yn=wtrn)for(;$n<=Et;)ht(Ne[$n],Ft,Ot,!0),$n++;else{const wt=$n,Yn=$n,pt=new Map;for($n=Yn;$n<=rn;$n++){const Kr=ze[$n]=on?cloneIfMounted(ze[$n]):normalizeVNode(ze[$n]);Kr.key!=null&&pt.set(Kr.key,$n)}let Fe,Ie=0;const ct=rn-Yn+1;let Ht=!1,sn=0;const yn=new Array(ct);for($n=0;$n=ct){ht(Kr,Ft,Ot,!0);continue}let ii;if(Kr.key!=null)ii=pt.get(Kr.key);else for(Fe=Yn;Fe<=rn;Fe++)if(yn[Fe-Yn]===0&&isSameVNodeType(Kr,ze[Fe])){ii=Fe;break}ii===void 0?ht(Kr,Ft,Ot,!0):(yn[ii-Yn]=$n+1,ii>=sn?sn=ii:Ht=!0,O(Kr,ze[ii],Ke,null,Ft,Ot,_t,Tn,on),Ie++)}const Dr=Ht?getSequence(yn):EMPTY_ARR;for(Fe=Dr.length-1,$n=ct-1;$n>=0;$n--){const Kr=Yn+$n,ii=ze[Kr],_n=Kr+1{const{el:Ot,type:_t,transition:Tn,children:on,shapeFlag:$n}=Ne;if($n&6){Ue(Ne.component.subTree,ze,Ke,vt);return}if($n&128){Ne.suspense.move(ze,Ke,vt);return}if($n&64){_t.move(Ne,ze,Ke,Ze);return}if(_t===Fragment){n(Ot,ze,Ke);for(let Et=0;EtTn.enter(Ot),Ft);else{const{leave:Et,delayLeave:rn,afterLeave:wt}=Tn,Yn=()=>n(Ot,ze,Ke),pt=()=>{Et(Ot,()=>{Yn(),wt&&wt()})};rn?rn(Ot,Yn,pt):pt()}else n(Ot,ze,Ke)},ht=(Ne,ze,Ke,vt=!1,Ft=!1)=>{const{type:Ot,props:_t,ref:Tn,children:on,dynamicChildren:$n,shapeFlag:Zt,patchFlag:Et,dirs:rn}=Ne;if(Tn!=null&&setRef(Tn,null,Ke,Ne,!0),Zt&256){ze.ctx.deactivate(Ne);return}const wt=Zt&1&&rn,Yn=!isAsyncWrapper(Ne);let pt;if(Yn&&(pt=_t&&_t.onVnodeBeforeUnmount)&&invokeVNodeHook(pt,ze,Ne),Zt&6)Ve(Ne.component,Ke,vt);else{if(Zt&128){Ne.suspense.unmount(Ke,vt);return}wt&&invokeDirectiveHook(Ne,null,ze,"beforeUnmount"),Zt&64?Ne.type.remove(Ne,ze,Ke,Ft,Ze,vt):$n&&(Ot!==Fragment||Et>0&&Et&64)?He($n,ze,Ke,!1,!0):(Ot===Fragment&&Et&384||!Ft&&Zt&16)&&He(on,ze,Ke),vt&&De(Ne)}(Yn&&(pt=_t&&_t.onVnodeUnmounted)||wt)&&queuePostRenderEffect(()=>{pt&&invokeVNodeHook(pt,ze,Ne),wt&&invokeDirectiveHook(Ne,null,ze,"unmounted")},Ke)},De=Ne=>{const{type:ze,el:Ke,anchor:vt,transition:Ft}=Ne;if(ze===Fragment){Be(Ke,vt);return}if(ze===Static){V(Ne);return}const Ot=()=>{o(Ke),Ft&&!Ft.persisted&&Ft.afterLeave&&Ft.afterLeave()};if(Ne.shapeFlag&1&&Ft&&!Ft.persisted){const{leave:_t,delayLeave:Tn}=Ft,on=()=>_t(Ke,Ot);Tn?Tn(Ne.el,Ot,on):on()}else Ot()},Be=(Ne,ze)=>{let Ke;for(;Ne!==ze;)Ke=b(Ne),o(Ne),Ne=Ke;o(ze)},Ve=(Ne,ze,Ke)=>{const{bum:vt,scope:Ft,update:Ot,subTree:_t,um:Tn}=Ne;vt&&invokeArrayFns(vt),Ft.stop(),Ot&&(Ot.active=!1,ht(_t,Ne,ze,Ke)),Tn&&queuePostRenderEffect(Tn,ze),queuePostRenderEffect(()=>{Ne.isUnmounted=!0},ze),ze&&ze.pendingBranch&&!ze.isUnmounted&&Ne.asyncDep&&!Ne.asyncResolved&&Ne.suspenseId===ze.pendingId&&(ze.deps--,ze.deps===0&&ze.resolve())},He=(Ne,ze,Ke,vt=!1,Ft=!1,Ot=0)=>{for(let _t=Ot;_tNe.shapeFlag&6?gt(Ne.component.subTree):Ne.shapeFlag&128?Ne.suspense.next():b(Ne.anchor||Ne.el),dn=(Ne,ze,Ke)=>{Ne==null?ze._vnode&&ht(ze._vnode,null,null,!0):O(ze._vnode||null,Ne,ze,null,null,null,Ke),flushPreFlushCbs(),flushPostFlushCbs(),ze._vnode=Ne},Ze={p:O,um:ht,m:Ue,r:De,mt:me,mc:q,pc:Le,pbc:F,n:gt,o:t};let at,Lt;return e&&([at,Lt]=e(Ze)),{render:dn,hydrate:at,createApp:createAppAPI(dn,at)}}function toggleRecurse({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function traverseStaticChildren(t,e,r=!1){const n=t.children,o=e.children;if(isArray$3(n)&&isArray$3(o))for(let s=0;s>1,t[r[l]]0&&(e[n]=r[s-1]),r[s]=n)}}for(s=r.length,c=r[s-1];s-- >0;)r[s]=c,c=e[c];return r}const isTeleport=t=>t.__isTeleport,isTeleportDisabled=t=>t&&(t.disabled||t.disabled===""),isTargetSVG=t=>typeof SVGElement!="undefined"&&t instanceof SVGElement,resolveTarget=(t,e)=>{const r=t&&t.to;return isString$4(r)?e?e(r):null:r},TeleportImpl={__isTeleport:!0,process(t,e,r,n,o,s,c,l,v,x){const{mc:w,pc:_,pbc:b,o:{insert:E,querySelector:I,createText:O,createComment:N}}=x,A=isTeleportDisabled(e.props);let{shapeFlag:z,children:G,dynamicChildren:V}=e;if(t==null){const ne=e.el=O(""),W=e.anchor=O("");E(ne,r,n),E(W,r,n);const B=e.target=resolveTarget(e.props,I),q=e.targetAnchor=O("");B&&(E(q,B),c=c||isTargetSVG(B));const D=(F,re)=>{z&16&&w(G,F,re,o,s,c,l,v)};A?D(r,W):B&&D(B,q)}else{e.el=t.el;const ne=e.anchor=t.anchor,W=e.target=t.target,B=e.targetAnchor=t.targetAnchor,q=isTeleportDisabled(t.props),D=q?r:W,F=q?ne:B;if(c=c||isTargetSVG(W),V?(b(t.dynamicChildren,V,D,o,s,c,l),traverseStaticChildren(t,e,!0)):v||_(t,e,D,F,o,s,c,l,!1),A)q||moveTeleport(e,r,ne,x,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const re=e.target=resolveTarget(e.props,I);re&&moveTeleport(e,re,null,x,0)}else q&&moveTeleport(e,W,B,x,1)}updateCssVars(e)},remove(t,e,r,n,{um:o,o:{remove:s}},c){const{shapeFlag:l,children:v,anchor:x,targetAnchor:w,target:_,props:b}=t;if(_&&s(w),(c||!isTeleportDisabled(b))&&(s(x),l&16))for(let E=0;E0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(t),t}function createElementBlock(t,e,r,n,o,s){return setupBlock(createBaseVNode(t,e,r,n,o,s,!0))}function createBlock(t,e,r,n,o){return setupBlock(createVNode(t,e,r,n,o,!0))}function isVNode$1(t){return t?t.__v_isVNode===!0:!1}function isSameVNodeType(t,e){return t.type===e.type&&t.key===e.key}function transformVNodeArgs(t){}const InternalObjectKey="__vInternal",normalizeKey=({key:t})=>t!=null?t:null,normalizeRef=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?isString$4(t)||isRef(t)||isFunction$3(t)?{i:currentRenderingInstance,r:t,k:e,f:!!r}:t:null);function createBaseVNode(t,e=null,r=null,n=0,o=null,s=t===Fragment?0:1,c=!1,l=!1){const v={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&normalizeKey(e),ref:e&&normalizeRef(e),scopeId:currentScopeId,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return l?(normalizeChildren(v,r),s&128&&t.normalize(v)):r&&(v.shapeFlag|=isString$4(r)?8:16),isBlockTreeEnabled>0&&!c&¤tBlock&&(v.patchFlag>0||s&6)&&v.patchFlag!==32&¤tBlock.push(v),v}const createVNode=_createVNode;function _createVNode(t,e=null,r=null,n=0,o=null,s=!1){if((!t||t===NULL_DYNAMIC_COMPONENT)&&(t=Comment),isVNode$1(t)){const l=cloneVNode(t,e,!0);return r&&normalizeChildren(l,r),isBlockTreeEnabled>0&&!s&¤tBlock&&(l.shapeFlag&6?currentBlock[currentBlock.indexOf(t)]=l:currentBlock.push(l)),l.patchFlag|=-2,l}if(isClassComponent(t)&&(t=t.__vccOpts),e){e=guardReactiveProps(e);let{class:l,style:v}=e;l&&!isString$4(l)&&(e.class=normalizeClass(l)),isObject$4(v)&&(isProxy(v)&&!isArray$3(v)&&(v=extend$1({},v)),e.style=normalizeStyle(v))}const c=isString$4(t)?1:isSuspense(t)?128:isTeleport(t)?64:isObject$4(t)?4:isFunction$3(t)?2:0;return createBaseVNode(t,e,r,n,o,c,s,!0)}function guardReactiveProps(t){return t?isProxy(t)||InternalObjectKey in t?extend$1({},t):t:null}function cloneVNode(t,e,r=!1){const{props:n,ref:o,patchFlag:s,children:c}=t,l=e?mergeProps(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:l,key:l&&normalizeKey(l),ref:e&&e.ref?r&&o?isArray$3(o)?o.concat(normalizeRef(e)):[o,normalizeRef(e)]:normalizeRef(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:c,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fragment?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&cloneVNode(t.ssContent),ssFallback:t.ssFallback&&cloneVNode(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function createTextVNode(t=" ",e=0){return createVNode(Text,null,t,e)}function createStaticVNode(t,e){const r=createVNode(Static,null,t);return r.staticCount=e,r}function createCommentVNode(t="",e=!1){return e?(openBlock(),createBlock(Comment,null,t)):createVNode(Comment,null,t)}function normalizeVNode(t){return t==null||typeof t=="boolean"?createVNode(Comment):isArray$3(t)?createVNode(Fragment,null,t.slice()):typeof t=="object"?cloneIfMounted(t):createVNode(Text,null,String(t))}function cloneIfMounted(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:cloneVNode(t)}function normalizeChildren(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(isArray$3(e))r=16;else if(typeof e=="object")if(n&65){const o=e.default;o&&(o._c&&(o._d=!1),normalizeChildren(t,o()),o._c&&(o._d=!0));return}else{r=32;const o=e._;!o&&!(InternalObjectKey in e)?e._ctx=currentRenderingInstance:o===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else isFunction$3(e)?(e={default:e,_ctx:currentRenderingInstance},r=32):(e=String(e),n&64?(r=16,e=[createTextVNode(e)]):r=8);t.children=e,t.shapeFlag|=r}function mergeProps(...t){const e={};for(let r=0;rcurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,globalCurrentInstanceSetters,settersKey="__VUE_INSTANCE_SETTERS__";(globalCurrentInstanceSetters=getGlobalThis$1()[settersKey])||(globalCurrentInstanceSetters=getGlobalThis$1()[settersKey]=[]),globalCurrentInstanceSetters.push(t=>currentInstance=t),internalSetCurrentInstance=t=>{globalCurrentInstanceSetters.length>1?globalCurrentInstanceSetters.forEach(e=>e(t)):globalCurrentInstanceSetters[0](t)};const setCurrentInstance=t=>{internalSetCurrentInstance(t),t.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(t){return t.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(t,e=!1){isInSSRComponentSetup=e;const{props:r,children:n}=t.vnode,o=isStatefulComponent(t);initProps(t,r,o,e),initSlots(t,n);const s=o?setupStatefulComponent(t,e):void 0;return isInSSRComponentSetup=!1,s}function setupStatefulComponent(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=markRaw(new Proxy(t.ctx,PublicInstanceProxyHandlers));const{setup:n}=r;if(n){const o=t.setupContext=n.length>1?createSetupContext(t):null;setCurrentInstance(t),pauseTracking();const s=callWithErrorHandling(n,t,0,[t.props,o]);if(resetTracking(),unsetCurrentInstance(),isPromise$2(s)){if(s.then(unsetCurrentInstance,unsetCurrentInstance),e)return s.then(c=>{handleSetupResult(t,c,e)}).catch(c=>{handleError(c,t,0)});t.asyncDep=s}else handleSetupResult(t,s,e)}else finishComponentSetup(t,e)}function handleSetupResult(t,e,r){isFunction$3(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:isObject$4(e)&&(t.setupState=proxyRefs(e)),finishComponentSetup(t,r)}let compile$2,installWithProxy;function registerRuntimeCompiler(t){compile$2=t,installWithProxy=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile$2;function finishComponentSetup(t,e,r){const n=t.type;if(!t.render){if(!e&&compile$2&&!n.render){const o=n.template||resolveMergedOptions(t).template;if(o){const{isCustomElement:s,compilerOptions:c}=t.appContext.config,{delimiters:l,compilerOptions:v}=n,x=extend$1(extend$1({isCustomElement:s,delimiters:l},c),v);n.render=compile$2(o,x)}}t.render=n.render||NOOP,installWithProxy&&installWithProxy(t)}setCurrentInstance(t),pauseTracking(),applyOptions(t),resetTracking(),unsetCurrentInstance()}function getAttrsProxy(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,r){return track(t,"get","$attrs"),e[r]}}))}function createSetupContext(t){const e=r=>{t.exposed=r||{}};return{get attrs(){return getAttrsProxy(t)},slots:t.slots,emit:t.emit,expose:e}}function getExposeProxy(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(proxyRefs(markRaw(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in publicPropertiesMap)return publicPropertiesMap[r](t)},has(e,r){return r in e||r in publicPropertiesMap}}))}function getComponentName(t,e=!0){return isFunction$3(t)?t.displayName||t.name:t.name||e&&t.__name}function isClassComponent(t){return isFunction$3(t)&&"__vccOpts"in t}const computed=(t,e)=>computed$1(t,e,isInSSRComponentSetup);function h(t,e,r){const n=arguments.length;return n===2?isObject$4(e)&&!isArray$3(e)?isVNode$1(e)?createVNode(t,null,[e]):createVNode(t,e):createVNode(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&isVNode$1(r)&&(r=[r]),createVNode(t,e,r))}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject$1(ssrContextKey);function initCustomFormatter(){}function withMemo(t,e,r,n){const o=r[n];if(o&&isMemoSame(o,t))return o;const s=e();return s.memo=t.slice(),r[n]=s}function isMemoSame(t,e){const r=t.memo;if(r.length!=e.length)return!1;for(let n=0;n0&¤tBlock&¤tBlock.push(t),!0}const version$4="3.3.4",_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode:isVNode$1,normalizeVNode},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,svgNS="http://www.w3.org/2000/svg",doc=typeof document!="undefined"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const o=e?doc.createElementNS(svgNS,t):doc.createElement(t,r?{is:r}:void 0);return t==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:t=>doc.createTextNode(t),createComment:t=>doc.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>doc.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,o,s){const c=r?r.previousSibling:e.lastChild;if(o&&(o===s||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),r),!(o===s||!(o=o.nextSibling)););else{templateContainer.innerHTML=n?`${t}`:t;const l=templateContainer.content;if(n){const v=l.firstChild;for(;v.firstChild;)l.appendChild(v.firstChild);l.removeChild(v)}e.insertBefore(l,r)}return[c?c.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function patchClass(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function patchStyle(t,e,r){const n=t.style,o=isString$4(r);if(r&&!o){if(e&&!isString$4(e))for(const s in e)r[s]==null&&setStyle(n,s,"");for(const s in r)setStyle(n,s,r[s])}else{const s=n.display;o?e!==r&&(n.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=s)}}const importantRE=/\s*!important$/;function setStyle(t,e,r){if(isArray$3(r))r.forEach(n=>setStyle(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=autoPrefix(t,e);importantRE.test(r)?t.setProperty(hyphenate(n),r.replace(importantRE,""),"important"):t[n]=r}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(t,e){const r=prefixCache[e];if(r)return r;let n=camelize(e);if(n!=="filter"&&n in t)return prefixCache[e]=n;n=capitalize$1(n);for(let o=0;ocachedNow||(p$1.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(n,r.value),e,5,[n])};return r.value=t,r.attached=getNow(),r}function patchStopImmediatePropagation(t,e){if(isArray$3(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>o=>!o._stopped&&n&&n(o))}else return e}const nativeOnRE=/^on[a-z]/,patchProp=(t,e,r,n,o=!1,s,c,l,v)=>{e==="class"?patchClass(t,n,o):e==="style"?patchStyle(t,r,n):isOn$1(e)?isModelListener(e)||patchEvent(t,e,r,n,c):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(t,e,n,o))?patchDOMProp(t,e,n,s,c,l,v):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),patchAttr(t,e,n,o))};function shouldSetAsProp(t,e,r,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&nativeOnRE.test(e)&&isFunction$3(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||nativeOnRE.test(e)&&isString$4(r)?!1:e in t}function defineCustomElement(t,e){const r=defineComponent$1(t);class n extends VueElement{constructor(s){super(r,s,e)}}return n.def=r,n}const defineSSRCustomElement=t=>defineCustomElement(t,hydrate),BaseClass=typeof HTMLElement!="undefined"?HTMLElement:class{};class VueElement extends BaseClass{constructor(e,r={},n){super(),this._def=e,this._props=r,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(render$1(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let n=0;n{for(const o of n)this._setAttr(o.attributeName)}).observe(this,{attributes:!0});const e=(n,o=!1)=>{const{props:s,styles:c}=n;let l;if(s&&!isArray$3(s))for(const v in s){const x=s[v];(x===Number||x&&x.type===Number)&&(v in this._props&&(this._props[v]=toNumber(this._props[v])),(l||(l=Object.create(null)))[camelize(v)]=!0)}this._numberProps=l,o&&this._resolveProps(n),this._applyStyles(c),this._update()},r=this._def.__asyncLoader;r?r().then(n=>e(n,!0)):e(this._def)}_resolveProps(e){const{props:r}=e,n=isArray$3(r)?r:Object.keys(r||{});for(const o of Object.keys(this))o[0]!=="_"&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(camelize))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(s){this._setProp(o,s)}})}_setAttr(e){let r=this.getAttribute(e);const n=camelize(e);this._numberProps&&this._numberProps[n]&&(r=toNumber(r)),this._setProp(n,r,!1)}_getProp(e){return this._props[e]}_setProp(e,r,n=!0,o=!0){r!==this._props[e]&&(this._props[e]=r,o&&this._instance&&this._update(),n&&(r===!0?this.setAttribute(hyphenate(e),""):typeof r=="string"||typeof r=="number"?this.setAttribute(hyphenate(e),r+""):r||this.removeAttribute(hyphenate(e))))}_update(){render$1(this._createVNode(),this.shadowRoot)}_createVNode(){const e=createVNode(this._def,extend$1({},this._props));return this._instance||(e.ce=r=>{this._instance=r,r.isCE=!0;const n=(s,c)=>{this.dispatchEvent(new CustomEvent(s,{detail:c}))};r.emit=(s,...c)=>{n(s,c),hyphenate(s)!==s&&n(hyphenate(s),c)};let o=this;for(;o=o&&(o.parentNode||o.host);)if(o instanceof VueElement){r.parent=o._instance,r.provides=o._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(r=>{const n=document.createElement("style");n.textContent=r,this.shadowRoot.appendChild(n)})}}function useCssModule(t="$style"){{const e=getCurrentInstance$1();if(!e)return EMPTY_OBJ;const r=e.type.__cssModules;if(!r)return EMPTY_OBJ;const n=r[t];return n||EMPTY_OBJ}}function useCssVars(t){const e=getCurrentInstance$1();if(!e)return;const r=e.ut=(o=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(s=>setVarsOnNode(s,o))},n=()=>{const o=t(e.proxy);setVarsOnVNode(e.subTree,o),r(o)};watchPostEffect(n),onMounted(()=>{const o=new MutationObserver(n);o.observe(e.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>o.disconnect())})}function setVarsOnVNode(t,e){if(t.shapeFlag&128){const r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{setVarsOnVNode(r.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)setVarsOnNode(t.el,e);else if(t.type===Fragment)t.children.forEach(r=>setVarsOnVNode(r,e));else if(t.type===Static){let{el:r,anchor:n}=t;for(;r&&(setVarsOnNode(r,e),r!==n);)r=r.nextSibling}}function setVarsOnNode(t,e){if(t.nodeType===1){const r=t.style;for(const n in e)r.setProperty(`--${n}`,e[n])}}const TRANSITION="transition",ANIMATION="animation",Transition=(t,{slots:e})=>h(BaseTransition,resolveTransitionProps(t),e);Transition.displayName="Transition";const DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=Transition.props=extend$1({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),callHook=(t,e=[])=>{isArray$3(t)?t.forEach(r=>r(...e)):t&&t(...e)},hasExplicitCallback=t=>t?isArray$3(t)?t.some(e=>e.length>1):t.length>1:!1;function resolveTransitionProps(t){const e={};for(const le in t)le in DOMTransitionPropsValidators||(e[le]=t[le]);if(t.css===!1)return e;const{name:r="v",type:n,duration:o,enterFromClass:s=`${r}-enter-from`,enterActiveClass:c=`${r}-enter-active`,enterToClass:l=`${r}-enter-to`,appearFromClass:v=s,appearActiveClass:x=c,appearToClass:w=l,leaveFromClass:_=`${r}-leave-from`,leaveActiveClass:b=`${r}-leave-active`,leaveToClass:E=`${r}-leave-to`}=t,I=normalizeDuration(o),O=I&&I[0],N=I&&I[1],{onBeforeEnter:A,onEnter:z,onEnterCancelled:G,onLeave:V,onLeaveCancelled:ne,onBeforeAppear:W=A,onAppear:B=z,onAppearCancelled:q=G}=e,D=(le,fe,me)=>{removeTransitionClass(le,fe?w:l),removeTransitionClass(le,fe?x:c),me&&me()},F=(le,fe)=>{le._isLeaving=!1,removeTransitionClass(le,_),removeTransitionClass(le,E),removeTransitionClass(le,b),fe&&fe()},re=le=>(fe,me)=>{const ye=le?B:z,Te=()=>D(fe,le,me);callHook(ye,[fe,Te]),nextFrame(()=>{removeTransitionClass(fe,le?v:s),addTransitionClass(fe,le?w:l),hasExplicitCallback(ye)||whenTransitionEnds(fe,n,O,Te)})};return extend$1(e,{onBeforeEnter(le){callHook(A,[le]),addTransitionClass(le,s),addTransitionClass(le,c)},onBeforeAppear(le){callHook(W,[le]),addTransitionClass(le,v),addTransitionClass(le,x)},onEnter:re(!1),onAppear:re(!0),onLeave(le,fe){le._isLeaving=!0;const me=()=>F(le,fe);addTransitionClass(le,_),forceReflow(),addTransitionClass(le,b),nextFrame(()=>{!le._isLeaving||(removeTransitionClass(le,_),addTransitionClass(le,E),hasExplicitCallback(V)||whenTransitionEnds(le,n,N,me))}),callHook(V,[le,me])},onEnterCancelled(le){D(le,!1),callHook(G,[le])},onAppearCancelled(le){D(le,!0),callHook(q,[le])},onLeaveCancelled(le){F(le),callHook(ne,[le])}})}function normalizeDuration(t){if(t==null)return null;if(isObject$4(t))return[NumberOf(t.enter),NumberOf(t.leave)];{const e=NumberOf(t);return[e,e]}}function NumberOf(t){return toNumber(t)}function addTransitionClass(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t._vtc||(t._vtc=new Set)).add(e)}function removeTransitionClass(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const{_vtc:r}=t;r&&(r.delete(e),r.size||(t._vtc=void 0))}function nextFrame(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let endId=0;function whenTransitionEnds(t,e,r,n){const o=t._endId=++endId,s=()=>{o===t._endId&&n()};if(r)return setTimeout(s,r);const{type:c,timeout:l,propCount:v}=getTransitionInfo(t,e);if(!c)return n();const x=c+"end";let w=0;const _=()=>{t.removeEventListener(x,b),s()},b=E=>{E.target===t&&++w>=v&&_()};setTimeout(()=>{w(r[I]||"").split(", "),o=n(`${TRANSITION}Delay`),s=n(`${TRANSITION}Duration`),c=getTimeout(o,s),l=n(`${ANIMATION}Delay`),v=n(`${ANIMATION}Duration`),x=getTimeout(l,v);let w=null,_=0,b=0;e===TRANSITION?c>0&&(w=TRANSITION,_=c,b=s.length):e===ANIMATION?x>0&&(w=ANIMATION,_=x,b=v.length):(_=Math.max(c,x),w=_>0?c>x?TRANSITION:ANIMATION:null,b=w?w===TRANSITION?s.length:v.length:0);const E=w===TRANSITION&&/\b(transform|all)(,|$)/.test(n(`${TRANSITION}Property`).toString());return{type:w,timeout:_,propCount:b,hasTransform:E}}function getTimeout(t,e){for(;t.lengthtoMs(r)+toMs(t[n])))}function toMs(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}const positionMap=new WeakMap,newPositionMap=new WeakMap,TransitionGroupImpl={name:"TransitionGroup",props:extend$1({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(t,{slots:e}){const r=getCurrentInstance$1(),n=useTransitionState();let o,s;return onUpdated(()=>{if(!o.length)return;const c=t.moveClass||`${t.name||"v"}-move`;if(!hasCSSTransform(o[0].el,r.vnode.el,c))return;o.forEach(callPendingCbs),o.forEach(recordPosition);const l=o.filter(applyTranslation);forceReflow(),l.forEach(v=>{const x=v.el,w=x.style;addTransitionClass(x,c),w.transform=w.webkitTransform=w.transitionDuration="";const _=x._moveCb=b=>{b&&b.target!==x||(!b||/transform$/.test(b.propertyName))&&(x.removeEventListener("transitionend",_),x._moveCb=null,removeTransitionClass(x,c))};x.addEventListener("transitionend",_)})}),()=>{const c=toRaw(t),l=resolveTransitionProps(c);let v=c.tag||Fragment;o=s,s=e.default?getTransitionRawChildren(e.default()):[];for(let x=0;xdelete t.mode;TransitionGroupImpl.props;const TransitionGroup=TransitionGroupImpl;function callPendingCbs(t){const e=t.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function recordPosition(t){newPositionMap.set(t,t.el.getBoundingClientRect())}function applyTranslation(t){const e=positionMap.get(t),r=newPositionMap.get(t),n=e.left-r.left,o=e.top-r.top;if(n||o){const s=t.el.style;return s.transform=s.webkitTransform=`translate(${n}px,${o}px)`,s.transitionDuration="0s",t}}function hasCSSTransform(t,e,r){const n=t.cloneNode();t._vtc&&t._vtc.forEach(c=>{c.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(c=>c&&n.classList.add(c)),n.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(n);const{hasTransform:s}=getTransitionInfo(n);return o.removeChild(n),s}const getModelAssigner=t=>{const e=t.props["onUpdate:modelValue"]||!1;return isArray$3(e)?r=>invokeArrayFns(e,r):e};function onCompositionStart(t){t.target.composing=!0}function onCompositionEnd(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const vModelText={created(t,{modifiers:{lazy:e,trim:r,number:n}},o){t._assign=getModelAssigner(o);const s=n||o.props&&o.props.type==="number";addEventListener(t,e?"change":"input",c=>{if(c.target.composing)return;let l=t.value;r&&(l=l.trim()),s&&(l=looseToNumber(l)),t._assign(l)}),r&&addEventListener(t,"change",()=>{t.value=t.value.trim()}),e||(addEventListener(t,"compositionstart",onCompositionStart),addEventListener(t,"compositionend",onCompositionEnd),addEventListener(t,"change",onCompositionEnd))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:r,trim:n,number:o}},s){if(t._assign=getModelAssigner(s),t.composing||document.activeElement===t&&t.type!=="range"&&(r||n&&t.value.trim()===e||(o||t.type==="number")&&looseToNumber(t.value)===e))return;const c=e==null?"":e;t.value!==c&&(t.value=c)}},vModelCheckbox={deep:!0,created(t,e,r){t._assign=getModelAssigner(r),addEventListener(t,"change",()=>{const n=t._modelValue,o=getValue(t),s=t.checked,c=t._assign;if(isArray$3(n)){const l=looseIndexOf(n,o),v=l!==-1;if(s&&!v)c(n.concat(o));else if(!s&&v){const x=[...n];x.splice(l,1),c(x)}}else if(isSet(n)){const l=new Set(n);s?l.add(o):l.delete(o),c(l)}else c(getCheckboxValue(t,s))})},mounted:setChecked,beforeUpdate(t,e,r){t._assign=getModelAssigner(r),setChecked(t,e,r)}};function setChecked(t,{value:e,oldValue:r},n){t._modelValue=e,isArray$3(e)?t.checked=looseIndexOf(e,n.props.value)>-1:isSet(e)?t.checked=e.has(n.props.value):e!==r&&(t.checked=looseEqual(e,getCheckboxValue(t,!0)))}const vModelRadio={created(t,{value:e},r){t.checked=looseEqual(e,r.props.value),t._assign=getModelAssigner(r),addEventListener(t,"change",()=>{t._assign(getValue(t))})},beforeUpdate(t,{value:e,oldValue:r},n){t._assign=getModelAssigner(n),e!==r&&(t.checked=looseEqual(e,n.props.value))}},vModelSelect={deep:!0,created(t,{value:e,modifiers:{number:r}},n){const o=isSet(e);addEventListener(t,"change",()=>{const s=Array.prototype.filter.call(t.options,c=>c.selected).map(c=>r?looseToNumber(getValue(c)):getValue(c));t._assign(t.multiple?o?new Set(s):s:s[0])}),t._assign=getModelAssigner(n)},mounted(t,{value:e}){setSelected(t,e)},beforeUpdate(t,e,r){t._assign=getModelAssigner(r)},updated(t,{value:e}){setSelected(t,e)}};function setSelected(t,e){const r=t.multiple;if(!(r&&!isArray$3(e)&&!isSet(e))){for(let n=0,o=t.options.length;n-1:s.selected=e.has(c);else if(looseEqual(getValue(s),e)){t.selectedIndex!==n&&(t.selectedIndex=n);return}}!r&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function getValue(t){return"_value"in t?t._value:t.value}function getCheckboxValue(t,e){const r=e?"_trueValue":"_falseValue";return r in t?t[r]:e}const vModelDynamic={created(t,e,r){callModelHook(t,e,r,null,"created")},mounted(t,e,r){callModelHook(t,e,r,null,"mounted")},beforeUpdate(t,e,r,n){callModelHook(t,e,r,n,"beforeUpdate")},updated(t,e,r,n){callModelHook(t,e,r,n,"updated")}};function resolveDynamicModel(t,e){switch(t){case"SELECT":return vModelSelect;case"TEXTAREA":return vModelText;default:switch(e){case"checkbox":return vModelCheckbox;case"radio":return vModelRadio;default:return vModelText}}}function callModelHook(t,e,r,n,o){const c=resolveDynamicModel(t.tagName,r.props&&r.props.type)[o];c&&c(t,e,r,n)}function initVModelForSSR(){vModelText.getSSRProps=({value:t})=>({value:t}),vModelRadio.getSSRProps=({value:t},e)=>{if(e.props&&looseEqual(e.props.value,t))return{checked:!0}},vModelCheckbox.getSSRProps=({value:t},e)=>{if(isArray$3(t)){if(e.props&&looseIndexOf(t,e.props.value)>-1)return{checked:!0}}else if(isSet(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},vModelDynamic.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const r=resolveDynamicModel(e.type.toUpperCase(),e.props&&e.props.type);if(r.getSSRProps)return r.getSSRProps(t,e)}}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>systemModifiers.some(r=>t[`${r}Key`]&&!e.includes(r))},withModifiers=(t,e)=>(r,...n)=>{for(let o=0;or=>{if(!("key"in r))return;const n=hyphenate(r.key);if(e.some(o=>o===n||keyNames[o]===n))return t(r)},vShow={beforeMount(t,{value:e},{transition:r}){t._vod=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):setDisplay(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),setDisplay(t,!0),n.enter(t)):n.leave(t,()=>{setDisplay(t,!1)}):setDisplay(t,e))},beforeUnmount(t,{value:e}){setDisplay(t,e)}};function setDisplay(t,e){t.style.display=e?t._vod:"none"}function initVShowForSSR(){vShow.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const rendererOptions=extend$1({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render$1=(...t)=>{ensureRenderer().render(...t)},hydrate=(...t)=>{ensureHydrationRenderer().hydrate(...t)},createApp=(...t)=>{const e=ensureRenderer().createApp(...t),{mount:r}=e;return e.mount=n=>{const o=normalizeContainer(n);if(!o)return;const s=e._component;!isFunction$3(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const c=r(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},e},createSSRApp=(...t)=>{const e=ensureHydrationRenderer().createApp(...t),{mount:r}=e;return e.mount=n=>{const o=normalizeContainer(n);if(o)return r(o,!0,o instanceof SVGElement)},e};function normalizeContainer(t){return isString$4(t)?document.querySelector(t):t}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())},compile$1=()=>{},Vue=Object.freeze(Object.defineProperty({__proto__:null,compile:compile$1,EffectScope,ReactiveEffect,customRef,effect,effectScope,getCurrentScope,isProxy,isReactive,isReadonly,isRef,isShallow,markRaw,onScopeDispose,proxyRefs,reactive,readonly,ref,shallowReactive,shallowReadonly,shallowRef,stop,toRaw,toRef,toRefs,toValue,triggerRef,unref,camelize,capitalize:capitalize$1,normalizeClass,normalizeProps,normalizeStyle,toDisplayString:toDisplayString$1,toHandlerKey,BaseTransition,BaseTransitionPropsValidators,Comment,Fragment,KeepAlive,Static,Suspense,Teleport,Text,assertNumber,callWithAsyncErrorHandling,callWithErrorHandling,cloneVNode,compatUtils,computed,createBlock,createCommentVNode,createElementBlock,createElementVNode:createBaseVNode,createHydrationRenderer,createPropsRestProxy,createRenderer,createSlots,createStaticVNode,createTextVNode,createVNode,defineAsyncComponent,defineComponent:defineComponent$1,defineEmits,defineExpose,defineModel,defineOptions,defineProps,defineSlots,get devtools(){return devtools$1},getCurrentInstance:getCurrentInstance$1,getTransitionRawChildren,guardReactiveProps,h,handleError,hasInjectionContext,initCustomFormatter,inject:inject$1,isMemoSame,isRuntimeOnly,isVNode:isVNode$1,mergeDefaults,mergeModels,mergeProps,nextTick,onActivated,onBeforeMount,onBeforeUnmount,onBeforeUpdate,onDeactivated,onErrorCaptured,onMounted,onRenderTracked,onRenderTriggered,onServerPrefetch,onUnmounted,onUpdated,openBlock,popScopeId,provide,pushScopeId,queuePostFlushCb,registerRuntimeCompiler,renderList,renderSlot,resolveComponent,resolveDirective,resolveDynamicComponent,resolveFilter,resolveTransitionHooks,setBlockTracking,setDevtoolsHook,setTransitionHooks,ssrContextKey,ssrUtils,toHandlers,transformVNodeArgs,useAttrs,useModel,useSSRContext,useSlots,useTransitionState,version:version$4,warn:warn$1,watch,watchEffect,watchPostEffect,watchSyncEffect,withAsyncContext,withCtx,withDefaults,withDirectives,withMemo,withScopeId,Transition,TransitionGroup,VueElement,createApp,createSSRApp,defineCustomElement,defineSSRCustomElement,hydrate,initDirectivesForSSR,render:render$1,useCssModule,useCssVars,vModelCheckbox,vModelDynamic,vModelRadio,vModelSelect,vModelText,vShow,withKeys,withModifiers},Symbol.toStringTag,{value:"Module"})),__vite_glob_0_0=""+new URL("mxdrawassembly_min.469e7cb5.js",import.meta.url).href,__vite_glob_0_1=""+new URL("mxdrawassembly_min.def69ed0.wasm",import.meta.url).href,__vite_glob_0_2=""+new URL("mxdrawassembly_min.worker.ded005df.js",import.meta.url).href,__vite_glob_1_0=""+new URL("mxdrawassembly_min.4f26d534.js",import.meta.url).href,__vite_glob_1_1=""+new URL("mxdrawassembly_minst.28337e29.wasm",import.meta.url).href;var commonjsGlobal$1=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function commonjsRequire(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}class PubSub$1{constructor(){this.events={}}on(e,r){let n=this;n.events.hasOwnProperty(e)||(n.events[e]=[]),n.events[e].push(r)}emit(e,...r){this.events.hasOwnProperty(e)&&this.events[e].map(n=>n(...r))}off(e,r){if(this.events[e])if(r===void 0)this.events[e]=[];else{const n=this.events[e].indexOf(r);this.events[e].splice(n,1)}}}class Store{constructor(e){let r=this;r.actions={},r.mutations={},r.state=e.state,r.status="resting",r.events=new PubSub$1,e.hasOwnProperty("actions")&&(r.actions=e.actions),e.hasOwnProperty("mutations")&&(r.mutations=e.mutations)}dispatch(e,r){let n=this;return typeof n.actions[e]=="function"&&(console.groupCollapsed(`ACTION: ${e}`),n.status="action",n.actions[e](n,r),console.groupEnd(),!0)}commit(e,r){let n=this;if(typeof n.mutations[e]!="function")return console.log(`Mutation "${e}" doesn't exist`),!1;n.status="mutation";let o=n.mutations[e](n.state,r);return n.state=Object.assign(n.state,o),!0}}const options={state:{MxFun:null,Mxassembly:null,isCreateDrawObj:!1},actions:{},mutations:{}};for(let t in options.state){const e=t.charAt(0).toUpperCase()+t.slice(1);options.mutations["set"+e]=(r,n)=>{r[t]=n}}const store=new Store(options);function mxfun(){(function t(e,r,n){function o(l,v){if(!r[l]){if(!e[l]){var x=typeof commonjsRequire=="function"&&commonjsRequire;if(!v&&x)return x(l,!0);if(s)return s(l,!0);var w=new Error("Cannot find module '"+l+"'");throw w.code="MODULE_NOT_FOUND",w}var _=r[l]={exports:{}};e[l][0].call(_.exports,function(b){return o(e[l][1][b]||b)},_,_.exports,t,e,r,n)}return r[l].exports}for(var s=typeof commonjsRequire=="function"&&commonjsRequire,c=0;c>>6:(_<65536?w[I++]=224|_>>>12:(w[I++]=240|_>>>18,w[I++]=128|_>>>12&63),w[I++]=128|_>>>6&63),w[I++]=128|63&_);return w},r.buf2binstring=function(x){return v(x,x.length)},r.binstring2buf=function(x){for(var w=new n.Buf8(x.length),_=0,b=w.length;_>10&1023,N[b++]=56320|1023&E)}return v(N,b)},r.utf8border=function(x,w){var _;for((w=w||x.length)>x.length&&(w=x.length),_=w-1;0<=_&&(192&x[_])==128;)_--;return!(_<0)&&_!==0&&_+c[x[_]]>w?_:w}},{"./common":4}],6:[function(t,e,r){e.exports=function(n,o,s,c){for(var l=65535&n|0,v=n>>>16&65535|0,x=0;s!==0;){for(s-=x=2e3>>1:o>>>1;s[c]=o}return s}();e.exports=function(o,s,c,l){var v=n,x=l+c;o^=-1;for(var w=l;w>>8^v[255&(o^s[w])];return-1^o}},{}],9:[function(t,e,r){var n,o=t("../utils/common"),s=t("./trees"),c=t("./adler32"),l=t("./crc32"),v=t("./messages"),x=0,w=0,_=-2,b=2,E=8,I=286,O=30,N=19,A=2*I+1,z=15,G=3,V=258,ne=V+G+1,W=42,B=113;function q(De,Be){return De.msg=v[Be],Be}function D(De){return(De<<1)-(4De.avail_out&&(Ve=De.avail_out),Ve!==0&&(o.arraySet(De.output,Be.pending_buf,Be.pending_out,Ve,De.next_out),De.next_out+=Ve,Be.pending_out+=Ve,De.total_out+=Ve,De.avail_out-=Ve,Be.pending-=Ve,Be.pending===0&&(Be.pending_out=0))}function le(De,Be){s._tr_flush_block(De,0<=De.block_start?De.block_start:-1,De.strstart-De.block_start,Be),De.block_start=De.strstart,re(De.strm)}function fe(De,Be){De.pending_buf[De.pending++]=Be}function me(De,Be){De.pending_buf[De.pending++]=Be>>>8&255,De.pending_buf[De.pending++]=255&Be}function ye(De,Be){var Ve,He,gt=De.max_chain_length,dn=De.strstart,Ze=De.prev_length,at=De.nice_match,Lt=De.strstart>De.w_size-ne?De.strstart-(De.w_size-ne):0,Ne=De.window,ze=De.w_mask,Ke=De.prev,vt=De.strstart+V,Ft=Ne[dn+Ze-1],Ot=Ne[dn+Ze];De.prev_length>=De.good_match&&(gt>>=2),at>De.lookahead&&(at=De.lookahead);do if(Ne[(Ve=Be)+Ze]===Ot&&Ne[Ve+Ze-1]===Ft&&Ne[Ve]===Ne[dn]&&Ne[++Ve]===Ne[dn+1]){dn+=2,Ve++;do;while(Ne[++dn]===Ne[++Ve]&&Ne[++dn]===Ne[++Ve]&&Ne[++dn]===Ne[++Ve]&&Ne[++dn]===Ne[++Ve]&&Ne[++dn]===Ne[++Ve]&&Ne[++dn]===Ne[++Ve]&&Ne[++dn]===Ne[++Ve]&&Ne[++dn]===Ne[++Ve]&&dnLt&&--gt!=0);return Ze<=De.lookahead?Ze:De.lookahead}function Te(De){var Be,Ve,He,gt,dn,Ze,at,Lt,Ne,ze,Ke=De.w_size;do{if(gt=De.window_size-De.lookahead-De.strstart,De.strstart>=Ke+(Ke-ne)){for(o.arraySet(De.window,De.window,Ke,Ke,0),De.match_start-=Ke,De.strstart-=Ke,De.block_start-=Ke,Be=Ve=De.hash_size;He=De.head[--Be],De.head[Be]=Ke<=He?He-Ke:0,--Ve;);for(Be=Ve=Ke;He=De.prev[--Be],De.prev[Be]=Ke<=He?He-Ke:0,--Ve;);gt+=Ke}if(De.strm.avail_in===0)break;if(Ze=De.strm,at=De.window,Lt=De.strstart+De.lookahead,ze=void 0,(Ne=gt)<(ze=Ze.avail_in)&&(ze=Ne),Ve=ze===0?0:(Ze.avail_in-=ze,o.arraySet(at,Ze.input,Ze.next_in,ze,Lt),Ze.state.wrap===1?Ze.adler=c(Ze.adler,at,ze,Lt):Ze.state.wrap===2&&(Ze.adler=l(Ze.adler,at,ze,Lt)),Ze.next_in+=ze,Ze.total_in+=ze,ze),De.lookahead+=Ve,De.lookahead+De.insert>=G)for(dn=De.strstart-De.insert,De.ins_h=De.window[dn],De.ins_h=(De.ins_h<=G&&(De.ins_h=(De.ins_h<=G)if(He=s._tr_tally(De,De.strstart-De.match_start,De.match_length-G),De.lookahead-=De.match_length,De.match_length<=De.max_lazy_match&&De.lookahead>=G){for(De.match_length--;De.strstart++,De.ins_h=(De.ins_h<=G&&(De.ins_h=(De.ins_h<=G&&De.match_length<=De.prev_length){for(gt=De.strstart+De.lookahead-G,He=s._tr_tally(De,De.strstart-1-De.prev_match,De.prev_length-G),De.lookahead-=De.prev_length-1,De.prev_length-=2;++De.strstart<=gt&&(De.ins_h=(De.ins_h<De.pending_buf_size-5&&(Ve=De.pending_buf_size-5);;){if(De.lookahead<=1){if(Te(De),De.lookahead===0&&Be===x)return 1;if(De.lookahead===0)break}De.strstart+=De.lookahead,De.lookahead=0;var He=De.block_start+Ve;if((De.strstart===0||De.strstart>=He)&&(De.lookahead=De.strstart-He,De.strstart=He,le(De,!1),De.strm.avail_out===0)||De.strstart-De.block_start>=De.w_size-ne&&(le(De,!1),De.strm.avail_out===0))return 1}return De.insert=0,Be===4?(le(De,!0),De.strm.avail_out===0?3:4):(De.strstart>De.block_start&&(le(De,!1),De.strm.avail_out),1)}),new et(4,4,8,4,ke),new et(4,5,16,8,ke),new et(4,6,32,32,ke),new et(4,4,16,16,Le),new et(8,16,32,32,Le),new et(8,16,128,128,Le),new et(8,32,128,256,Le),new et(32,128,258,1024,Le),new et(32,258,258,4096,Le)],r.deflateInit=function(De,Be){return ht(De,Be,E,15,8,0)},r.deflateInit2=ht,r.deflateReset=Ue,r.deflateResetKeep=it,r.deflateSetHeader=function(De,Be){return De&&De.state&&De.state.wrap===2?(De.state.gzhead=Be,w):_},r.deflate=function(De,Be){var Ve,He,gt,dn;if(!De||!De.state||5>8&255),fe(He,He.gzhead.time>>16&255),fe(He,He.gzhead.time>>24&255),fe(He,He.level===9?2:2<=He.strategy||He.level<2?4:0),fe(He,255&He.gzhead.os),He.gzhead.extra&&He.gzhead.extra.length&&(fe(He,255&He.gzhead.extra.length),fe(He,He.gzhead.extra.length>>8&255)),He.gzhead.hcrc&&(De.adler=l(De.adler,He.pending_buf,He.pending,0)),He.gzindex=0,He.status=69):(fe(He,0),fe(He,0),fe(He,0),fe(He,0),fe(He,0),fe(He,He.level===9?2:2<=He.strategy||He.level<2?4:0),fe(He,3),He.status=B);else{var Ze=E+(He.w_bits-8<<4)<<8;Ze|=(2<=He.strategy||He.level<2?0:He.level<6?1:He.level===6?2:3)<<6,He.strstart!==0&&(Ze|=32),Ze+=31-Ze%31,He.status=B,me(He,Ze),He.strstart!==0&&(me(He,De.adler>>>16),me(He,65535&De.adler)),De.adler=1}if(He.status===69)if(He.gzhead.extra){for(gt=He.pending;He.gzindex<(65535&He.gzhead.extra.length)&&(He.pending!==He.pending_buf_size||(He.gzhead.hcrc&&He.pending>gt&&(De.adler=l(De.adler,He.pending_buf,He.pending-gt,gt)),re(De),gt=He.pending,He.pending!==He.pending_buf_size));)fe(He,255&He.gzhead.extra[He.gzindex]),He.gzindex++;He.gzhead.hcrc&&He.pending>gt&&(De.adler=l(De.adler,He.pending_buf,He.pending-gt,gt)),He.gzindex===He.gzhead.extra.length&&(He.gzindex=0,He.status=73)}else He.status=73;if(He.status===73)if(He.gzhead.name){gt=He.pending;do{if(He.pending===He.pending_buf_size&&(He.gzhead.hcrc&&He.pending>gt&&(De.adler=l(De.adler,He.pending_buf,He.pending-gt,gt)),re(De),gt=He.pending,He.pending===He.pending_buf_size)){dn=1;break}dn=He.gzindexgt&&(De.adler=l(De.adler,He.pending_buf,He.pending-gt,gt)),dn===0&&(He.gzindex=0,He.status=91)}else He.status=91;if(He.status===91)if(He.gzhead.comment){gt=He.pending;do{if(He.pending===He.pending_buf_size&&(He.gzhead.hcrc&&He.pending>gt&&(De.adler=l(De.adler,He.pending_buf,He.pending-gt,gt)),re(De),gt=He.pending,He.pending===He.pending_buf_size)){dn=1;break}dn=He.gzindexgt&&(De.adler=l(De.adler,He.pending_buf,He.pending-gt,gt)),dn===0&&(He.status=103)}else He.status=103;if(He.status===103&&(He.gzhead.hcrc?(He.pending+2>He.pending_buf_size&&re(De),He.pending+2<=He.pending_buf_size&&(fe(He,255&De.adler),fe(He,De.adler>>8&255),De.adler=0,He.status=B)):He.status=B),He.pending!==0){if(re(De),De.avail_out===0)return He.last_flush=-1,w}else if(De.avail_in===0&&D(Be)<=D(Ve)&&Be!==4)return q(De,-5);if(He.status===666&&De.avail_in!==0)return q(De,-5);if(De.avail_in!==0||He.lookahead!==0||Be!==x&&He.status!==666){var at=He.strategy===2?function(Lt,Ne){for(var ze;;){if(Lt.lookahead===0&&(Te(Lt),Lt.lookahead===0)){if(Ne===x)return 1;break}if(Lt.match_length=0,ze=s._tr_tally(Lt,0,Lt.window[Lt.strstart]),Lt.lookahead--,Lt.strstart++,ze&&(le(Lt,!1),Lt.strm.avail_out===0))return 1}return Lt.insert=0,Ne===4?(le(Lt,!0),Lt.strm.avail_out===0?3:4):Lt.last_lit&&(le(Lt,!1),Lt.strm.avail_out===0)?1:2}(He,Be):He.strategy===3?function(Lt,Ne){for(var ze,Ke,vt,Ft,Ot=Lt.window;;){if(Lt.lookahead<=V){if(Te(Lt),Lt.lookahead<=V&&Ne===x)return 1;if(Lt.lookahead===0)break}if(Lt.match_length=0,Lt.lookahead>=G&&0Lt.lookahead&&(Lt.match_length=Lt.lookahead)}if(Lt.match_length>=G?(ze=s._tr_tally(Lt,1,Lt.match_length-G),Lt.lookahead-=Lt.match_length,Lt.strstart+=Lt.match_length,Lt.match_length=0):(ze=s._tr_tally(Lt,0,Lt.window[Lt.strstart]),Lt.lookahead--,Lt.strstart++),ze&&(le(Lt,!1),Lt.strm.avail_out===0))return 1}return Lt.insert=0,Ne===4?(le(Lt,!0),Lt.strm.avail_out===0?3:4):Lt.last_lit&&(le(Lt,!1),Lt.strm.avail_out===0)?1:2}(He,Be):n[He.level].func(He,Be);if(at!==3&&at!==4||(He.status=666),at===1||at===3)return De.avail_out===0&&(He.last_flush=-1),w;if(at===2&&(Be===1?s._tr_align(He):Be!==5&&(s._tr_stored_block(He,0,0,!1),Be===3&&(F(He.head),He.lookahead===0&&(He.strstart=0,He.block_start=0,He.insert=0))),re(De),De.avail_out===0))return He.last_flush=-1,w}return Be!==4?w:He.wrap<=0?1:(He.wrap===2?(fe(He,255&De.adler),fe(He,De.adler>>8&255),fe(He,De.adler>>16&255),fe(He,De.adler>>24&255),fe(He,255&De.total_in),fe(He,De.total_in>>8&255),fe(He,De.total_in>>16&255),fe(He,De.total_in>>24&255)):(me(He,De.adler>>>16),me(He,65535&De.adler)),re(De),0=Ve.w_size&&(dn===0&&(F(Ve.head),Ve.strstart=0,Ve.block_start=0,Ve.insert=0),Ne=new o.Buf8(Ve.w_size),o.arraySet(Ne,Be,ze-Ve.w_size,Ve.w_size,0),Be=Ne,ze=Ve.w_size),Ze=De.avail_in,at=De.next_in,Lt=De.input,De.avail_in=ze,De.next_in=0,De.input=Be,Te(Ve);Ve.lookahead>=G;){for(He=Ve.strstart,gt=Ve.lookahead-(G-1);Ve.ins_h=(Ve.ins_h<>>=B=W>>>24,A-=B,(B=W>>>16&255)==0)fe[v++]=65535&W;else{if(!(16&B)){if((64&B)==0){W=z[(65535&W)+(N&(1<>>=B,A-=B),A<15&&(N+=le[c++]<>>=B=W>>>24,A-=B,!(16&(B=W>>>16&255))){if((64&B)==0){W=G[(65535&W)+(N&(1<>>=B,A-=B,(B=v-x)>3,N&=(1<<(A-=q<<3))-1,n.next_in=c,n.next_out=v,n.avail_in=c>>24&255)+(q>>>8&65280)+((65280&q)<<8)+((255&q)<<24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function O(q){var D;return q&&q.state?(D=q.state,q.total_in=q.total_out=D.total=0,q.msg="",D.wrap&&(q.adler=1&D.wrap),D.mode=w,D.last=0,D.havedict=0,D.dmax=32768,D.head=null,D.hold=0,D.bits=0,D.lencode=D.lendyn=new n.Buf32(_),D.distcode=D.distdyn=new n.Buf32(b),D.sane=1,D.back=-1,v):x}function N(q){var D;return q&&q.state?((D=q.state).wsize=0,D.whave=0,D.wnext=0,O(q)):x}function A(q,D){var F,re;return q&&q.state?(re=q.state,D<0?(F=0,D=-D):(F=1+(D>>4),D<48&&(D&=15)),D&&(D<8||15=fe.wsize?(n.arraySet(fe.window,D,F-fe.wsize,fe.wsize,0),fe.wnext=0,fe.whave=fe.wsize):(re<(le=fe.wsize-fe.wnext)&&(le=re),n.arraySet(fe.window,D,F-re,le,fe.wnext),(re-=le)?(n.arraySet(fe.window,D,F-re,re,0),fe.wnext=re,fe.whave=fe.wsize):(fe.wnext+=le,fe.wnext===fe.wsize&&(fe.wnext=0),fe.whave>>8&255,F.check=s(F.check,vt,2,0),Le=ke=0,F.mode=2;break}if(F.flags=0,F.head&&(F.head.done=!1),!(1&F.wrap)||(((255&ke)<<8)+(ke>>8))%31){q.msg="incorrect header check",F.mode=30;break}if((15&ke)!=8){q.msg="unknown compression method",F.mode=30;break}if(Le-=4,at=8+(15&(ke>>>=4)),F.wbits===0)F.wbits=at;else if(at>F.wbits){q.msg="invalid window size",F.mode=30;break}F.dmax=1<>8&1),512&F.flags&&(vt[0]=255&ke,vt[1]=ke>>>8&255,F.check=s(F.check,vt,2,0)),Le=ke=0,F.mode=3;case 3:for(;Le<32;){if(ye===0)break e;ye--,ke+=re[fe++]<>>8&255,vt[2]=ke>>>16&255,vt[3]=ke>>>24&255,F.check=s(F.check,vt,4,0)),Le=ke=0,F.mode=4;case 4:for(;Le<16;){if(ye===0)break e;ye--,ke+=re[fe++]<>8),512&F.flags&&(vt[0]=255&ke,vt[1]=ke>>>8&255,F.check=s(F.check,vt,2,0)),Le=ke=0,F.mode=5;case 5:if(1024&F.flags){for(;Le<16;){if(ye===0)break e;ye--,ke+=re[fe++]<>>8&255,F.check=s(F.check,vt,2,0)),Le=ke=0}else F.head&&(F.head.extra=null);F.mode=6;case 6:if(1024&F.flags&&(ye<(Ue=F.length)&&(Ue=ye),Ue&&(F.head&&(at=F.head.extra_len-F.length,F.head.extra||(F.head.extra=new Array(F.head.extra_len)),n.arraySet(F.head.extra,re,fe,Ue,at)),512&F.flags&&(F.check=s(F.check,re,Ue,fe)),ye-=Ue,fe+=Ue,F.length-=Ue),F.length))break e;F.length=0,F.mode=7;case 7:if(2048&F.flags){if(ye===0)break e;for(Ue=0;at=re[fe+Ue++],F.head&&at&&F.length<65536&&(F.head.name+=String.fromCharCode(at)),at&&Ue>9&1,F.head.done=!0),q.adler=F.check=0,F.mode=12;break;case 10:for(;Le<32;){if(ye===0)break e;ye--,ke+=re[fe++]<>>=7&Le,Le-=7&Le,F.mode=27;break}for(;Le<3;){if(ye===0)break e;ye--,ke+=re[fe++]<>>=1)){case 0:F.mode=14;break;case 1:if(W(F),F.mode=20,D!==6)break;ke>>>=2,Le-=2;break e;case 2:F.mode=17;break;case 3:q.msg="invalid block type",F.mode=30}ke>>>=2,Le-=2;break;case 14:for(ke>>>=7&Le,Le-=7&Le;Le<32;){if(ye===0)break e;ye--,ke+=re[fe++]<>>16^65535)){q.msg="invalid stored block lengths",F.mode=30;break}if(F.length=65535&ke,Le=ke=0,F.mode=15,D===6)break e;case 15:F.mode=16;case 16:if(Ue=F.length){if(ye>>=5,Le-=5,F.ndist=1+(31&ke),ke>>>=5,Le-=5,F.ncode=4+(15&ke),ke>>>=4,Le-=4,286>>=3,Le-=3}for(;F.have<19;)F.lens[Ft[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,Ne={bits:F.lenbits},Lt=l(0,F.lens,0,19,F.lencode,0,F.work,Ne),F.lenbits=Ne.bits,Lt){q.msg="invalid code lengths set",F.mode=30;break}F.have=0,F.mode=19;case 19:for(;F.have>>16&255,He=65535&Ke,!((Be=Ke>>>24)<=Le);){if(ye===0)break e;ye--,ke+=re[fe++]<>>=Be,Le-=Be,F.lens[F.have++]=He;else{if(He===16){for(ze=Be+2;Le>>=Be,Le-=Be,F.have===0){q.msg="invalid bit length repeat",F.mode=30;break}at=F.lens[F.have-1],Ue=3+(3&ke),ke>>>=2,Le-=2}else if(He===17){for(ze=Be+3;Le>>=Be)),ke>>>=3,Le-=3}else{for(ze=Be+7;Le>>=Be)),ke>>>=7,Le-=7}if(F.have+Ue>F.nlen+F.ndist){q.msg="invalid bit length repeat",F.mode=30;break}for(;Ue--;)F.lens[F.have++]=at}}if(F.mode===30)break;if(F.lens[256]===0){q.msg="invalid code -- missing end-of-block",F.mode=30;break}if(F.lenbits=9,Ne={bits:F.lenbits},Lt=l(1,F.lens,0,F.nlen,F.lencode,0,F.work,Ne),F.lenbits=Ne.bits,Lt){q.msg="invalid literal/lengths set",F.mode=30;break}if(F.distbits=6,F.distcode=F.distdyn,Ne={bits:F.distbits},Lt=l(2,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,Ne),F.distbits=Ne.bits,Lt){q.msg="invalid distances set",F.mode=30;break}if(F.mode=20,D===6)break e;case 20:F.mode=21;case 21:if(6<=ye&&258<=Te){q.next_out=me,q.avail_out=Te,q.next_in=fe,q.avail_in=ye,F.hold=ke,F.bits=Le,c(q,it),me=q.next_out,le=q.output,Te=q.avail_out,fe=q.next_in,re=q.input,ye=q.avail_in,ke=F.hold,Le=F.bits,F.mode===12&&(F.back=-1);break}for(F.back=0;Ve=(Ke=F.lencode[ke&(1<>>16&255,He=65535&Ke,!((Be=Ke>>>24)<=Le);){if(ye===0)break e;ye--,ke+=re[fe++]<>gt)])>>>16&255,He=65535&Ke,!(gt+(Be=Ke>>>24)<=Le);){if(ye===0)break e;ye--,ke+=re[fe++]<>>=gt,Le-=gt,F.back+=gt}if(ke>>>=Be,Le-=Be,F.back+=Be,F.length=He,Ve===0){F.mode=26;break}if(32&Ve){F.back=-1,F.mode=12;break}if(64&Ve){q.msg="invalid literal/length code",F.mode=30;break}F.extra=15&Ve,F.mode=22;case 22:if(F.extra){for(ze=F.extra;Le>>=F.extra,Le-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=23;case 23:for(;Ve=(Ke=F.distcode[ke&(1<>>16&255,He=65535&Ke,!((Be=Ke>>>24)<=Le);){if(ye===0)break e;ye--,ke+=re[fe++]<>gt)])>>>16&255,He=65535&Ke,!(gt+(Be=Ke>>>24)<=Le);){if(ye===0)break e;ye--,ke+=re[fe++]<>>=gt,Le-=gt,F.back+=gt}if(ke>>>=Be,Le-=Be,F.back+=Be,64&Ve){q.msg="invalid distance code",F.mode=30;break}F.offset=He,F.extra=15&Ve,F.mode=24;case 24:if(F.extra){for(ze=F.extra;Le>>=F.extra,Le-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){q.msg="invalid distance too far back",F.mode=30;break}F.mode=25;case 25:if(Te===0)break e;if(Ue=it-Te,F.offset>Ue){if((Ue=F.offset-Ue)>F.whave&&F.sane){q.msg="invalid distance too far back",F.mode=30;break}ht=Ue>F.wnext?(Ue-=F.wnext,F.wsize-Ue):F.wnext-Ue,Ue>F.length&&(Ue=F.length),De=F.window}else De=le,ht=me-F.offset,Ue=F.length;for(Tene?(B=Be[Ve+I[re]],it[Ue+I[re]]):(B=96,0),N=1<>Te)+(A-=N)]=W<<24|B<<16|q|0,A!==0;);for(N=1<>=1;if(N!==0?(et&=N-1,et+=N):et=0,re++,--ht[F]==0){if(F===fe)break;F=x[w+I[re]]}if(me>>7)]}function F(Ve,He){Ve.pending_buf[Ve.pending++]=255&He,Ve.pending_buf[Ve.pending++]=He>>>8&255}function re(Ve,He,gt){Ve.bi_valid>x-gt?(Ve.bi_buf|=He<>x-Ve.bi_valid,Ve.bi_valid+=gt-x):(Ve.bi_buf|=He<>>=1,gt<<=1,0<--He;);return gt>>>1}function me(Ve,He,gt){var dn,Ze,at=new Array(v+1),Lt=0;for(dn=1;dn<=v;dn++)at[dn]=Lt=Lt+gt[dn-1]<<1;for(Ze=0;Ze<=He;Ze++){var Ne=Ve[2*Ze+1];Ne!==0&&(Ve[2*Ze]=fe(at[Ne]++,Ne))}}function ye(Ve){var He;for(He=0;He>1;1<=gt;gt--)Le(Ve,at,gt);for(Ze=ze;gt=Ve.heap[1],Ve.heap[1]=Ve.heap[Ve.heap_len--],Le(Ve,at,1),dn=Ve.heap[1],Ve.heap[--Ve.heap_max]=gt,Ve.heap[--Ve.heap_max]=dn,at[2*Ze]=at[2*gt]+at[2*dn],Ve.depth[Ze]=(Ve.depth[gt]>=Ve.depth[dn]?Ve.depth[gt]:Ve.depth[dn])+1,at[2*gt+1]=at[2*dn+1]=Ze,Ve.heap[1]=Ze++,Le(Ve,at,1),2<=Ve.heap_len;);Ve.heap[--Ve.heap_max]=Ve.heap[1],function(vt,Ft){var Ot,_t,Tn,on,$n,Zt,Et=Ft.dyn_tree,rn=Ft.max_code,wt=Ft.stat_desc.static_tree,Yn=Ft.stat_desc.has_stree,pt=Ft.stat_desc.extra_bits,Fe=Ft.stat_desc.extra_base,Ie=Ft.stat_desc.max_length,ct=0;for(on=0;on<=v;on++)vt.bl_count[on]=0;for(Et[2*vt.heap[vt.heap_max]+1]=0,Ot=vt.heap_max+1;Ot<573;Ot++)Ie<(on=Et[2*Et[2*(_t=vt.heap[Ot])+1]+1]+1)&&(on=Ie,ct++),Et[2*_t+1]=on,rn<_t||(vt.bl_count[on]++,$n=0,Fe<=_t&&($n=pt[_t-Fe]),Zt=Et[2*_t],vt.opt_len+=Zt*(on+$n),Yn&&(vt.static_len+=Zt*(wt[2*_t+1]+$n)));if(ct!==0){do{for(on=Ie-1;vt.bl_count[on]===0;)on--;vt.bl_count[on]--,vt.bl_count[on+1]+=2,vt.bl_count[Ie]--,ct-=2}while(0>=7;Ze>>=1)if(1&Ke&&Ne.dyn_ltree[2*ze]!==0)return 0;if(Ne.dyn_ltree[18]!==0||Ne.dyn_ltree[20]!==0||Ne.dyn_ltree[26]!==0)return 1;for(ze=32;ze>>3,(at=Ve.static_len+3+7>>>3)<=Ze&&(Ze=at)):Ze=at=gt+5,gt+4<=Ze&&He!==-1?Be(Ve,He,gt,dn):Ve.strategy===4||at===Ze?(re(Ve,2+(dn?1:0),3),et(Ve,I,O)):(re(Ve,4+(dn?1:0),3),function(Ne,ze,Ke,vt){var Ft;for(re(Ne,ze-257,5),re(Ne,Ke-1,5),re(Ne,vt-4,4),Ft=0;Ft>>8&255,Ve.pending_buf[Ve.d_buf+2*Ve.last_lit+1]=255&He,Ve.pending_buf[Ve.l_buf+Ve.last_lit]=255>,Ve.last_lit++,He===0?Ve.dyn_ltree[2*gt]++:(Ve.matches++,He--,Ve.dyn_ltree[2*(A[gt]+s+1)]++,Ve.dyn_dtree[2*D(He)]++),Ve.last_lit===Ve.lit_bufsize-1},r._tr_align=function(Ve){var He;re(Ve,2,3),le(Ve,256,I),(He=Ve).bi_valid===16?(F(He,He.bi_buf),He.bi_buf=0,He.bi_valid=0):8<=He.bi_valid&&(He.pending_buf[He.pending++]=255&He.bi_buf,He.bi_buf>>=8,He.bi_valid-=8)}},{"../utils/common":4}],16:[function(t,e,r){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],17:[function(t,e,r){var n=t("three");n.OrbitControls=function(o,s){var c,l,v,x,w;s===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),s===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=o,this.domElement=s,this.enabled=!0,this.target=new n.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:n.MOUSE.ROTATE,MIDDLE:n.MOUSE.DOLLY,RIGHT:n.MOUSE.PAN},this.touches={ONE:n.TOUCH.ROTATE,TWO:n.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return z.phi},this.getAzimuthalAngle=function(){return z.theta},this.saveState=function(){_.target0.copy(_.target),_.position0.copy(_.object.position),_.zoom0=_.object.zoom},this.resetStatusValue=function(){N=O.NONE},this.reset=function(){_.target.copy(_.target0),_.object.position.copy(_.position0),_.object.zoom=_.zoom0,_.object.updateProjectionMatrix(),_.dispatchEvent(b),_.update(),N=O.NONE},this.update=(c=new n.Vector3,l=new n.Quaternion().setFromUnitVectors(o.up,new n.Vector3(0,1,0)),v=l.clone().inverse(),x=new n.Vector3,w=new n.Quaternion,function(){var Et=_.object.position;return c.copy(Et).sub(_.target),c.applyQuaternion(l),z.setFromVector3(c),_.autoRotate&&N===O.NONE&&ke(2*Math.PI/60/60*_.autoRotateSpeed),_.enableDamping?(z.theta+=G.theta*_.dampingFactor,z.phi+=G.phi*_.dampingFactor):(z.theta+=G.theta,z.phi+=G.phi),z.theta=Math.max(_.minAzimuthAngle,Math.min(_.maxAzimuthAngle,z.theta)),z.phi=Math.max(_.minPolarAngle,Math.min(_.maxPolarAngle,z.phi)),z.makeSafe(),z.radius*=V,z.radius=Math.max(_.minDistance,Math.min(_.maxDistance,z.radius)),_.enableDamping===!0?_.target.addScaledVector(ne,_.dampingFactor):_.target.add(ne),c.setFromSpherical(z),c.applyQuaternion(v),Et.copy(_.target).add(c),_.object.lookAt(_.target),_.enableDamping===!0?(G.theta*=1-_.dampingFactor,G.phi*=1-_.dampingFactor,ne.multiplyScalar(1-_.dampingFactor)):(G.set(0,0,0),ne.set(0,0,0)),V=1,!(!(W||x.distanceToSquared(_.object.position)>A||8*(1-w.dot(_.object.quaternion))>A)||(_.dispatchEvent(b),x.copy(_.object.position),w.copy(_.object.quaternion),W=!1))}),this.dispose=function(){_.domElement.removeEventListener("contextmenu",Zt,!1),_.domElement.removeEventListener("mousedown",Ke,!1),_.domElement.removeEventListener("wheel",Ot,!1),_.domElement.removeEventListener("touchstart",Tn,!1),_.domElement.removeEventListener("touchend",$n,!1),_.domElement.removeEventListener("touchmove",on,!1),document.removeEventListener("mousemove",vt,!1),document.removeEventListener("mouseup",Ft,!1),_.domElement.removeEventListener("keydown",_t,!1)};var _=this,b={type:"change"},E={type:"start"},I={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},N=O.NONE,A=1e-6,z=new n.Spherical,G=new n.Spherical,V=1,ne=new n.Vector3,W=!1,B=new n.Vector2,q=new n.Vector2,D=new n.Vector2,F=new n.Vector2,re=new n.Vector2,le=new n.Vector2,fe=new n.Vector2,me=new n.Vector2,ye=new n.Vector2;function Te(){return Math.pow(.95,_.zoomSpeed)}function ke(Et){G.theta-=Et}function Le(Et){G.phi-=Et}var et,it,Ue,ht=(et=new n.Vector3,function(Et,rn){et.setFromMatrixColumn(rn,0),et.multiplyScalar(-Et),ne.add(et)}),De=(it=new n.Vector3,function(Et,rn){_.screenSpacePanning===!0?it.setFromMatrixColumn(rn,1):(it.setFromMatrixColumn(rn,0),it.crossVectors(_.object.up,it)),it.multiplyScalar(Et),ne.add(it)}),Be=(Ue=new n.Vector3,function(Et,rn){var wt=_.domElement;if(_.object.isPerspectiveCamera){var Yn=_.object.position;Ue.copy(Yn).sub(_.target);var pt=Ue.length();pt*=Math.tan(_.object.fov/2*Math.PI/180),ht(2*Et*pt/wt.clientHeight,_.object.matrix),De(2*rn*pt/wt.clientHeight,_.object.matrix)}else _.object.isOrthographicCamera?(ht(Et*(_.object.right-_.object.left)/_.object.zoom/wt.clientWidth,_.object.matrix),De(rn*(_.object.top-_.object.bottom)/_.object.zoom/wt.clientHeight,_.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),_.enablePan=!1)});function Ve(Et){_.object.isPerspectiveCamera?V/=Et:_.object.isOrthographicCamera?(_.object.zoom=Math.max(_.minZoom,Math.min(_.maxZoom,_.object.zoom*Et)),_.object.updateProjectionMatrix(),W=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),_.enableZoom=!1)}function He(Et){B.set(Et.clientX,Et.clientY)}function gt(Et){F.set(Et.clientX,Et.clientY)}function dn(Et){if(Et.touches.length==1)B.set(Et.touches[0].pageX,Et.touches[0].pageY);else{var rn=.5*(Et.touches[0].pageX+Et.touches[1].pageX),wt=.5*(Et.touches[0].pageY+Et.touches[1].pageY);B.set(rn,wt)}}function Ze(Et){if(Et.touches.length==1)F.set(Et.touches[0].pageX,Et.touches[0].pageY);else{var rn=.5*(Et.touches[0].pageX+Et.touches[1].pageX),wt=.5*(Et.touches[0].pageY+Et.touches[1].pageY);F.set(rn,wt)}}function at(Et){var rn=Et.touches[0].pageX-Et.touches[1].pageX,wt=Et.touches[0].pageY-Et.touches[1].pageY,Yn=Math.sqrt(rn*rn+wt*wt);fe.set(0,Yn)}function Lt(Et){if(Et.touches.length==1)q.set(Et.touches[0].pageX,Et.touches[0].pageY);else{var rn=.5*(Et.touches[0].pageX+Et.touches[1].pageX),wt=.5*(Et.touches[0].pageY+Et.touches[1].pageY);q.set(rn,wt)}D.subVectors(q,B).multiplyScalar(_.rotateSpeed);var Yn=_.domElement;ke(2*Math.PI*D.x/Yn.clientHeight),Le(2*Math.PI*D.y/Yn.clientHeight),B.copy(q)}function Ne(Et){if(Et.touches.length==1)re.set(Et.touches[0].pageX,Et.touches[0].pageY);else{var rn=.5*(Et.touches[0].pageX+Et.touches[1].pageX),wt=.5*(Et.touches[0].pageY+Et.touches[1].pageY);re.set(rn,wt)}le.subVectors(re,F).multiplyScalar(_.panSpeed),Be(le.x,le.y),F.copy(re)}function ze(Et){var rn=Et.touches[0].pageX-Et.touches[1].pageX,wt=Et.touches[0].pageY-Et.touches[1].pageY,Yn=Math.sqrt(rn*rn+wt*wt);me.set(0,Yn),ye.set(0,Math.pow(me.y/fe.y,_.zoomSpeed)),Ve(ye.y),fe.copy(me)}function Ke(Et){if(_.enabled!==!1){switch(Et.preventDefault(),_.domElement.focus?_.domElement.focus():window.focus(),Et.button){case 0:switch(_.mouseButtons.LEFT){case n.MOUSE.ROTATE:if(Et.ctrlKey||Et.metaKey||Et.shiftKey){if(_.enablePan===!1)return;gt(Et),N=O.PAN}else{if(_.enableRotate===!1)return;He(Et),N=O.ROTATE}break;case n.MOUSE.PAN:if(Et.ctrlKey||Et.metaKey||Et.shiftKey){if(_.enableRotate===!1)return;He(Et),N=O.ROTATE}else{if(_.enablePan===!1)return;gt(Et),N=O.PAN}break;default:N=O.NONE}break;case 1:switch(_.mouseButtons.MIDDLE){case n.MOUSE.DOLLY:if(_.enableZoom===!1)return;rn=Et,fe.set(rn.clientX,rn.clientY),N=O.DOLLY;break;case n.MOUSE.PAN:if(_.enablePan===!1)return;gt(Et),N=O.PAN;break;default:N=O.NONE}break;case 2:switch(_.mouseButtons.RIGHT){case n.MOUSE.ROTATE:if(_.enableRotate===!1)return;He(Et),N=O.ROTATE;break;case n.MOUSE.PAN:if(_.enablePan===!1)return;gt(Et),N=O.PAN;break;default:N=O.NONE}}var rn;N!==O.NONE&&(document.addEventListener("mousemove",vt,!1),document.addEventListener("mouseup",Ft,!1),_.dispatchEvent(E))}}function vt(Et){var rn;if(_.enabled!==!1)switch(Et.preventDefault(),N){case O.ROTATE:if(_.enableRotate===!1)return;(function(wt){q.set(wt.clientX,wt.clientY),D.subVectors(q,B).multiplyScalar(_.rotateSpeed);var Yn=_.domElement;ke(2*Math.PI*D.x/Yn.clientHeight),Le(2*Math.PI*D.y/Yn.clientHeight),B.copy(q),_.update()})(Et);break;case O.DOLLY:if(_.enableZoom===!1)return;(function(wt){var Yn;me.set(wt.clientX,wt.clientY),ye.subVectors(me,fe),0_.far||b.push({distance:ye,point:z.clone().applyMatrix4(this.matrixWorld),index:D,face:null,faceIndex:null,object:this}))}else for(D=0,F=(q=W.position.array).length/3-1;D_.far||b.push({distance:ye,point:z.clone().applyMatrix4(this.matrixWorld),index:D,face:null,faceIndex:null,object:this}))}else if(O instanceof l.Geometry){var fe=O.vertices,me=fe.length;for(D=0;D_.far||b.push({distance:ye,point:z.clone().applyMatrix4(this.matrixWorld),index:D,face:null,faceIndex:null,object:this}))}}}}),v.prototype.compareV3=function(_,b){var E=6*_,I=6*b;return this.positions[E]===this.positions[I]&&this.positions[1+E]===this.positions[1+I]&&this.positions[2+E]===this.positions[2+I]},v.prototype.copyV3=function(_){var b=6*_;return[this.positions[b],this.positions[1+b],this.positions[2+b]]},v.prototype.process=function(){var _,b,E=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];for(var I=0;I>8&255]+ys[u>>16&255]+ys[u>>24&255]+"-"+ys[255&g]+ys[g>>8&255]+"-"+ys[g>>16&15|64]+ys[g>>24&255]+"-"+ys[63&C|128]+ys[C>>8&255]+"-"+ys[C>>16&255]+ys[C>>24&255]+ys[255&L]+ys[L>>8&255]+ys[L>>16&255]+ys[L>>24&255]).toUpperCase()},clamp:function(u,g,C){return Math.max(g,Math.min(C,u))},euclideanModulo:function(u,g){return(u%g+g)%g},mapLinear:function(u,g,C,L,K){return L+(u-g)*(K-L)/(C-g)},lerp:function(u,g,C){return(1-C)*u+C*g},smoothstep:function(u,g,C){return u<=g?0:C<=u?1:(u=(u-g)/(C-g))*u*(3-2*u)},smootherstep:function(u,g,C){return u<=g?0:C<=u?1:(u=(u-g)/(C-g))*u*u*(u*(6*u-15)+10)},randInt:function(u,g){return u+Math.floor(Math.random()*(g-u+1))},randFloat:function(u,g){return u+Math.random()*(g-u)},randFloatSpread:function(u){return u*(.5-Math.random())},degToRad:function(u){return u*Ta.DEG2RAD},radToDeg:function(u){return u*Ta.RAD2DEG},isPowerOfTwo:function(u){return(u&u-1)==0&&u!==0},ceilPowerOfTwo:function(u){return Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},floorPowerOfTwo:function(u){return Math.pow(2,Math.floor(Math.log(u)/Math.LN2))},setQuaternionFromProperEuler:function(u,g,C,L,K){var ie=Math.cos,ce=Math.sin,ge=ie(C/2),Ee=ce(C/2),Ae=ie((g+L)/2),We=ce((g+L)/2),tt=ie((g-L)/2),ot=ce((g-L)/2),Oe=ie((L-g)/2),mt=ce((L-g)/2);K==="XYX"?u.set(ge*We,Ee*tt,Ee*ot,ge*Ae):K==="YZY"?u.set(Ee*ot,ge*We,Ee*tt,ge*Ae):K==="ZXZ"?u.set(Ee*tt,Ee*ot,ge*We,ge*Ae):K==="XZX"?u.set(ge*We,Ee*mt,Ee*Oe,ge*Ae):K==="YXY"?u.set(Ee*Oe,ge*We,Ee*mt,ge*Ae):K==="ZYZ"?u.set(Ee*mt,Ee*Oe,ge*We,ge*Ae):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function Lr(u,g){this.x=u||0,this.y=g||0}function Vo(){this.elements=[1,0,0,0,1,0,0,0,1],0Number.EPSILON){var An=Math.sqrt(fn),zn=Math.atan2(An,At*nn);Tt=Math.sin(Tt*zn)/An,ce=Math.sin(ce*zn)/An}var Dn=ce*nn;if(ge=ge*Tt+tt*Dn,Ee=Ee*Tt+ot*Dn,Ae=Ae*Tt+Oe*Dn,We=We*Tt+mt*Dn,Tt===1-ce){var Qn=1/Math.sqrt(ge*ge+Ee*Ee+Ae*Ae+We*We);ge*=Qn,Ee*=Qn,Ae*=Qn,We*=Qn}}u[g]=ge,u[g+1]=Ee,u[g+2]=Ae,u[g+3]=We}}),Object.defineProperties(Zo.prototype,{x:{get:function(){return this._x},set:function(u){this._x=u,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(u){this._y=u,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(u){this._z=u,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(u){this._w=u,this._onChangeCallback()}}}),Object.assign(Zo.prototype,{isQuaternion:!0,set:function(u,g,C,L){return this._x=u,this._y=g,this._z=C,this._w=L,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(u){return this._x=u.x,this._y=u.y,this._z=u.z,this._w=u.w,this._onChangeCallback(),this},setFromEuler:function(u,g){if(!u||!u.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var C=u._x,L=u._y,K=u._z,ie=u.order,ce=Math.cos,ge=Math.sin,Ee=ce(C/2),Ae=ce(L/2),We=ce(K/2),tt=ge(C/2),ot=ge(L/2),Oe=ge(K/2);return ie==="XYZ"?(this._x=tt*Ae*We+Ee*ot*Oe,this._y=Ee*ot*We-tt*Ae*Oe,this._z=Ee*Ae*Oe+tt*ot*We,this._w=Ee*Ae*We-tt*ot*Oe):ie==="YXZ"?(this._x=tt*Ae*We+Ee*ot*Oe,this._y=Ee*ot*We-tt*Ae*Oe,this._z=Ee*Ae*Oe-tt*ot*We,this._w=Ee*Ae*We+tt*ot*Oe):ie==="ZXY"?(this._x=tt*Ae*We-Ee*ot*Oe,this._y=Ee*ot*We+tt*Ae*Oe,this._z=Ee*Ae*Oe+tt*ot*We,this._w=Ee*Ae*We-tt*ot*Oe):ie==="ZYX"?(this._x=tt*Ae*We-Ee*ot*Oe,this._y=Ee*ot*We+tt*Ae*Oe,this._z=Ee*Ae*Oe-tt*ot*We,this._w=Ee*Ae*We+tt*ot*Oe):ie==="YZX"?(this._x=tt*Ae*We+Ee*ot*Oe,this._y=Ee*ot*We+tt*Ae*Oe,this._z=Ee*Ae*Oe-tt*ot*We,this._w=Ee*Ae*We-tt*ot*Oe):ie==="XZY"&&(this._x=tt*Ae*We-Ee*ot*Oe,this._y=Ee*ot*We-tt*Ae*Oe,this._z=Ee*Ae*Oe+tt*ot*We,this._w=Ee*Ae*We+tt*ot*Oe),g!==!1&&this._onChangeCallback(),this},setFromAxisAngle:function(u,g){var C=g/2,L=Math.sin(C);return this._x=u.x*L,this._y=u.y*L,this._z=u.z*L,this._w=Math.cos(C),this._onChangeCallback(),this},setFromRotationMatrix:function(u){var g,C=u.elements,L=C[0],K=C[4],ie=C[8],ce=C[1],ge=C[5],Ee=C[9],Ae=C[2],We=C[6],tt=C[10],ot=L+ge+tt;return 0Math.abs(u.z)?(this._x=-u.y,this._y=u.x,this._z=0):(this._x=0,this._y=-u.z,this._z=u.y)):(this._x=u.y*g.z-u.z*g.y,this._y=u.z*g.x-u.x*g.z,this._z=u.x*g.y-u.y*g.x),this._w=C,this.normalize()},angleTo:function(u){return 2*Math.acos(Math.abs(Ta.clamp(this.dot(u),-1,1)))},rotateTowards:function(u,g){var C=this.angleTo(u);if(C===0)return this;var L=Math.min(1,g/C);return this.slerp(u,L),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(u){return this._x*u._x+this._y*u._y+this._z*u._z+this._w*u._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var u=this.length();return u===0?(this._x=0,this._y=0,this._z=0,this._w=1):(u=1/u,this._x=this._x*u,this._y=this._y*u,this._z=this._z*u,this._w=this._w*u),this._onChangeCallback(),this},multiply:function(u,g){return g!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(u,g)):this.multiplyQuaternions(this,u)},premultiply:function(u){return this.multiplyQuaternions(u,this)},multiplyQuaternions:function(u,g){var C=u._x,L=u._y,K=u._z,ie=u._w,ce=g._x,ge=g._y,Ee=g._z,Ae=g._w;return this._x=C*Ae+ie*ce+L*Ee-K*ge,this._y=L*Ae+ie*ge+K*ce-C*Ee,this._z=K*Ae+ie*Ee+C*ge-L*ce,this._w=ie*Ae-C*ce-L*ge-K*Ee,this._onChangeCallback(),this},slerp:function(u,g){if(g===0)return this;if(g===1)return this.copy(u);var C=this._x,L=this._y,K=this._z,ie=this._w,ce=ie*u._w+C*u._x+L*u._y+K*u._z;if(ce<0?(this._w=-u._w,this._x=-u._x,this._y=-u._y,this._z=-u._z,ce=-ce):this.copy(u),1<=ce)return this._w=ie,this._x=C,this._y=L,this._z=K,this;var ge=1-ce*ce;if(ge<=Number.EPSILON){var Ee=1-g;return this._w=Ee*ie+g*this._w,this._x=Ee*C+g*this._x,this._y=Ee*L+g*this._y,this._z=Ee*K+g*this._z,this.normalize(),this._onChangeCallback(),this}var Ae=Math.sqrt(ge),We=Math.atan2(Ae,ce),tt=Math.sin((1-g)*We)/Ae,ot=Math.sin(g*We)/Ae;return this._w=ie*tt+this._w*ot,this._x=C*tt+this._x*ot,this._y=L*tt+this._y*ot,this._z=K*tt+this._z*ot,this._onChangeCallback(),this},equals:function(u){return u._x===this._x&&u._y===this._y&&u._z===this._z&&u._w===this._w},fromArray:function(u,g){return g===void 0&&(g=0),this._x=u[g],this._y=u[g+1],this._z=u[g+2],this._w=u[g+3],this._onChangeCallback(),this},toArray:function(u,g){return u===void 0&&(u=[]),g===void 0&&(g=0),u[g]=this._x,u[g+1]=this._y,u[g+2]=this._z,u[g+3]=this._w,u},_onChange:function(u){return this._onChangeCallback=u,this},_onChangeCallback:function(){}});var ql=new Kt,Al=new Zo;function Kt(u,g,C){this.x=u||0,this.y=g||0,this.z=C||0}Object.assign(Kt.prototype,{isVector3:!0,set:function(u,g,C){return this.x=u,this.y=g,this.z=C,this},setScalar:function(u){return this.x=u,this.y=u,this.z=u,this},setX:function(u){return this.x=u,this},setY:function(u){return this.y=u,this},setZ:function(u){return this.z=u,this},setComponent:function(u,g){switch(u){case 0:this.x=g;break;case 1:this.y=g;break;case 2:this.z=g;break;default:throw new Error("index is out of range: "+u)}return this},getComponent:function(u){switch(u){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+u)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(u){return this.x=u.x,this.y=u.y,this.z=u.z,this},add:function(u,g){return g!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(u,g)):(this.x+=u.x,this.y+=u.y,this.z+=u.z,this)},addScalar:function(u){return this.x+=u,this.y+=u,this.z+=u,this},addVectors:function(u,g){return this.x=u.x+g.x,this.y=u.y+g.y,this.z=u.z+g.z,this},addScaledVector:function(u,g){return this.x+=u.x*g,this.y+=u.y*g,this.z+=u.z*g,this},sub:function(u,g){return g!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(u,g)):(this.x-=u.x,this.y-=u.y,this.z-=u.z,this)},subScalar:function(u){return this.x-=u,this.y-=u,this.z-=u,this},subVectors:function(u,g){return this.x=u.x-g.x,this.y=u.y-g.y,this.z=u.z-g.z,this},multiply:function(u,g){return g!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(u,g)):(this.x*=u.x,this.y*=u.y,this.z*=u.z,this)},multiplyScalar:function(u){return this.x*=u,this.y*=u,this.z*=u,this},multiplyVectors:function(u,g){return this.x=u.x*g.x,this.y=u.y*g.y,this.z=u.z*g.z,this},applyEuler:function(u){return u&&u.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Al.setFromEuler(u))},applyAxisAngle:function(u,g){return this.applyQuaternion(Al.setFromAxisAngle(u,g))},applyMatrix3:function(u){var g=this.x,C=this.y,L=this.z,K=u.elements;return this.x=K[0]*g+K[3]*C+K[6]*L,this.y=K[1]*g+K[4]*C+K[7]*L,this.z=K[2]*g+K[5]*C+K[8]*L,this},applyNormalMatrix:function(u){return this.applyMatrix3(u).normalize()},applyMatrix4:function(u){var g=this.x,C=this.y,L=this.z,K=u.elements,ie=1/(K[3]*g+K[7]*C+K[11]*L+K[15]);return this.x=(K[0]*g+K[4]*C+K[8]*L+K[12])*ie,this.y=(K[1]*g+K[5]*C+K[9]*L+K[13])*ie,this.z=(K[2]*g+K[6]*C+K[10]*L+K[14])*ie,this},applyQuaternion:function(u){var g=this.x,C=this.y,L=this.z,K=u.x,ie=u.y,ce=u.z,ge=u.w,Ee=ge*g+ie*L-ce*C,Ae=ge*C+ce*g-K*L,We=ge*L+K*C-ie*g,tt=-K*g-ie*C-ce*L;return this.x=Ee*ge+tt*-K+Ae*-ce-We*-ie,this.y=Ae*ge+tt*-ie+We*-K-Ee*-ce,this.z=We*ge+tt*-ce+Ee*-ie-Ae*-K,this},project:function(u){return this.applyMatrix4(u.matrixWorldInverse).applyMatrix4(u.projectionMatrix)},unproject:function(u){return this.applyMatrix4(u.projectionMatrixInverse).applyMatrix4(u.matrixWorld)},transformDirection:function(u){var g=this.x,C=this.y,L=this.z,K=u.elements;return this.x=K[0]*g+K[4]*C+K[8]*L,this.y=K[1]*g+K[5]*C+K[9]*L,this.z=K[2]*g+K[6]*C+K[10]*L,this.normalize()},divide:function(u){return this.x/=u.x,this.y/=u.y,this.z/=u.z,this},divideScalar:function(u){return this.multiplyScalar(1/u)},min:function(u){return this.x=Math.min(this.x,u.x),this.y=Math.min(this.y,u.y),this.z=Math.min(this.z,u.z),this},max:function(u){return this.x=Math.max(this.x,u.x),this.y=Math.max(this.y,u.y),this.z=Math.max(this.z,u.z),this},clamp:function(u,g){return this.x=Math.max(u.x,Math.min(g.x,this.x)),this.y=Math.max(u.y,Math.min(g.y,this.y)),this.z=Math.max(u.z,Math.min(g.z,this.z)),this},clampScalar:function(u,g){return this.x=Math.max(u,Math.min(g,this.x)),this.y=Math.max(u,Math.min(g,this.y)),this.z=Math.max(u,Math.min(g,this.z)),this},clampLength:function(u,g){var C=this.length();return this.divideScalar(C||1).multiplyScalar(Math.max(u,Math.min(g,C)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(u){return this.x*u.x+this.y*u.y+this.z*u.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(u){return this.normalize().multiplyScalar(u)},lerp:function(u,g){return this.x+=(u.x-this.x)*g,this.y+=(u.y-this.y)*g,this.z+=(u.z-this.z)*g,this},lerpVectors:function(u,g,C){return this.subVectors(g,u).multiplyScalar(C).add(u)},cross:function(u,g){return g!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(u,g)):this.crossVectors(this,u)},crossVectors:function(u,g){var C=u.x,L=u.y,K=u.z,ie=g.x,ce=g.y,ge=g.z;return this.x=L*ge-K*ce,this.y=K*ie-C*ge,this.z=C*ce-L*ie,this},projectOnVector:function(u){var g=u.lengthSq();if(g===0)return this.set(0,0,0);var C=u.dot(this)/g;return this.copy(u).multiplyScalar(C)},projectOnPlane:function(u){return ql.copy(this).projectOnVector(u),this.sub(ql)},reflect:function(u){return this.sub(ql.copy(u).multiplyScalar(2*this.dot(u)))},angleTo:function(u){var g=Math.sqrt(this.lengthSq()*u.lengthSq());if(g===0)return Math.PI/2;var C=this.dot(u)/g;return Math.acos(Ta.clamp(C,-1,1))},distanceTo:function(u){return Math.sqrt(this.distanceToSquared(u))},distanceToSquared:function(u){var g=this.x-u.x,C=this.y-u.y,L=this.z-u.z;return g*g+C*C+L*L},manhattanDistanceTo:function(u){return Math.abs(this.x-u.x)+Math.abs(this.y-u.y)+Math.abs(this.z-u.z)},setFromSpherical:function(u){return this.setFromSphericalCoords(u.radius,u.phi,u.theta)},setFromSphericalCoords:function(u,g,C){var L=Math.sin(g)*u;return this.x=L*Math.sin(C),this.y=Math.cos(g)*u,this.z=L*Math.cos(C),this},setFromCylindrical:function(u){return this.setFromCylindricalCoords(u.radius,u.theta,u.y)},setFromCylindricalCoords:function(u,g,C){return this.x=u*Math.sin(g),this.y=C,this.z=u*Math.cos(g),this},setFromMatrixPosition:function(u){var g=u.elements;return this.x=g[12],this.y=g[13],this.z=g[14],this},setFromMatrixScale:function(u){var g=this.setFromMatrixColumn(u,0).length(),C=this.setFromMatrixColumn(u,1).length(),L=this.setFromMatrixColumn(u,2).length();return this.x=g,this.y=C,this.z=L,this},setFromMatrixColumn:function(u,g){return this.fromArray(u.elements,4*g)},setFromMatrix3Column:function(u,g){return this.fromArray(u.elements,3*g)},equals:function(u){return u.x===this.x&&u.y===this.y&&u.z===this.z},fromArray:function(u,g){return g===void 0&&(g=0),this.x=u[g],this.y=u[g+1],this.z=u[g+2],this},toArray:function(u,g){return u===void 0&&(u=[]),g===void 0&&(g=0),u[g]=this.x,u[g+1]=this.y,u[g+2]=this.z,u},fromBufferAttribute:function(u,g,C){return C!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=u.getX(g),this.y=u.getY(g),this.z=u.getZ(g),this}});var Ml=new Kt,rr=new Ki,to=new Kt(0,0,0),ho=new Kt(1,1,1),xa=new Kt,Ea=new Kt,ao=new Kt;function Ki(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0ge)return!1}return!0}Object.assign(Ss.prototype,{isBox3:!0,set:function(u,g){return this.min.copy(u),this.max.copy(g),this},setFromArray:function(u){for(var g=1/0,C=1/0,L=1/0,K=-1/0,ie=-1/0,ce=-1/0,ge=0,Ee=u.length;gethis.max.x||u.ythis.max.y||u.zthis.max.z)},containsBox:function(u){return this.min.x<=u.min.x&&u.max.x<=this.max.x&&this.min.y<=u.min.y&&u.max.y<=this.max.y&&this.min.z<=u.min.z&&u.max.z<=this.max.z},getParameter:function(u,g){return g===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),g=new Kt),g.set((u.x-this.min.x)/(this.max.x-this.min.x),(u.y-this.min.y)/(this.max.y-this.min.y),(u.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(u){return!(u.max.xthis.max.x||u.max.ythis.max.y||u.max.zthis.max.z)},intersectsSphere:function(u){return this.clampPoint(u.center,ki),ki.distanceToSquared(u.center)<=u.radius*u.radius},intersectsPlane:function(u){var g,C;return C=0=-u.constant},intersectsTriangle:function(u){if(this.isEmpty())return!1;this.getCenter(gl),Oa.subVectors(this.max,gl),ma.subVectors(u.a,gl),na.subVectors(u.b,gl),Ya.subVectors(u.c,gl),Da.subVectors(na,ma),Yi.subVectors(Ya,na),Ba.subVectors(ma,Ya);var g=[0,-Da.z,Da.y,0,-Yi.z,Yi.y,0,-Ba.z,Ba.y,Da.z,0,-Da.x,Yi.z,0,-Yi.x,Ba.z,0,-Ba.x,-Da.y,Da.x,0,-Yi.y,Yi.x,0,-Ba.y,Ba.x,0];return!!Es(g,ma,na,Ya,Oa)&&!!Es(g=[1,0,0,0,1,0,0,0,1],ma,na,Ya,Oa)&&(Oo.crossVectors(Da,Yi),Es(g=[Oo.x,Oo.y,Oo.z],ma,na,Ya,Oa))},clampPoint:function(u,g){return g===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),g=new Kt),g.copy(u).clamp(this.min,this.max)},distanceToPoint:function(u){return ki.copy(u).clamp(this.min,this.max).sub(u).length()},getBoundingSphere:function(u){return u===void 0&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(u.center),u.radius=.5*this.getSize(ki).length(),u},intersect:function(u){return this.min.max(u.min),this.max.min(u.max),this.isEmpty()&&this.makeEmpty(),this},union:function(u){return this.min.min(u.min),this.max.max(u.max),this},applyMatrix4:function(u){return this.isEmpty()||(Or[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(u),Or[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(u),Or[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(u),Or[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(u),Or[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(u),Or[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(u),Or[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(u),Or[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(u),this.setFromPoints(Or)),this},translate:function(u){return this.min.add(u),this.max.add(u),this},equals:function(u){return u.min.equals(this.min)&&u.max.equals(this.max)}});var vs=new Ss;function po(u,g){this.center=u!==void 0?u:new Kt,this.radius=g!==void 0?g:0}Object.assign(po.prototype,{set:function(u,g){return this.center.copy(u),this.radius=g,this},setFromPoints:function(u,g){var C=this.center;g!==void 0?C.copy(g):vs.setFromPoints(u).getCenter(C);for(var L=0,K=0,ie=u.length;Kthis.radius*this.radius&&(g.sub(this.center).normalize(),g.multiplyScalar(this.radius).add(this.center)),g},getBoundingBox:function(u){return u===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),u=new Ss),u.set(this.center,this.center),u.expandByScalar(this.radius),u},applyMatrix4:function(u){return this.center.applyMatrix4(u),this.radius=this.radius*u.getMaxScaleOnAxis(),this},translate:function(u){return this.center.add(u),this},equals:function(u){return u.center.equals(this.center)&&u.radius===this.radius}});var oo=new Kt,Ko=new Kt,Ts=new Kt,as=new Kt,Qi=new Kt,Io=new Kt,Jo=new Kt;function fo(u,g){this.origin=u!==void 0?u:new Kt,this.direction=g!==void 0?g:new Kt(0,0,-1)}Object.assign(fo.prototype,{set:function(u,g){return this.origin.copy(u),this.direction.copy(g),this},clone:function(){return new this.constructor().copy(this)},copy:function(u){return this.origin.copy(u.origin),this.direction.copy(u.direction),this},at:function(u,g){return g===void 0&&(console.warn("THREE.Ray: .at() target is now required"),g=new Kt),g.copy(this.direction).multiplyScalar(u).add(this.origin)},lookAt:function(u){return this.direction.copy(u).sub(this.origin).normalize(),this},recast:function(u){return this.origin.copy(this.at(u,oo)),this},closestPointToPoint:function(u,g){g===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),g=new Kt),g.subVectors(u,this.origin);var C=g.dot(this.direction);return C<0?g.copy(this.origin):g.copy(this.direction).multiplyScalar(C).add(this.origin)},distanceToPoint:function(u){return Math.sqrt(this.distanceSqToPoint(u))},distanceSqToPoint:function(u){var g=oo.subVectors(u,this.origin).dot(this.direction);return g<0?this.origin.distanceToSquared(u):(oo.copy(this.direction).multiplyScalar(g).add(this.origin),oo.distanceToSquared(u))},distanceSqToSegment:function(u,g,C,L){Ko.copy(u).add(g).multiplyScalar(.5),Ts.copy(g).sub(u).normalize(),as.copy(this.origin).sub(Ko);var K,ie,ce,ge,Ee=.5*u.distanceTo(g),Ae=-this.direction.dot(Ts),We=as.dot(this.direction),tt=-as.dot(Ts),ot=as.lengthSq(),Oe=Math.abs(1-Ae*Ae);if(0>16&255)/255,this.g=(u>>8&255)/255,this.b=(255&u)/255,this},setRGB:function(u,g,C){return this.r=u,this.g=g,this.b=C,this},setHSL:function(u,g,C){if(u=Ta.euclideanModulo(u,1),g=Ta.clamp(g,0,1),C=Ta.clamp(C,0,1),g===0)this.r=this.g=this.b=C;else{var L=C<=.5?C*(1+g):C+g-C*g,K=2*C-L;this.r=Mr(K,L,u+1/3),this.g=Mr(K,L,u),this.b=Mr(K,L,u-1/3)}return this},setStyle:function(u){function g(tt){tt!==void 0&&parseFloat(tt)<1&&console.warn("THREE.Color: Alpha component of "+u+" will be ignored.")}var C;if(C=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(u)){var L,K=C[1],ie=C[2];switch(K){case"rgb":case"rgba":if(L=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(ie))return this.r=Math.min(255,parseInt(L[1],10))/255,this.g=Math.min(255,parseInt(L[2],10))/255,this.b=Math.min(255,parseInt(L[3],10))/255,g(L[5]),this;if(L=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(ie))return this.r=Math.min(100,parseInt(L[1],10))/100,this.g=Math.min(100,parseInt(L[2],10))/100,this.b=Math.min(100,parseInt(L[3],10))/100,g(L[5]),this;break;case"hsl":case"hsla":if(L=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(ie)){var ce=parseFloat(L[1])/360,ge=parseInt(L[2],10)/100,Ee=parseInt(L[3],10)/100;return g(L[5]),this.setHSL(ce,ge,Ee)}}}else if(C=/^\#([A-Fa-f0-9]+)$/.exec(u)){var Ae=C[1],We=Ae.length;if(We===3)return this.r=parseInt(Ae.charAt(0)+Ae.charAt(0),16)/255,this.g=parseInt(Ae.charAt(1)+Ae.charAt(1),16)/255,this.b=parseInt(Ae.charAt(2)+Ae.charAt(2),16)/255,this;if(We===6)return this.r=parseInt(Ae.charAt(0)+Ae.charAt(1),16)/255,this.g=parseInt(Ae.charAt(2)+Ae.charAt(3),16)/255,this.b=parseInt(Ae.charAt(4)+Ae.charAt(5),16)/255,this}return u&&0g&&(g=u[C]);return g}Object.defineProperty(Bn.prototype,"needsUpdate",{set:function(u){u===!0&&this.version++}}),Object.assign(Bn.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(u){return this.usage=u,this},copy:function(u){return this.name=u.name,this.array=new u.array.constructor(u.array),this.itemSize=u.itemSize,this.count=u.count,this.normalized=u.normalized,this.usage=u.usage,this},copyAt:function(u,g,C){u*=this.itemSize,C*=g.itemSize;for(var L=0,K=this.itemSize;LC.far?null:{distance:Ee,point:kl.clone(),object:u}}function Nd(u,g,C,L,K,ie,ce,ge,Ee,Ae,We,tt){Nl.fromBufferAttribute(K,Ae),Ku.fromBufferAttribute(K,We),Zl.fromBufferAttribute(K,tt);var ot=u.morphTargetInfluences;if(g.morphTargets&&ie&&ot){Cc.set(0,0,0),Bu.set(0,0,0),Bd.set(0,0,0);for(var Oe=0,mt=ie.length;Oe"," #include ","}"].join(` `),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {"," vec3 direction = normalize( vWorldDirection );"," vec2 sampleUV;"," sampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;"," sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;"," gl_FragColor = texture2D( tEquirect, sampleUV );","}"].join(` `)},K=new zl({type:"CubemapFromEquirect",uniforms:tc(L.uniforms),vertexShader:L.vertexShader,fragmentShader:L.fragmentShader,side:E,blending:N});K.uniforms.tEquirect.value=g;var ie=new hs(new Vd(5,5,5),K);C.add(ie);var ce=new Wc(1,10,1);return ce.renderTarget=this,ce.renderTarget.texture.name="CubeCameraTexture",ce.update(u,C),ie.geometry.dispose(),ie.material.dispose(),this},((Ec.prototype=Object.create(vo.prototype)).constructor=Ec).prototype.isDataTexture=!0;var nc=new po,hc=new Kt;function Yc(u,g,C,L,K,ie){this.planes=[u!==void 0?u:new Wo,g!==void 0?g:new Wo,C!==void 0?C:new Wo,L!==void 0?L:new Wo,K!==void 0?K:new Wo,ie!==void 0?ie:new Wo]}Object.assign(Yc.prototype,{set:function(u,g,C,L,K,ie){var ce=this.planes;return ce[0].copy(u),ce[1].copy(g),ce[2].copy(C),ce[3].copy(L),ce[4].copy(K),ce[5].copy(ie),this},clone:function(){return new this.constructor().copy(this)},copy:function(u){for(var g=this.planes,C=0;C<6;C++)g[C].copy(u.planes[C]);return this},setFromProjectionMatrix:function(u){var g=this.planes,C=u.elements,L=C[0],K=C[1],ie=C[2],ce=C[3],ge=C[4],Ee=C[5],Ae=C[6],We=C[7],tt=C[8],ot=C[9],Oe=C[10],mt=C[11],Tt=C[12],At=C[13],nn=C[14],fn=C[15];return g[0].setComponents(ce-L,We-ge,mt-tt,fn-Tt).normalize(),g[1].setComponents(ce+L,We+ge,mt+tt,fn+Tt).normalize(),g[2].setComponents(ce+K,We+Ee,mt+ot,fn+At).normalize(),g[3].setComponents(ce-K,We-Ee,mt-ot,fn-At).normalize(),g[4].setComponents(ce-ie,We-Ae,mt-Oe,fn-nn).normalize(),g[5].setComponents(ce+ie,We+Ae,mt+Oe,fn+nn).normalize(),this},intersectsObject:function(u){var g=u.geometry;return g.boundingSphere===null&&g.computeBoundingSphere(),nc.copy(g.boundingSphere).applyMatrix4(u.matrixWorld),this.intersectsSphere(nc)},intersectsSprite:function(u){return nc.center.set(0,0,0),nc.radius=.7071067811865476,nc.applyMatrix4(u.matrixWorld),this.intersectsSphere(nc)},intersectsSphere:function(u){for(var g=this.planes,C=u.center,L=-u.radius,K=0;K<6;K++)if(g[K].distanceToPoint(C) 0.0 ) { distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); } return distanceFalloff; #else if( cutoffDistance > 0.0 && decayExponent > 0.0 ) { return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent ); } return 1.0; #endif } vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) { return RECIPROCAL_PI * diffuseColor; } vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) { float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH ); return ( 1.0 - specularColor ) * fresnel + specularColor; } vec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) { float fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV ); vec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0; return Fr * fresnel + F0; } float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) { float a2 = pow2( alpha ); float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); return 1.0 / ( gl * gv ); } float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { float a2 = pow2( alpha ); float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); return 0.5 / max( gv + gl, EPSILON ); } float D_GGX( const in float alpha, const in float dotNH ) { float a2 = pow2( alpha ); float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; return RECIPROCAL_PI * a2 / pow2( denom ); } vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) { float alpha = pow2( roughness ); vec3 halfDir = normalize( incidentLight.direction + viewDir ); float dotNL = saturate( dot( normal, incidentLight.direction ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); vec3 F = F_Schlick( specularColor, dotLH ); float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); return F * ( G * D ); } vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { const float LUT_SIZE = 64.0; const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; const float LUT_BIAS = 0.5 / LUT_SIZE; float dotNV = saturate( dot( N, V ) ); vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); uv = uv * LUT_SCALE + LUT_BIAS; return uv; } float LTC_ClippedSphereFormFactor( const in vec3 f ) { float l = length( f ); return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); } vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { float x = dot( v1, v2 ); float y = abs( x ); float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; float b = 3.4175940 + ( 4.1616724 + y ) * y; float v = a / b; float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; return cross( v1, v2 ) * theta_sintheta; } vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; vec3 lightNormal = cross( v1, v2 ); if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); vec3 T1, T2; T1 = normalize( V - N * dot( V, N ) ); T2 = - cross( N, T1 ); mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); vec3 coords[ 4 ]; coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); coords[ 0 ] = normalize( coords[ 0 ] ); coords[ 1 ] = normalize( coords[ 1 ] ); coords[ 2 ] = normalize( coords[ 2 ] ); coords[ 3 ] = normalize( coords[ 3 ] ); vec3 vectorFormFactor = vec3( 0.0 ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); return vec3( result ); } vec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) { float dotNV = saturate( dot( normal, viewDir ) ); vec2 brdf = integrateSpecularBRDF( dotNV, roughness ); return specularColor * brdf.x + brdf.y; } void BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) ); vec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness ); vec2 brdf = integrateSpecularBRDF( dotNV, roughness ); vec3 FssEss = F * brdf.x + brdf.y; float Ess = brdf.x + brdf.y; float Ems = 1.0 - Ess; vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); singleScatter += FssEss; multiScatter += Fms * Ems; } float G_BlinnPhong_Implicit( ) { return 0.25; } float D_BlinnPhong( const in float shininess, const in float dotNH ) { return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); } vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) { vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir ); float dotNH = saturate( dot( geometry.normal, halfDir ) ); float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); vec3 F = F_Schlick( specularColor, dotLH ); float G = G_BlinnPhong_Implicit( ); float D = D_BlinnPhong( shininess, dotNH ); return F * ( G * D ); } float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) { return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 ); } float BlinnExponentToGGXRoughness( const in float blinnExponent ) { return sqrt( 2.0 / ( blinnExponent + 2.0 ) ); } #if defined( USE_SHEEN ) float D_Charlie(float roughness, float NoH) { float invAlpha = 1.0 / roughness; float cos2h = NoH * NoH; float sin2h = max(1.0 - cos2h, 0.0078125); return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI); } float V_Neubelt(float NoV, float NoL) { return saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV))); } vec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) { vec3 N = geometry.normal; vec3 V = geometry.viewDir; vec3 H = normalize( V + L ); float dotNH = saturate( dot( N, H ) ); return specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) ); } #endif`,bumpmap_pars_fragment:`#ifdef USE_BUMPMAP uniform sampler2D bumpMap; uniform float bumpScale; vec2 dHdxy_fwd() { vec2 dSTdx = dFdx( vUv ); vec2 dSTdy = dFdy( vUv ); float Hll = bumpScale * texture2D( bumpMap, vUv ).x; float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; return vec2( dBx, dBy ); } vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) { vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) ); vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) ); vec3 vN = surf_norm; vec3 R1 = cross( vSigmaY, vN ); vec3 R2 = cross( vN, vSigmaX ); float fDet = dot( vSigmaX, R1 ); fDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 ); vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); return normalize( abs( fDet ) * surf_norm - vGrad ); } #endif`,clipping_planes_fragment:`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; if ( dot( vViewPosition, plane.xyz ) > plane.w ) discard; } #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES bool clipped = true; #pragma unroll_loop for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; clipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped; } if ( clipped ) discard; #endif #endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0 #if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP ) varying vec3 vViewPosition; #endif uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP ) varying vec3 vViewPosition; #endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP ) vViewPosition = - mvPosition.xyz; #endif`,color_fragment:`#ifdef USE_COLOR diffuseColor.rgb *= vColor; #endif`,color_pars_fragment:`#ifdef USE_COLOR varying vec3 vColor; #endif`,color_pars_vertex:`#ifdef USE_COLOR varying vec3 vColor; #endif`,color_vertex:`#ifdef USE_COLOR vColor.xyz = color.xyz; #endif`,common:`#define PI 3.14159265359 #define PI2 6.28318530718 #define PI_HALF 1.5707963267949 #define RECIPROCAL_PI 0.31830988618 #define RECIPROCAL_PI2 0.15915494 #define LOG2 1.442695 #define EPSILON 1e-6 #ifndef saturate #define saturate(a) clamp( a, 0.0, 1.0 ) #endif #define whiteComplement(a) ( 1.0 - saturate( a ) ) float pow2( const in float x ) { return x*x; } float pow3( const in float x ) { return x*x*x; } float pow4( const in float x ) { float x2 = x*x; return x2*x2; } float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); } highp float rand( const in vec2 uv ) { const highp float a = 12.9898, b = 78.233, c = 43758.5453; highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); return fract(sin(sn) * c); } #ifdef HIGH_PRECISION float precisionSafeLength( vec3 v ) { return length( v ); } #else float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); } float precisionSafeLength( vec3 v ) { float maxComponent = max3( abs( v ) ); return length( v / maxComponent ) * maxComponent; } #endif struct IncidentLight { vec3 color; vec3 direction; bool visible; }; struct ReflectedLight { vec3 directDiffuse; vec3 directSpecular; vec3 indirectDiffuse; vec3 indirectSpecular; }; struct GeometricContext { vec3 position; vec3 normal; vec3 viewDir; #ifdef CLEARCOAT vec3 clearcoatNormal; #endif }; vec3 transformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); } vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); } vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { float distance = dot( planeNormal, point - pointOnPlane ); return - distance * planeNormal + point; } float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { return sign( dot( point - pointOnPlane, planeNormal ) ); } vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) { return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine; } mat3 transposeMat3( const in mat3 m ) { mat3 tmp; tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); return tmp; } float linearToRelativeLuminance( const in vec3 color ) { vec3 weights = vec3( 0.2126, 0.7152, 0.0722 ); return dot( weights, color.rgb ); } bool isPerspectiveMatrix( mat4 m ) { return m[ 2 ][ 3 ] == - 1.0; }`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_maxMipLevel 8.0 #define cubeUV_minMipLevel 4.0 #define cubeUV_maxTileSize 256.0 #define cubeUV_minTileSize 16.0 float getFace(vec3 direction) { vec3 absDirection = abs(direction); float face = -1.0; if (absDirection.x > absDirection.z) { if (absDirection.x > absDirection.y) face = direction.x > 0.0 ? 0.0 : 3.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } else { if (absDirection.z > absDirection.y) face = direction.z > 0.0 ? 2.0 : 5.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } return face; } vec2 getUV(vec3 direction, float face) { vec2 uv; if (face == 0.0) { uv = vec2(-direction.z, direction.y) / abs(direction.x); } else if (face == 1.0) { uv = vec2(direction.x, -direction.z) / abs(direction.y); } else if (face == 2.0) { uv = direction.xy / abs(direction.z); } else if (face == 3.0) { uv = vec2(direction.z, direction.y) / abs(direction.x); } else if (face == 4.0) { uv = direction.xz / abs(direction.y); } else { uv = vec2(-direction.x, direction.y) / abs(direction.z); } return 0.5 * (uv + 1.0); } vec3 bilinearCubeUV(sampler2D envMap, vec3 direction, float mipInt) { float face = getFace(direction); float filterInt = max(cubeUV_minMipLevel - mipInt, 0.0); mipInt = max(mipInt, cubeUV_minMipLevel); float faceSize = exp2(mipInt); float texelSize = 1.0 / (3.0 * cubeUV_maxTileSize); vec2 uv = getUV(direction, face) * (faceSize - 1.0); vec2 f = fract(uv); uv += 0.5 - f; if (face > 2.0) { uv.y += faceSize; face -= 3.0; } uv.x += face * faceSize; if(mipInt < cubeUV_maxMipLevel){ uv.y += 2.0 * cubeUV_maxTileSize; } uv.y += filterInt * 2.0 * cubeUV_minTileSize; uv.x += 3.0 * max(0.0, cubeUV_maxTileSize - 2.0 * faceSize); uv *= texelSize; vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x += texelSize; vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.y += texelSize; vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x -= texelSize; vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; vec3 tm = mix(tl, tr, f.x); vec3 bm = mix(bl, br, f.x); return mix(tm, bm, f.y); } #define r0 1.0 #define v0 0.339 #define m0 -2.0 #define r1 0.8 #define v1 0.276 #define m1 -1.0 #define r4 0.4 #define v4 0.046 #define m4 2.0 #define r5 0.305 #define v5 0.016 #define m5 3.0 #define r6 0.21 #define v6 0.0038 #define m6 4.0 float roughnessToMip(float roughness) { float mip = 0.0; if (roughness >= r1) { mip = (r0 - roughness) * (m1 - m0) / (r0 - r1) + m0; } else if (roughness >= r4) { mip = (r1 - roughness) * (m4 - m1) / (r1 - r4) + m1; } else if (roughness >= r5) { mip = (r4 - roughness) * (m5 - m4) / (r4 - r5) + m4; } else if (roughness >= r6) { mip = (r5 - roughness) * (m6 - m5) / (r5 - r6) + m5; } else { mip = -2.0 * log2(1.16 * roughness); } return mip; } vec4 textureCubeUV(sampler2D envMap, vec3 sampleDir, float roughness) { float mip = clamp(roughnessToMip(roughness), m0, cubeUV_maxMipLevel); float mipF = fract(mip); float mipInt = floor(mip); vec3 color0 = bilinearCubeUV(envMap, sampleDir, mipInt); if (mipF == 0.0) { return vec4(color0, 1.0); } else { vec3 color1 = bilinearCubeUV(envMap, sampleDir, mipInt + 1.0); return vec4(mix(color0, color1, mipF), 1.0); } } #endif`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal; #ifdef USE_INSTANCING transformedNormal = mat3( instanceMatrix ) * transformedNormal; #endif transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedNormal = - transformedNormal; #endif #ifdef USE_TANGENT vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif #endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; #endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); #endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vUv ); emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; totalEmissiveRadiance *= emissiveColor.rgb; #endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; #endif`,encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:` vec4 LinearToLinear( in vec4 value ) { return value; } vec4 GammaToLinear( in vec4 value, in float gammaFactor ) { return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a ); } vec4 LinearToGamma( in vec4 value, in float gammaFactor ) { return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a ); } vec4 sRGBToLinear( in vec4 value ) { 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 ); } vec4 LinearTosRGB( in vec4 value ) { 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 ); } vec4 RGBEToLinear( in vec4 value ) { return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 ); } vec4 LinearToRGBE( in vec4 value ) { float maxComponent = max( max( value.r, value.g ), value.b ); float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); } vec4 RGBMToLinear( in vec4 value, in float maxRange ) { return vec4( value.rgb * value.a * maxRange, 1.0 ); } vec4 LinearToRGBM( in vec4 value, in float maxRange ) { float maxRGB = max( value.r, max( value.g, value.b ) ); float M = clamp( maxRGB / maxRange, 0.0, 1.0 ); M = ceil( M * 255.0 ) / 255.0; return vec4( value.rgb / ( M * maxRange ), M ); } vec4 RGBDToLinear( in vec4 value, in float maxRange ) { return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 ); } vec4 LinearToRGBD( in vec4 value, in float maxRange ) { float maxRGB = max( value.r, max( value.g, value.b ) ); float D = max( maxRange / maxRGB, 1.0 ); D = clamp( floor( D ) / 255.0, 0.0, 1.0 ); return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); } const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 ); vec4 LinearToLogLuv( in vec4 value ) { vec3 Xp_Y_XYZp = cLogLuvM * value.rgb; Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) ); vec4 vResult; vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z; float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0; vResult.w = fract( Le ); vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0; return vResult; } const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 ); vec4 LogLuvToLinear( in vec4 value ) { float Le = value.z * 255.0 + value.w; vec3 Xp_Y_XYZp; Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 ); Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y; Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z; vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb; return vec4( max( vRGB, 0.0 ), 1.0 ); }`,envmap_fragment:`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToFrag = normalize( vWorldPosition - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vec3 reflectVec = reflect( cameraToFrag, worldNormal ); #else vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); #endif #else vec3 reflectVec = vReflect; #endif #ifdef ENVMAP_TYPE_CUBE vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 ); #elif defined( ENVMAP_TYPE_EQUIREC ) vec2 sampleUV; reflectVec = normalize( reflectVec ); sampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5; vec4 envColor = texture2D( envMap, sampleUV ); #elif defined( ENVMAP_TYPE_SPHERE ) reflectVec = normalize( reflectVec ); vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) ); vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 ); #else vec4 envColor = vec4( 0.0 ); #endif #ifndef ENVMAP_TYPE_CUBE_UV envColor = envMapTexelToLinear( envColor ); #endif #ifdef ENVMAP_BLENDING_MULTIPLY outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_MIX ) outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif #endif`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform int maxMipLevel; #ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #else uniform sampler2D envMap; #endif #endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; uniform float refractionRatio; #else varying vec3 vReflect; #endif #endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; #else varying vec3 vReflect; uniform float refractionRatio; #endif #endif`,envmap_physical_pars_fragment:`#if defined( USE_ENVMAP ) #ifdef ENVMAP_MODE_REFRACTION uniform float refractionRatio; #endif vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) { vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix ); #ifdef ENVMAP_TYPE_CUBE vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz ); #ifdef TEXTURE_LOD_EXT vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) ); #else vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); #else vec4 envMapColor = vec4( 0.0 ); #endif return PI * envMapColor.rgb * envMapIntensity; } float getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) { float maxMIPLevelScalar = float( maxMIPLevel ); float sigma = PI * roughness * roughness / ( 1.0 + roughness ); float desiredMIPLevel = maxMIPLevelScalar + log2( sigma ); return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar ); } vec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) { #ifdef ENVMAP_MODE_REFLECTION vec3 reflectVec = reflect( -viewDir, normal ); reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); #else vec3 reflectVec = refract( -viewDir, normal, refractionRatio ); #endif reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); float specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel ); #ifdef ENVMAP_TYPE_CUBE vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz ); #ifdef TEXTURE_LOD_EXT vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel ); #else vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); #elif defined( ENVMAP_TYPE_EQUIREC ) vec2 sampleUV; sampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5; #ifdef TEXTURE_LOD_EXT vec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel ); #else vec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #elif defined( ENVMAP_TYPE_SPHERE ) vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) ); #ifdef TEXTURE_LOD_EXT vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel ); #else vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel ); #endif envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; #endif return envMapColor.rgb * envMapIntensity; } #endif`,envmap_vertex:`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else vec3 cameraToVertex; if ( isOrthographic ) { cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vReflect = reflect( cameraToVertex, worldNormal ); #else vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif #endif`,fog_vertex:`#ifdef USE_FOG fogDepth = -mvPosition.z; #endif`,fog_pars_vertex:`#ifdef USE_FOG varying float fogDepth; #endif`,fog_fragment:`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, fogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); #endif`,fog_pars_fragment:`#ifdef USE_FOG uniform vec3 fogColor; varying float fogDepth; #ifdef FOG_EXP2 uniform float fogDensity; #else uniform float fogNear; uniform float fogFar; #endif #endif`,gradientmap_pars_fragment:`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { float dotNL = dot( normal, lightDirection ); vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); #ifdef USE_GRADIENTMAP return texture2D( gradientMap, coord ).rgb; #else return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); #endif }`,lightmap_fragment:`#ifdef USE_LIGHTMAP vec4 lightMapTexel= texture2D( lightMap, vUv2 ); reflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; #endif`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; #endif`,lights_lambert_vertex:`vec3 diffuse = vec3( 1.0 ); GeometricContext geometry; geometry.position = mvPosition.xyz; geometry.normal = normalize( transformedNormal ); geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz ); GeometricContext backGeometry; backGeometry.position = geometry.position; backGeometry.normal = -geometry.normal; backGeometry.viewDir = geometry.viewDir; vLightFront = vec3( 0.0 ); vIndirectFront = vec3( 0.0 ); #ifdef DOUBLE_SIDED vLightBack = vec3( 0.0 ); vIndirectBack = vec3( 0.0 ); #endif IncidentLight directLight; float dotNL; vec3 directLightColor_Diffuse; #if NUM_POINT_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight ); dotNL = dot( geometry.normal, directLight.direction ); directLightColor_Diffuse = PI * directLight.color; vLightFront += saturate( dotNL ) * directLightColor_Diffuse; #ifdef DOUBLE_SIDED vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; #endif } #endif #if NUM_SPOT_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight ); dotNL = dot( geometry.normal, directLight.direction ); directLightColor_Diffuse = PI * directLight.color; vLightFront += saturate( dotNL ) * directLightColor_Diffuse; #ifdef DOUBLE_SIDED vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; #endif } #endif #if NUM_DIR_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight ); dotNL = dot( geometry.normal, directLight.direction ); directLightColor_Diffuse = PI * directLight.color; vLightFront += saturate( dotNL ) * directLightColor_Diffuse; #ifdef DOUBLE_SIDED vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; #endif } #endif #if NUM_HEMI_LIGHTS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); #ifdef DOUBLE_SIDED vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry ); #endif } #endif`,lights_pars_begin:`uniform bool receiveShadow; uniform vec3 ambientLightColor; uniform vec3 lightProbe[ 9 ]; vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { float x = normal.x, y = normal.y, z = normal.z; vec3 result = shCoefficients[ 0 ] * 0.886227; result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); return result; } vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) { vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix ); vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); return irradiance; } vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { vec3 irradiance = ambientLightColor; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif return irradiance; } #if NUM_DIR_LIGHTS > 0 struct DirectionalLight { vec3 direction; vec3 color; int shadow; float shadowBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) { directLight.color = directionalLight.color; directLight.direction = directionalLight.direction; directLight.visible = true; } #endif #if NUM_POINT_LIGHTS > 0 struct PointLight { vec3 position; vec3 color; float distance; float decay; int shadow; float shadowBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) { vec3 lVector = pointLight.position - geometry.position; directLight.direction = normalize( lVector ); float lightDistance = length( lVector ); directLight.color = pointLight.color; directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay ); directLight.visible = ( directLight.color != vec3( 0.0 ) ); } #endif #if NUM_SPOT_LIGHTS > 0 struct SpotLight { vec3 position; vec3 direction; vec3 color; float distance; float decay; float coneCos; float penumbraCos; int shadow; float shadowBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) { vec3 lVector = spotLight.position - geometry.position; directLight.direction = normalize( lVector ); float lightDistance = length( lVector ); float angleCos = dot( directLight.direction, spotLight.direction ); if ( angleCos > spotLight.coneCos ) { float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos ); directLight.color = spotLight.color; directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay ); directLight.visible = true; } else { directLight.color = vec3( 0.0 ); directLight.visible = false; } } #endif #if NUM_RECT_AREA_LIGHTS > 0 struct RectAreaLight { vec3 color; vec3 position; vec3 halfWidth; vec3 halfHeight; }; uniform sampler2D ltc_1; uniform sampler2D ltc_2; uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; #endif #if NUM_HEMI_LIGHTS > 0 struct HemisphereLight { vec3 direction; vec3 skyColor; vec3 groundColor; }; uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) { float dotNL = dot( geometry.normal, hemiLight.direction ); float hemiDiffuseWeight = 0.5 * dotNL + 0.5; vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif return irradiance; } #endif`,lights_toon_fragment:`ToonMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength;`,lights_toon_pars_fragment:`varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif struct ToonMaterial { vec3 diffuseColor; vec3 specularColor; float specularShininess; float specularStrength; }; void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength; } void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon #define Material_LightProbeLOD( material ) (0)`,lights_phong_fragment:`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; float specularShininess; float specularStrength; }; void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength; } void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong #define Material_LightProbeLOD( material ) (0)`,lights_physical_fragment:`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); material.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness; material.specularRoughness = min( material.specularRoughness, 1.0 ); #ifdef REFLECTIVITY material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor ); #else material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor ); #endif #ifdef CLEARCOAT material.clearcoat = saturate( clearcoat ); material.clearcoatRoughness = max( clearcoatRoughness, 0.0525 ); material.clearcoatRoughness += geometryRoughness; material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); #endif #ifdef USE_SHEEN material.sheenColor = sheen; #endif`,lights_physical_pars_fragment:`struct PhysicalMaterial { vec3 diffuseColor; float specularRoughness; vec3 specularColor; #ifdef CLEARCOAT float clearcoat; float clearcoatRoughness; #endif #ifdef USE_SHEEN vec3 sheenColor; #endif }; #define MAXIMUM_SPECULAR_COEFFICIENT 0.16 #define DEFAULT_SPECULAR_COEFFICIENT 0.04 float clearcoatDHRApprox( const in float roughness, const in float dotNL ) { return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) ); } #if NUM_RECT_AREA_LIGHTS > 0 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { vec3 normal = geometry.normal; vec3 viewDir = geometry.viewDir; vec3 position = geometry.position; vec3 lightPos = rectAreaLight.position; vec3 halfWidth = rectAreaLight.halfWidth; vec3 halfHeight = rectAreaLight.halfHeight; vec3 lightColor = rectAreaLight.color; float roughness = material.specularRoughness; vec3 rectCoords[ 4 ]; rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; vec2 uv = LTC_Uv( normal, viewDir, roughness ); vec4 t1 = texture2D( ltc_1, uv ); vec4 t2 = texture2D( ltc_2, uv ); mat3 mInv = mat3( vec3( t1.x, 0, t1.y ), vec3( 0, 1, 0 ), vec3( t1.z, 0, t1.w ) ); vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); } #endif void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS irradiance *= PI; #endif #ifdef CLEARCOAT float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); vec3 ccIrradiance = ccDotNL * directLight.color; #ifndef PHYSICALLY_CORRECT_LIGHTS ccIrradiance *= PI; #endif float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL ); reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness ); #else float clearcoatDHR = 0.0; #endif #ifdef USE_SHEEN reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen( material.specularRoughness, directLight.direction, geometry, material.sheenColor ); #else reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness); #endif reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); } void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { #ifdef CLEARCOAT float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness ); float ccDotNL = ccDotNV; float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL ); #else float clearcoatDHR = 0.0; #endif float clearcoatInv = 1.0 - clearcoatDHR; vec3 singleScattering = vec3( 0.0 ); vec3 multiScattering = vec3( 0.0 ); vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering ); vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) ); reflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering; reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; } #define RE_Direct RE_Direct_Physical #define RE_Direct_RectArea RE_Direct_RectArea_Physical #define RE_IndirectDiffuse RE_IndirectDiffuse_Physical #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); }`,lights_fragment_begin:` GeometricContext geometry; geometry.position = - vViewPosition; geometry.normal = normal; geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); #ifdef CLEARCOAT geometry.clearcoatNormal = clearcoatNormal; #endif IncidentLight directLight; #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) PointLight pointLight; #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { pointLight = pointLights[ i ]; getPointDirectLightIrradiance( pointLight, geometry, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) directLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; #endif RE_Direct( directLight, geometry, material, reflectedLight ); } #endif #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) SpotLight spotLight; #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { spotLight = spotLights[ i ]; getSpotDirectLightIrradiance( spotLight, geometry, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) directLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometry, material, reflectedLight ); } #endif #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) DirectionalLight directionalLight; #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { directionalLight = directionalLights[ i ]; getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) directLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometry, material, reflectedLight ); } #endif #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) RectAreaLight rectAreaLight; #pragma unroll_loop for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { rectAreaLight = rectAreaLights[ i ]; RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); } #endif #if defined( RE_IndirectDiffuse ) vec3 iblIrradiance = vec3( 0.0 ); vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); irradiance += getLightProbeIrradiance( lightProbe, geometry ); #if ( NUM_HEMI_LIGHTS > 0 ) #pragma unroll_loop for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); } #endif #endif #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); #endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel= texture2D( lightMap, vUv2 ); vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; #ifndef PHYSICALLY_CORRECT_LIGHTS lightMapIrradiance *= PI; #endif irradiance += lightMapIrradiance; #endif #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) iblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel ); #endif #endif #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) radiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel ); #ifdef CLEARCOAT clearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel ); #endif #endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); #endif`,logdepthbuf_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; #endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif #endif`,logdepthbuf_vertex:`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); #else if ( isPerspectiveMatrix( projectionMatrix ) ) { gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; gl_Position.z *= gl_Position.w; } #endif #endif`,map_fragment:`#ifdef USE_MAP vec4 texelColor = texture2D( map, vUv ); texelColor = mapTexelToLinear( texelColor ); diffuseColor *= texelColor; #endif`,map_pars_fragment:`#ifdef USE_MAP uniform sampler2D map; #endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; #endif #ifdef USE_MAP vec4 mapTexel = texture2D( map, uv ); diffuseColor *= mapTexelToLinear( mapTexel ); #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; #endif`,map_particle_pars_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; #endif #ifdef USE_MAP uniform sampler2D map; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; #endif`,metalnessmap_fragment:`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vUv ); metalnessFactor *= texelMetalness.b; #endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; #endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifndef USE_MORPHNORMALS uniform float morphTargetInfluences[ 8 ]; #else uniform float morphTargetInfluences[ 4 ]; #endif #endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; transformed += morphTarget0 * morphTargetInfluences[ 0 ]; transformed += morphTarget1 * morphTargetInfluences[ 1 ]; transformed += morphTarget2 * morphTargetInfluences[ 2 ]; transformed += morphTarget3 * morphTargetInfluences[ 3 ]; #ifndef USE_MORPHNORMALS transformed += morphTarget4 * morphTargetInfluences[ 4 ]; transformed += morphTarget5 * morphTargetInfluences[ 5 ]; transformed += morphTarget6 * morphTargetInfluences[ 6 ]; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif`,normal_fragment_begin:`#ifdef FLAT_SHADED vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); vec3 normal = normalize( cross( fdx, fdy ) ); #else vec3 normal = normalize( vNormal ); #ifdef DOUBLE_SIDED normal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); #endif #ifdef USE_TANGENT vec3 tangent = normalize( vTangent ); vec3 bitangent = normalize( vBitangent ); #ifdef DOUBLE_SIDED tangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); bitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); #endif #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) mat3 vTBN = mat3( tangent, bitangent, normal ); #endif #endif #endif vec3 geometryNormal = normal;`,normal_fragment_maps:`#ifdef OBJECTSPACE_NORMALMAP normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; #endif #ifdef DOUBLE_SIDED normal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 ); #endif normal = normalize( normalMatrix * normal ); #elif defined( TANGENTSPACE_NORMALMAP ) vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; mapN.xy *= normalScale; #ifdef USE_TANGENT normal = normalize( vTBN * mapN ); #else normal = perturbNormal2Arb( -vViewPosition, normal, mapN ); #endif #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() ); #endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif #ifdef OBJECTSPACE_NORMALMAP uniform mat3 normalMatrix; #endif #if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) { vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) ); vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) ); vec2 st0 = dFdx( vUv.st ); vec2 st1 = dFdy( vUv.st ); float scale = sign( st1.t * st0.s - st0.t * st1.s ); vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale ); vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale ); vec3 N = normalize( surf_norm ); mat3 tsn = mat3( S, T, N ); mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 ); return normalize( tsn * mapN ); } #endif`,clearcoat_normal_fragment_begin:`#ifdef CLEARCOAT vec3 clearcoatNormal = geometryNormal; #endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; #ifdef USE_TANGENT clearcoatNormal = normalize( vTBN * clearcoatMapN ); #else clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN ); #endif #endif`,clearcoat_normalmap_pars_fragment:`#ifdef USE_CLEARCOAT_NORMALMAP uniform sampler2D clearcoatNormalMap; uniform vec2 clearcoatNormalScale; #endif`,packing:`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { return 2.0 * rgb.xyz - 1.0; } const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); const float ShiftRight8 = 1. / 256.; vec4 packDepthToRGBA( const in float v ) { vec4 r = vec4( fract( v * PackFactors ), v ); r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; } float unpackRGBAToDepth( const in vec4 v ) { return dot( v, UnpackFactors ); } vec4 pack2HalfToRGBA( vec2 v ) { vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 )); return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w); } vec2 unpackRGBATo2Half( vec4 v ) { return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); } float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { return ( viewZ + near ) / ( near - far ); } float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { return linearClipZ * ( near - far ) - near; } float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { return (( near + viewZ ) * far ) / (( far - near ) * viewZ ); } float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * invClipZ - far ); }`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; #endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); #endif`,dithering_pars_fragment:`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } #endif`,roughnessmap_fragment:`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vUv ); roughnessFactor *= texelRoughness.g; #endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; #endif`,shadowmap_pars_fragment:`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; #endif float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); } vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { return unpackRGBATo2Half( texture2D( shadow, uv ) ); } float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ float occlusion = 1.0; vec2 distribution = texture2DDistribution( shadow, uv ); float hard_shadow = step( compare , distribution.x ); if (hard_shadow != 1.0 ) { float distance = compare - distribution.x ; float variance = max( 0.00000, distribution.y * distribution.y ); float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); } return occlusion; } float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { float shadow = 1.0; shadowCoord.xyz /= shadowCoord.w; shadowCoord.z += shadowBias; bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 ); bool inFrustum = all( inFrustumVec ); bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 ); bool frustumTest = all( frustumTestVec ); if ( frustumTest ) { #if defined( SHADOWMAP_TYPE_PCF ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx0 = - texelSize.x * shadowRadius; float dy0 = - texelSize.y * shadowRadius; float dx1 = + texelSize.x * shadowRadius; float dy1 = + texelSize.y * shadowRadius; float dx2 = dx0 / 2.0; float dy2 = dy0 / 2.0; float dx3 = dx1 / 2.0; float dy3 = dy1 / 2.0; shadow = ( texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) ) * ( 1.0 / 17.0 ); #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx = texelSize.x; float dy = texelSize.y; vec2 uv = shadowCoord.xy; vec2 f = fract( uv * shadowMapSize + 0.5 ); uv -= f * texelSize; shadow = ( texture2DCompare( shadowMap, uv, shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), f.x ), mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), f.x ), f.y ) ) * ( 1.0 / 9.0 ); #elif defined( SHADOWMAP_TYPE_VSM ) shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); #else shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); #endif } return shadow; } vec2 cubeToUV( vec3 v, float texelSizeY ) { vec3 absV = abs( v ); float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); absV *= scaleToCube; v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); vec2 planar = v.xy; float almostATexel = 1.5 * texelSizeY; float almostOne = 1.0 - almostATexel; if ( absV.z >= almostOne ) { if ( v.z > 0.0 ) planar.x = 4.0 - v.x; } else if ( absV.x >= almostOne ) { float signX = sign( v.x ); planar.x = v.z * signX + 2.0 * signX; } else if ( absV.y >= almostOne ) { float signY = sign( v.y ); planar.x = v.x + 2.0 * signY + 2.0; planar.y = v.z * signY - 2.0; } return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); } float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); vec3 lightToPosition = shadowCoord.xyz; float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; vec3 bd3D = normalize( lightToPosition ); #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; return ( texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) ) * ( 1.0 / 9.0 ); #else return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } #endif`,shadowmap_pars_vertex:`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ]; varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; #endif #endif`,shadowmap_vertex:`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition; } #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition; } #endif #if NUM_POINT_LIGHT_SHADOWS > 0 #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition; } #endif #endif`,shadowmask_pars_fragment:`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 DirectionalLight directionalLight; #pragma unroll_loop for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { directionalLight = directionalLights[ i ]; shadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; } #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 SpotLight spotLight; #pragma unroll_loop for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { spotLight = spotLights[ i ]; shadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; } #endif #if NUM_POINT_LIGHT_SHADOWS > 0 PointLight pointLight; #pragma unroll_loop for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { pointLight = pointLights[ i ]; shadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; } #endif #endif return shadow; }`,skinbase_vertex:`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); #endif`,skinning_pars_vertex:`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; #ifdef BONE_TEXTURE uniform highp sampler2D boneTexture; uniform int boneTextureSize; mat4 getBoneMatrix( const in float i ) { float j = i * 4.0; float x = mod( j, float( boneTextureSize ) ); float y = floor( j / float( boneTextureSize ) ); float dx = 1.0 / float( boneTextureSize ); float dy = 1.0 / float( boneTextureSize ); y = dy * ( y + 0.5 ); vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); mat4 bone = mat4( v1, v2, v3, v4 ); return bone; } #else uniform mat4 boneMatrices[ MAX_BONES ]; mat4 getBoneMatrix( const in float i ) { mat4 bone = boneMatrices[ int(i) ]; return bone; } #endif #endif`,skinning_vertex:`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; skinned += boneMatY * skinVertex * skinWeight.y; skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; #endif`,skinnormal_vertex:`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; skinMatrix += skinWeight.z * boneMatZ; skinMatrix += skinWeight.w * boneMatW; skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif #endif`,specularmap_fragment:`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; #endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; #endif`,tonemapping_fragment:`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); #endif`,tonemapping_pars_fragment:`#ifndef saturate #define saturate(a) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; uniform float toneMappingWhitePoint; vec3 LinearToneMapping( vec3 color ) { return toneMappingExposure * color; } vec3 ReinhardToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( color / ( vec3( 1.0 ) + color ) ); } #define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) ) vec3 Uncharted2ToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) ); } vec3 OptimizedCineonToneMapping( vec3 color ) { color *= toneMappingExposure; color = max( vec3( 0.0 ), color - 0.004 ); return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); } vec3 ACESFilmicToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) ); }`,uv_pars_fragment:`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) varying vec2 vUv; #endif`,uv_pars_vertex:`#ifdef USE_UV #ifdef UVS_VERTEX_ONLY vec2 vUv; #else varying vec2 vUv; #endif uniform mat3 uvTransform; #endif`,uv_vertex:`#ifdef USE_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; #endif`,uv2_pars_fragment:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) varying vec2 vUv2; #endif`,uv2_pars_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) attribute vec2 uv2; varying vec2 vUv2; uniform mat3 uv2Transform; #endif`,uv2_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; #endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; #endif`,background_frag:`uniform sampler2D t2D; varying vec2 vUv; void main() { vec4 texColor = texture2D( t2D, vUv ); gl_FragColor = mapTexelToLinear( texColor ); #include #include }`,background_vert:`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); }`,cube_frag:`#include uniform float opacity; varying vec3 vWorldDirection; #include void main() { vec3 vReflect = vWorldDirection; #include gl_FragColor = envColor; gl_FragColor.a *= opacity; #include #include }`,cube_vert:`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,depth_frag:`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( 1.0 ); #if DEPTH_PACKING == 3200 diffuseColor.a = opacity; #endif #include #include #include #include #if DEPTH_PACKING == 3200 gl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity ); #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( gl_FragCoord.z ); #endif }`,depth_vert:`#include #include #include #include #include #include #include void main() { #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include }`,distanceRGBA_frag:`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; varying vec3 vWorldPosition; #include #include #include #include #include #include void main () { #include vec4 diffuseColor = vec4( 1.0 ); #include #include #include float dist = length( vWorldPosition - referencePosition ); dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); }`,distanceRGBA_vert:`#define DISTANCE varying vec3 vWorldPosition; #include #include #include #include #include #include void main() { #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vWorldPosition = worldPosition.xyz; }`,equirect_frag:`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV; sampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5; vec4 texColor = texture2D( tEquirect, sampleUV ); gl_FragColor = mapTexelToLinear( texColor ); #include #include }`,equirect_vert:`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include }`,linedashed_frag:`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; varying float vLineDistance; #include #include #include #include #include void main() { #include if ( mod( vLineDistance, totalSize ) > dashSize ) { discard; } vec3 outgoingLight = vec3( 0.0 ); vec4 diffuseColor = vec4( diffuse, opacity ); #include #include outgoingLight = diffuseColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,linedashed_vert:`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include #include #include #include #include void main() { #include vLineDistance = scale * lineDistance; vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); gl_Position = projectionMatrix * mvPosition; #include #include #include }`,meshbasic_frag:`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); #ifdef USE_LIGHTMAP vec4 lightMapTexel= texture2D( lightMap, vUv2 ); reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; #else reflectedLight.indirectDiffuse += vec3( 1.0 ); #endif #include reflectedLight.indirectDiffuse *= diffuseColor.rgb; vec3 outgoingLight = reflectedLight.indirectDiffuse; #include gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,meshbasic_vert:`#include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #ifdef USE_ENVMAP #include #include #include #include #endif #include #include #include #include #include #include #include #include #include }`,meshlambert_frag:`uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; varying vec3 vLightFront; varying vec3 vIndirectFront; #ifdef DOUBLE_SIDED varying vec3 vLightBack; varying vec3 vIndirectBack; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor ); #ifdef DOUBLE_SIDED reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack; #else reflectedLight.indirectDiffuse += vIndirectFront; #endif #include reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ); #ifdef DOUBLE_SIDED reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack; #else reflectedLight.directDiffuse = vLightFront; #endif reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask(); #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshlambert_vert:`#define LAMBERT varying vec3 vLightFront; varying vec3 vIndirectFront; #ifdef DOUBLE_SIDED varying vec3 vLightBack; varying vec3 vIndirectBack; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include }`,meshmatcap_frag:`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include vec3 viewDir = normalize( vViewPosition ); vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); vec3 y = cross( viewDir, x ); vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; #ifdef USE_MATCAP vec4 matcapColor = texture2D( matcap, uv ); matcapColor = matcapTexelToLinear( matcapColor ); #else vec4 matcapColor = vec4( 1.0 ); #endif vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,meshmatcap_vert:`#define MATCAP varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #endif #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; }`,meshtoon_frag:`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; uniform float shininess; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshtoon_vert:`#define TOON varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #endif #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include }`,meshphong_frag:`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; uniform float shininess; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; #include gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshphong_vert:`#define PHONG varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #endif #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,meshphysical_frag:`#define STANDARD #ifdef PHYSICAL #define REFLECTIVITY #define CLEARCOAT #define TRANSPARENCY #endif uniform vec3 diffuse; uniform vec3 emissive; uniform float roughness; uniform float metalness; uniform float opacity; #ifdef TRANSPARENCY uniform float transparency; #endif #ifdef REFLECTIVITY uniform float reflectivity; #endif #ifdef CLEARCOAT uniform float clearcoat; uniform float clearcoatRoughness; #endif #ifdef USE_SHEEN uniform vec3 sheen; #endif varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include vec4 diffuseColor = vec4( diffuse, opacity ); ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; #ifdef TRANSPARENCY diffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ); #endif gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include #include }`,meshphysical_vert:`#define STANDARD varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif #endif #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include }`,normal_frag:`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; #endif #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include void main() { #include #include #include #include gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); }`,normal_vert:`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; #endif #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif #endif #include #include #include #include #include #include #include #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) vViewPosition = - mvPosition.xyz; #endif }`,points_frag:`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include void main() { #include vec3 outgoingLight = vec3( 0.0 ); vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include outgoingLight = diffuseColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include #include }`,points_vert:`uniform float size; uniform float scale; #include #include #include #include #include #include void main() { #include #include #include #include gl_PointSize = size; #ifdef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); #endif #include #include #include #include }`,shadow_frag:`uniform vec3 color; uniform float opacity; #include #include #include #include #include #include #include void main() { gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); #include #include #include }`,shadow_vert:`#include #include void main() { #include #include #include #include #include }`,sprite_frag:`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include void main() { #include vec3 outgoingLight = vec3( 0.0 ); vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include outgoingLight = diffuseColor.rgb; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); #include #include #include }`,sprite_vert:`uniform float rotation; uniform vec2 center; #include #include #include #include #include void main() { #include vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); vec2 scale; scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); #ifndef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) scale *= - mvPosition.z; #endif vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; vec2 rotatedPosition; rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; mvPosition.xy += rotatedPosition; gl_Position = projectionMatrix * mvPosition; #include #include #include }`},Mu={basic:{uniforms:Ks([Wi.common,Wi.specularmap,Wi.envmap,Wi.aomap,Wi.lightmap,Wi.fog]),vertexShader:bo.meshbasic_vert,fragmentShader:bo.meshbasic_frag},lambert:{uniforms:Ks([Wi.common,Wi.specularmap,Wi.envmap,Wi.aomap,Wi.lightmap,Wi.emissivemap,Wi.fog,Wi.lights,{emissive:{value:new Fn(0)}}]),vertexShader:bo.meshlambert_vert,fragmentShader:bo.meshlambert_frag},phong:{uniforms:Ks([Wi.common,Wi.specularmap,Wi.envmap,Wi.aomap,Wi.lightmap,Wi.emissivemap,Wi.bumpmap,Wi.normalmap,Wi.displacementmap,Wi.fog,Wi.lights,{emissive:{value:new Fn(0)},specular:{value:new Fn(1118481)},shininess:{value:30}}]),vertexShader:bo.meshphong_vert,fragmentShader:bo.meshphong_frag},standard:{uniforms:Ks([Wi.common,Wi.envmap,Wi.aomap,Wi.lightmap,Wi.emissivemap,Wi.bumpmap,Wi.normalmap,Wi.displacementmap,Wi.roughnessmap,Wi.metalnessmap,Wi.fog,Wi.lights,{emissive:{value:new Fn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:bo.meshphysical_vert,fragmentShader:bo.meshphysical_frag},toon:{uniforms:Ks([Wi.common,Wi.specularmap,Wi.aomap,Wi.lightmap,Wi.emissivemap,Wi.bumpmap,Wi.normalmap,Wi.displacementmap,Wi.gradientmap,Wi.fog,Wi.lights,{emissive:{value:new Fn(0)},specular:{value:new Fn(1118481)},shininess:{value:30}}]),vertexShader:bo.meshtoon_vert,fragmentShader:bo.meshtoon_frag},matcap:{uniforms:Ks([Wi.common,Wi.bumpmap,Wi.normalmap,Wi.displacementmap,Wi.fog,{matcap:{value:null}}]),vertexShader:bo.meshmatcap_vert,fragmentShader:bo.meshmatcap_frag},points:{uniforms:Ks([Wi.points,Wi.fog]),vertexShader:bo.points_vert,fragmentShader:bo.points_frag},dashed:{uniforms:Ks([Wi.common,Wi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:bo.linedashed_vert,fragmentShader:bo.linedashed_frag},depth:{uniforms:Ks([Wi.common,Wi.displacementmap]),vertexShader:bo.depth_vert,fragmentShader:bo.depth_frag},normal:{uniforms:Ks([Wi.common,Wi.bumpmap,Wi.normalmap,Wi.displacementmap,{opacity:{value:1}}]),vertexShader:bo.normal_vert,fragmentShader:bo.normal_frag},sprite:{uniforms:Ks([Wi.sprite,Wi.fog]),vertexShader:bo.sprite_vert,fragmentShader:bo.sprite_frag},background:{uniforms:{uvTransform:{value:new Vo},t2D:{value:null}},vertexShader:bo.background_vert,fragmentShader:bo.background_frag},cube:{uniforms:Ks([Wi.envmap,{opacity:{value:1}}]),vertexShader:bo.cube_vert,fragmentShader:bo.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:bo.equirect_vert,fragmentShader:bo.equirect_frag},distanceRGBA:{uniforms:Ks([Wi.common,Wi.displacementmap,{referencePosition:{value:new Kt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:bo.distanceRGBA_vert,fragmentShader:bo.distanceRGBA_frag},shadow:{uniforms:Ks([Wi.lights,Wi.fog,{color:{value:new Fn(0)},opacity:{value:1}}]),vertexShader:bo.shadow_vert,fragmentShader:bo.shadow_frag}};function wo(u,g,C,L){var K,ie,ce=new Fn(0),ge=0,Ee=null,Ae=0,We=null;function tt(ot,Oe){g.buffers.color.setClear(ot.r,ot.g,ot.b,Oe,L)}return{getClearColor:function(){return ce},setClearColor:function(ot,Oe){ce.set(ot),tt(ce,ge=Oe!==void 0?Oe:1)},getClearAlpha:function(){return ge},setClearAlpha:function(ot){tt(ce,ge=ot)},render:function(ot,Oe,mt,Tt){var At=Oe.background,nn=u.xr,fn=nn.getSession&&nn.getSession();if(fn&&fn.environmentBlendMode==="additive"&&(At=null),At===null?tt(ce,ge):At&&At.isColor&&(tt(At,1),Tt=!0),(u.autoClear||Tt)&&u.clear(u.autoClearColor,u.autoClearDepth,u.autoClearStencil),At&&(At.isCubeTexture||At.isWebGLCubeRenderTarget||At.mapping===rn)){ie===void 0&&((ie=new hs(new Vd(1,1,1),new zl({type:"BackgroundCubeMaterial",uniforms:tc(Mu.cube.uniforms),vertexShader:Mu.cube.vertexShader,fragmentShader:Mu.cube.fragmentShader,side:E,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),ie.geometry.deleteAttribute("uv"),ie.onBeforeRender=function(zn,Dn,Qn){this.matrixWorld.copyPosition(Qn.matrixWorld)},Object.defineProperty(ie.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),C.update(ie));var An=At.isWebGLCubeRenderTarget?At.texture:At;ie.material.uniforms.envMap.value=An,ie.material.uniforms.flipEnvMap.value=An.isCubeTexture?-1:1,Ee===At&&Ae===An.version&&We===u.toneMapping||(ie.material.needsUpdate=!0,Ee=At,Ae=An.version,We=u.toneMapping),ot.unshift(ie,ie.geometry,ie.material,0,0,null)}else At&&At.isTexture&&(K===void 0&&((K=new hs(new Xc(2,2),new zl({type:"BackgroundMaterial",uniforms:tc(Mu.background.uniforms),vertexShader:Mu.background.vertexShader,fragmentShader:Mu.background.fragmentShader,side:b,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(K.material,"map",{get:function(){return this.uniforms.t2D.value}}),C.update(K)),(K.material.uniforms.t2D.value=At).matrixAutoUpdate===!0&&At.updateMatrix(),K.material.uniforms.uvTransform.value.copy(At.matrix),Ee===At&&Ae===At.version&&We===u.toneMapping||(K.material.needsUpdate=!0,Ae=(Ee=At).version,We=u.toneMapping),ot.unshift(K,K.geometry,K.material,0,0,null))}}}function zd(u,g){return Math.abs(g[1])-Math.abs(u[1])}function Tc(u,g,C,L,K,ie,ce,ge,Ee,Ae){vo.call(this,u=u!==void 0?u:[],g=g!==void 0?g:Tn,C,L,K,ie,ce=ce!==void 0?ce:jt,ge,Ee,Ae),this.flipY=!1}function ih(u,g,C,L){vo.call(this,null),this.image={data:u||null,width:g||1,height:C||1,depth:L||1},this.magFilter=Ie,this.minFilter=Ie,this.wrapR=pt,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function Cl(u,g,C,L){vo.call(this,null),this.image={data:u||null,width:g||1,height:C||1,depth:L||1},this.magFilter=Ie,this.minFilter=Ie,this.wrapR=pt,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}Mu.physical={uniforms:Ks([Mu.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new Fn(0)},clearcoatNormalScale:{value:new Lr(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:bo.meshphysical_vert,fragmentShader:bo.meshphysical_frag},((Tc.prototype=Object.create(vo.prototype)).constructor=Tc).prototype.isCubeTexture=!0,Object.defineProperty(Tc.prototype,"images",{get:function(){return this.image},set:function(u){this.image=u}}),((ih.prototype=Object.create(vo.prototype)).constructor=ih).prototype.isDataTexture2DArray=!0,((Cl.prototype=Object.create(vo.prototype)).constructor=Cl).prototype.isDataTexture3D=!0;var Ah=new vo,ah=new ih,Zc=new Cl,kh=new Tc,Gd=[],Jl=[],Vu=new Float32Array(16),Ih=new Float32Array(9),Ph=new Float32Array(4);function zu(u,g,C){var L=u[0];if(L<=0||0/gm;function gr(u){return u.replace(ir,Yr)}function Yr(u,g){var C=bo[g];if(C===void 0)throw new Error("Can not resolve #include <"+g+">");return gr(C)}var Oi=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function br(u){return u.replace(Oi,Ii)}function Ii(u,g,C,L){for(var K="",ie=parseInt(g);ie void main() { float mean = 0.0; float squared_mean = 0.0; float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) ); for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) { #ifdef HORIZONAL_PASS vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) ); mean += distribution.x; squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; #else float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) ); mean += depth; squared_mean += depth * depth; #endif } mean = mean * HALF_SAMPLE_RATE; squared_mean = squared_mean * HALF_SAMPLE_RATE; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); }`,mc=`void main() { gl_Position = vec4( position, 1.0 ); }`;function gc(u,g,C){var L=new Yc,K=new Lr,ie=new Lr,ce=new _o,ge=[],Ee=[],Ae={},We={0:E,1:b,2:I},tt=new zl({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new Lr},radius:{value:4}},vertexShader:mc,fragmentShader:ju}),ot=tt.clone();ot.defines.HORIZONAL_PASS=1;var Oe=new qi;Oe.setAttribute("position",new Bn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var mt=new hs(Oe,tt),Tt=this;function At(Dn,Qn){var Pn=g.update(mt);tt.uniforms.shadow_pass.value=Dn.map.texture,tt.uniforms.resolution.value=Dn.mapSize,tt.uniforms.radius.value=Dn.radius,u.setRenderTarget(Dn.mapPass),u.clear(),u.renderBufferDirect(Qn,null,Pn,tt,mt,null),ot.uniforms.shadow_pass.value=Dn.mapPass.texture,ot.uniforms.resolution.value=Dn.mapSize,ot.uniforms.radius.value=Dn.radius,u.setRenderTarget(Dn.map),u.clear(),u.renderBufferDirect(Qn,null,Pn,ot,mt,null)}function nn(Dn,Qn,Pn){var cr=Dn<<0|Qn<<1|Pn<<2,Cr=ge[cr];return Cr===void 0&&(Cr=new js({depthPacking:ko,morphTargets:Dn,skinning:Qn}),ge[cr]=Cr),Cr}function fn(Dn,Qn,Pn){var cr=Dn<<0|Qn<<1|Pn<<2,Cr=Ee[cr];return Cr===void 0&&(Cr=new Sl({morphTargets:Dn,skinning:Qn}),Ee[cr]=Cr),Cr}function An(Dn,Qn,Pn,cr,Cr,_r){var Er=Dn.geometry,Vr=null,si=nn,Ar=Dn.customDepthMaterial;if(Pn.isPointLight===!0&&(si=fn,Ar=Dn.customDistanceMaterial),Ar===void 0){var vr=!1;Qn.morphTargets===!0&&(Er.isBufferGeometry===!0?vr=Er.morphAttributes&&Er.morphAttributes.position&&0C||K.y>C)&&(console.warn("THREE.WebGLShadowMap:",Ar,"has shadow exceeding max texture size, reducing"),K.x>C&&(ie.x=Math.floor(C/yi.x),K.x=ie.x*yi.x,vr.mapSize.x=ie.x),K.y>C&&(ie.y=Math.floor(C/yi.y),K.y=ie.y*yi.y,vr.mapSize.y=ie.y)),vr.map===null&&!vr.isPointLightShadow&&this.type===_){var Bi={minFilter:sn,magFilter:sn,format:dt};vr.map=new Rs(K.x,K.y,Bi),vr.map.texture.name=Ar.name+".shadowMap",vr.mapPass=new Rs(K.x,K.y,Bi),vr.camera.updateProjectionMatrix()}vr.map===null&&(Bi={minFilter:Ie,magFilter:Ie,format:dt},vr.map=new Rs(K.x,K.y,Bi),vr.map.texture.name=Ar.name+".shadowMap",vr.camera.updateProjectionMatrix()),u.setRenderTarget(vr.map),u.clear();for(var ya=vr.getViewportCount(),sa=0;saZr||Mn.height>Zr)&&(Ga=Zr/Math.max(Mn.width,Mn.height)),Ga<1||Wn===!0){if(typeof HTMLImageElement!="undefined"&&Mn instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&Mn instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&Mn instanceof ImageBitmap){var ia=Wn?Ta.floorPowerOfTwo:Math.floor,Tr=ia(Ga*Mn.width),la=ia(Ga*Mn.height);ge===void 0&&(ge=Tt(Tr,la));var qa=ai?Tt(Tr,la):ge;return qa.width=Tr,qa.height=la,qa.getContext("2d").drawImage(Mn,0,0,Tr,la),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Mn.width+"x"+Mn.height+") to ("+Tr+"x"+la+")."),qa}return"data"in Mn&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Mn.width+"x"+Mn.height+")."),Mn}return Mn}function nn(Mn){return Ta.isPowerOfTwo(Mn.width)&&Ta.isPowerOfTwo(Mn.height)}function fn(Mn,Wn){return Mn.generateMipmaps&&Wn&&Mn.minFilter!==Ie&&Mn.minFilter!==sn}function An(Mn,Wn,ai,Zr){u.generateMipmap(Mn),L.get(Wn).__maxMipLevel=Math.log(Math.max(ai,Zr))*Math.LOG2E}function zn(Mn,Wn,ai){if(Ee===!1)return Wn;if(Mn!==null){if(u[Mn]!==void 0)return u[Mn];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Mn+"'")}var Zr=Wn;return Wn===6403&&(ai===5126&&(Zr=33326),ai===5131&&(Zr=33325),ai===5121&&(Zr=33321)),Wn===6407&&(ai===5126&&(Zr=34837),ai===5131&&(Zr=34843),ai===5121&&(Zr=32849)),Wn===6408&&(ai===5126&&(Zr=34836),ai===5131&&(Zr=34842),ai===5121&&(Zr=32856)),Zr===33325||Zr===33326||Zr===34842||Zr===34836?g.get("EXT_color_buffer_float"):Zr!==34843&&Zr!==34837||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),Zr}function Dn(Mn){return Mn===Ie||Mn===ct||Mn===Ht?9728:9729}function Qn(Mn){var Wn=Mn.target;Wn.removeEventListener("dispose",Qn),function(ai){var Zr=L.get(ai);Zr.__webglInit!==void 0&&(u.deleteTexture(Zr.__webglTexture),L.remove(ai))}(Wn),Wn.isVideoTexture&&Oe.delete(Wn),ce.memory.textures--}function Pn(Mn){var Wn=Mn.target;Wn.removeEventListener("dispose",Pn),function(ai){var Zr=L.get(ai),Ga=L.get(ai.texture);if(ai){if(Ga.__webglTexture!==void 0&&u.deleteTexture(Ga.__webglTexture),ai.depthTexture&&ai.depthTexture.dispose(),ai.isWebGLCubeRenderTarget)for(var ia=0;ia<6;ia++)u.deleteFramebuffer(Zr.__webglFramebuffer[ia]),Zr.__webglDepthbuffer&&u.deleteRenderbuffer(Zr.__webglDepthbuffer[ia]);else u.deleteFramebuffer(Zr.__webglFramebuffer),Zr.__webglDepthbuffer&&u.deleteRenderbuffer(Zr.__webglDepthbuffer);if(ai.isWebGLMultiviewRenderTarget){u.deleteTexture(Zr.__webglColorTexture),u.deleteTexture(Zr.__webglDepthStencilTexture),ce.memory.textures-=2,ia=0;for(var Tr=Zr.__webglViewFramebuffers.length;iaMa)return!1;for(var T=1,P=y.length;Tu.far||g.push({distance:ge,point:Cu.clone(),uv:ds.getUV(Cu,fl,jd,Lh,Jp,op,If,new Lr),face:null,object:this})}},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(u){return Sn.prototype.copy.call(this,u),u.center!==void 0&&this.center.copy(u.center),this}});var ed=new Kt,Ud=new Kt;function ac(){Sn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function Su(u,g){u&&u.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),hs.call(this,u,g),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Ki,this.bindMatrixInverse=new Ki}ac.prototype=Object.assign(Object.create(Sn.prototype),{constructor:ac,isLOD:!0,copy:function(u){Sn.prototype.copy.call(this,u,!1);for(var g=u.levels,C=0,L=g.length;C=g[L].distance;L++)g[L-1].object.visible=!1,g[L].object.visible=!0;for(;Lu.far||g.push({distance:Dn,point:Ae.clone().applyMatrix4(this.matrixWorld),index:Tt,face:null,faceIndex:null,object:this}))}else for(Tt=0,At=Oe.length/3-1;Ttu.far||g.push({distance:Dn,point:Ae.clone().applyMatrix4(this.matrixWorld),index:Tt,face:null,faceIndex:null,object:this}))}else if(L.isGeometry){var An=L.vertices,zn=An.length;for(Tt=0;Ttu.far||g.push({distance:Dn,point:Ae.clone().applyMatrix4(this.matrixWorld),index:Tt,face:null,faceIndex:null,object:this}))}}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var Go=new Kt,up=new Kt;function Fs(u,g){tu.call(this,u,g),this.type="LineSegments"}function Md(u,g){tu.call(this,u,g),this.type="LineLoop"}function Eu(u){Wt.call(this),this.type="PointsMaterial",this.color=new Fn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(u)}Fs.prototype=Object.assign(Object.create(tu.prototype),{constructor:Fs,isLineSegments:!0,computeLineDistances:function(){var u=this.geometry;if(u.isBufferGeometry)if(u.index===null){for(var g=u.attributes.position,C=[],L=0,K=g.count;LK.far)return;ie.push({distance:Ae,distanceToRay:Math.sqrt(ge),point:Ee,index:g,face:null,object:ce})}}function Hd(u,g,C,L,K,ie,ce,ge,Ee){vo.call(this,u,g,C,L,K,ie,ce,ge,Ee),this.format=ce!==void 0?ce:jt,this.minFilter=ie!==void 0?ie:sn,this.magFilter=K!==void 0?K:sn,this.generateMipmaps=!1}function kp(u,g,C,L,K,ie,ce,ge,Ee,Ae,We,tt){vo.call(this,null,ie,ce,ge,Ee,Ae,L,K,We,tt),this.image={width:g,height:C},this.mipmaps=u,this.flipY=!1,this.generateMipmaps=!1}function dh(u,g,C,L,K,ie,ce,ge,Ee){vo.call(this,u,g,C,L,K,ie,ce,ge,Ee),this.needsUpdate=!0}function dp(u,g,C,L,K,ie,ce,ge,Ee,Ae){if((Ae=Ae!==void 0?Ae:mn)!==mn&&Ae!==Un)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");C===void 0&&Ae===mn&&(C=xn),C===void 0&&Ae===Un&&(C=wi),vo.call(this,null,L,K,ie,ce,ge,Ae,C,Ee),this.image={width:u,height:g},this.magFilter=ce!==void 0?ce:Ie,this.minFilter=ge!==void 0?ge:Ie,this.flipY=!1,this.generateMipmaps=!1}function hp(u){qi.call(this),this.type="WireframeGeometry";var g,C,L,K,ie,ce,ge,Ee,Ae,We,tt=[],ot=[0,0],Oe={},mt=["a","b","c"];if(u&&u.isGeometry){var Tt=u.faces;for(g=0,L=Tt.length;gie.x?K.x>ce.x?K.x:ce.x:ie.x>ce.x?ie.x:ce.x,We=K.y>ie.y?K.y>ce.y?K.y:ce.y:ie.y>ce.y?ie.y:ce.y,tt=sc(ge,Ee,g,C,L),ot=sc(Ae,We,g,C,L),Oe=u.prevZ,mt=u.nextZ;Oe&&Oe.z>=tt&&mt&&mt.z<=ot;){if(Oe!==u.prev&&Oe!==u.next&&$u(K.x,K.y,ie.x,ie.y,ce.x,ce.y,Oe.x,Oe.y)&&0<=xs(Oe.prev,Oe,Oe.next)||(Oe=Oe.prevZ,mt!==u.prev&&mt!==u.next&&$u(K.x,K.y,ie.x,ie.y,ce.x,ce.y,mt.x,mt.y)&&0<=xs(mt.prev,mt,mt.next)))return;mt=mt.nextZ}for(;Oe&&Oe.z>=tt;){if(Oe!==u.prev&&Oe!==u.next&&$u(K.x,K.y,ie.x,ie.y,ce.x,ce.y,Oe.x,Oe.y)&&0<=xs(Oe.prev,Oe,Oe.next))return;Oe=Oe.prevZ}for(;mt&&mt.z<=ot;){if(mt!==u.prev&&mt!==u.next&&$u(K.x,K.y,ie.x,ie.y,ce.x,ce.y,mt.x,mt.y)&&0<=xs(mt.prev,mt,mt.next))return;mt=mt.nextZ}return 1}}function Yd(u,g,C){var L=u;do{var K=L.prev,ie=L.next.next;!nd(K,ie)&&ms(K,L,L.next,ie)&&mh(K,ie)&&mh(ie,K)&&(g.push(K.i/C),g.push(L.i/C),g.push(ie.i/C),Dd(L),Dd(L.next),L=u=ie),L=L.next}while(L!==u);return L}function Uu(u,g,C,L,K,ie){var ce,ge,Ee=u;do{for(var Ae=Ee.next.next;Ae!==Ee.prev;){if(Ee.i!==Ae.i&&(ge=Ae,(ce=Ee).next.i!==ge.i&&ce.prev.i!==ge.i&&!function(tt,ot){var Oe=tt;do{if(Oe.i!==tt.i&&Oe.next.i!==tt.i&&Oe.i!==ot.i&&Oe.next.i!==ot.i&&ms(Oe,Oe.next,tt,ot))return 1;Oe=Oe.next}while(Oe!==tt)}(ce,ge)&&mh(ce,ge)&&mh(ge,ce)&&function(tt,ot){for(var Oe=tt,mt=!1,Tt=(tt.x+ot.x)/2,At=(tt.y+ot.y)/2;Oe.y>At!=Oe.next.y>At&&Oe.next.y!==Oe.y&&Tt<(Oe.next.x-Oe.x)*(At-Oe.y)/(Oe.next.y-Oe.y)+Oe.x&&(mt=!mt),(Oe=Oe.next)!==tt;);return mt}(ce,ge))){var We=Pp(Ee,Ae);return Ee=Wd(Ee,Ee.next),We=Wd(We,We.next),fh(Ee,g,C,L,K,ie),void fh(We,g,C,L,K,ie)}Ae=Ae.next}Ee=Ee.next}while(Ee!==u)}function Pf(u,g){return u.x-g.x}function Lc(u,g){if(g=function(L,K){var ie,ce=K,ge=L.x,Ee=L.y,Ae=-1/0;do{if(Ee<=ce.y&&Ee>=ce.next.y&&ce.next.y!==ce.y){var We=ce.x+(Ee-ce.y)*(ce.next.x-ce.x)/(ce.next.y-ce.y);if(We<=ge&&Ae=ce.x&&ce.x>=Oe&&ge!==ce.x&&$u(Eeie.x)&&mh(ce,L)&&(ie=ce,Tt=tt),ce=ce.next;return ie}(u,g)){var C=Pp(g,u);Wd(C,C.next)}}function sc(u,g,C,L,K){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=32767*(u-C)*K)|u<<8))|u<<4))|u<<2))|u<<1))|(g=1431655765&((g=858993459&((g=252645135&((g=16711935&((g=32767*(g-L)*K)|g<<8))|g<<4))|g<<2))|g<<1))<<1}function so(u){for(var g=u,C=u;(g.x=u.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),((kp.prototype=Object.create(vo.prototype)).constructor=kp).prototype.isCompressedTexture=!0,((dh.prototype=Object.create(vo.prototype)).constructor=dh).prototype.isCanvasTexture=!0,((dp.prototype=Object.create(vo.prototype)).constructor=dp).prototype.isDepthTexture=!0,(hp.prototype=Object.create(qi.prototype)).constructor=hp,(vl.prototype=Object.create(Fa.prototype)).constructor=vl,(Ic.prototype=Object.create(qi.prototype)).constructor=Ic,(hh.prototype=Object.create(Fa.prototype)).constructor=hh,(_l.prototype=Object.create(qi.prototype)).constructor=_l,(ro.prototype=Object.create(Fa.prototype)).constructor=ro,(Nh.prototype=Object.create(_l.prototype)).constructor=Nh,(du.prototype=Object.create(Fa.prototype)).constructor=du,(Hs.prototype=Object.create(_l.prototype)).constructor=Hs,(Pc.prototype=Object.create(Fa.prototype)).constructor=Pc,(ph.prototype=Object.create(_l.prototype)).constructor=ph,(Vh.prototype=Object.create(Fa.prototype)).constructor=Vh,(Au.prototype=Object.create(_l.prototype)).constructor=Au,(zh.prototype=Object.create(Fa.prototype)).constructor=zh,((Ed.prototype=Object.create(qi.prototype)).constructor=Ed).prototype.toJSON=function(){var u=qi.prototype.toJSON.call(this);return u.path=this.parameters.path.toJSON(),u},(fs.prototype=Object.create(Fa.prototype)).constructor=fs,(Ws.prototype=Object.create(qi.prototype)).constructor=Ws,(pp.prototype=Object.create(Fa.prototype)).constructor=pp,(Rc.prototype=Object.create(qi.prototype)).constructor=Rc;var rd={area:function(u){for(var g=u.length,C=0,L=g-1,K=0;K80*We){tt=Oe=Ee[0],ot=mt=Ee[1];for(var Qn=We;QnNumber.EPSILON){var Tp=Math.sqrt(qp),Qh=Math.sqrt(Od*Od+Fd*Fd),Dp=Fo.x-qu/Tp,xc=Fo.y+Ru/Tp,Ap=((ls.x-Fd/Qh-Dp)*Fd-(ls.y+Od/Qh-xc)*Od)/(Ru*Fd-qu*Od),Af=(Ll=Dp+Ru*Ap-To.x)*Ll+(us=xc+qu*Ap-To.y)*us;if(Af<=2)return new Lr(Ll,us);ml=Math.sqrt(Af/2)}else{var gu=!1;Ru>Number.EPSILON?Od>Number.EPSILON&&(gu=!0):Ru<-Number.EPSILON?Od<-Number.EPSILON&&(gu=!0):Math.sign(qu)===Math.sign(Fd)&&(gu=!0),ml=gu?(Ll=-qu,us=Ru,Math.sqrt(qp)):(Ll=Ru,us=qu,Math.sqrt(qp/2))}return new Lr(Ll/ml,us/ml)}for(var ia=[],Tr=0,la=Bi.length,qa=la-1,lr=Tr+1;Trie.tracks[ge].times[0]&&(Tt=ie.tracks[ge].times[0]);for(ge=0;ge>>1;ug;)--ie;if(++ie,K!==0||ie!==L){ie<=K&&(K=(ie=Math.max(ie,1))-1);var ce=this.getValueSize();this.times=Ys.arraySlice(C,K,ie),this.values=Ys.arraySlice(this.values,K*ce,ie*ce)}return this},validate:function(){var u=!0,g=this.getValueSize();g-Math.floor(g)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),u=!1);var C=this.times,L=this.values,K=C.length;K===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),u=!1);for(var ie=null,ce=0;ce!==K;ce++){var ge=C[ce];if(typeof ge=="number"&&isNaN(ge)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,ce,ge),u=!1;break}if(ie!==null&&geNumber.EPSILON&&(Ae.normalize(),K=Math.acos(Ta.clamp(ce[C-1].dot(ce[C]),-1,1)),ge[C].applyMatrix4(We.makeRotationAxis(Ae,K))),Ee[C].crossVectors(ce[C],ge[C]);if(g===!0)for(K=Math.acos(Ta.clamp(ge[0].dot(ge[u]),-1,1)),K/=u,0L.length-2?L.length-1:ie+1],We=L[ie>L.length-3?L.length-1:ie+2];return C.set(Ui(ce,ge.x,Ee.x,Ae.x,We.x),Ui(ce,ge.y,Ee.y,Ae.y,We.y)),C},Qo.prototype.copy=function(u){ur.prototype.copy.call(this,u),this.points=[];for(var g=0,C=u.points.length;g=g){var K=C[L]-g,ie=this.curves[L],ce=ie.getLength(),ge=ce===0?0:1-K/ce;return ie.getPointAt(ge)}L++}return null},getLength:function(){var u=this.getCurveLengths();return u[u.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var u=[],g=0,C=0,L=this.curves.length;CNumber.EPSILON){if(Wn<0&&($a=yi[oa],Mn=-Mn,ta=yi[sa],Wn=-Wn),vr.y<$a.y||vr.y>ta.y)continue;if(vr.y===$a.y){if(vr.x===$a.x)return 1}else{var ai=Wn*(vr.x-$a.x)-Mn*(vr.y-$a.y);if(ai==0)return 1;if(ai<0)continue;ya=!ya}}else{if(vr.y!==$a.y)continue;if(ta.x<=vr.x&&vr.x<=$a.x||$a.x<=vr.x&&vr.x<=ta.x)return 1}}return ya}var K=rd.isClockWise,ie=this.subPaths;if(ie.length===0)return[];if(g===!0)return C(ie);var ce,ge,Ee,Ae=[];if(ie.length===1)return ge=ie[0],(Ee=new Wu).curves=ge.curves,Ae.push(Ee),Ae;var We=!K(ie[0].getPoints());We=u?!We:We;var tt,ot,Oe=[],mt=[],Tt=[],At=0;mt[At]=void 0,Tt[At]=[];for(var nn=0,fn=ie.length;nnC.parameterPositions[1]&&(this.stopFading(),L===0&&(this.enabled=!1))}}return this._effectiveWeight=g},_updateTimeScale:function(u){var g=0;if(!this.paused){g=this.timeScale;var C=this._timeScaleInterpolant;C!==null&&(g*=C.evaluate(u)[0],u>C.parameterPositions[1]&&(this.stopWarping(),g===0?this.paused=!0:this.timeScale=g))}return this._effectiveTimeScale=g},_updateTime:function(u){var g=this.time+u,C=this._clip.duration,L=this.loop,K=this._loopCount,ie=L===2202;if(u===0)return K!==-1&&ie&&(1&K)==1?C-g:g;if(L===2200){K===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(C<=g)g=C;else{if(!(g<0)){this.time=g;break e}g=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=g,this._mixer.dispatchEvent({type:"finished",action:this,direction:u<0?-1:1})}}else{if(K===-1&&(0<=u?(K=0,this._setEndings(!0,this.repetitions===0,ie)):this._setEndings(this.repetitions===0,!0,ie)),C<=g||g<0){var ce=Math.floor(g/C);g-=C*ce,K+=Math.abs(ce);var ge=this.repetitions-K;if(ge<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,g=0this.max.x||u.ythis.max.y)},containsBox:function(u){return this.min.x<=u.min.x&&u.max.x<=this.max.x&&this.min.y<=u.min.y&&u.max.y<=this.max.y},getParameter:function(u,g){return g===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),g=new Lr),g.set((u.x-this.min.x)/(this.max.x-this.min.x),(u.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(u){return!(u.max.xthis.max.x||u.max.ythis.max.y)},clampPoint:function(u,g){return g===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),g=new Lr),g.copy(u).clamp(this.min,this.max)},distanceToPoint:function(u){return Zf.copy(u).clamp(this.min,this.max).sub(u).length()},intersect:function(u){return this.min.max(u.min),this.max.min(u.max),this},union:function(u){return this.min.min(u.min),this.max.max(u.max),this},translate:function(u){return this.min.add(u),this.max.add(u),this},equals:function(u){return u.min.equals(this.min)&&u.max.equals(this.max)}});var Rm=new Kt,ff=new Kt;function Kf(u,g){this.start=u!==void 0?u:new Kt,this.end=g!==void 0?g:new Kt}function ym(u){Sn.call(this),this.material=u,this.render=function(){}}Object.assign(Kf.prototype,{set:function(u,g){return this.start.copy(u),this.end.copy(g),this},clone:function(){return new this.constructor().copy(this)},copy:function(u){return this.start.copy(u.start),this.end.copy(u.end),this},getCenter:function(u){return u===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),u=new Kt),u.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(u){return u===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),u=new Kt),u.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(u,g){return g===void 0&&(console.warn("THREE.Line3: .at() target is now required"),g=new Kt),this.delta(g).multiplyScalar(u).add(this.start)},closestPointToPointParameter:function(u,g){Rm.subVectors(u,this.start),ff.subVectors(this.end,this.start);var C=ff.dot(ff),L=ff.dot(Rm)/C;return g&&(L=Ta.clamp(L,0,1)),L},closestPointToPoint:function(u,g,C){var L=this.closestPointToPointParameter(u,g);return C===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),C=new Kt),this.delta(C).multiplyScalar(L).add(this.start)},applyMatrix4:function(u){return this.start.applyMatrix4(u),this.end.applyMatrix4(u),this},equals:function(u){return u.start.equals(this.start)&&u.end.equals(this.end)}}),((ym.prototype=Object.create(Sn.prototype)).constructor=ym).prototype.isImmediateRenderObject=!0;var vm=new Kt;function mf(u,g){Sn.call(this),this.light=u,this.light.updateMatrixWorld(),this.matrix=u.matrixWorld,this.matrixAutoUpdate=!1,this.color=g;for(var C=new qi,L=[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],K=0,ie=1;K<32;K++,ie++){var ce=K/32*Math.PI*2,ge=ie/32*Math.PI*2;L.push(Math.cos(ce),Math.sin(ce),1,Math.cos(ge),Math.sin(ge),1)}C.setAttribute("position",new Fr(L,3));var Ee=new ss({fog:!1});this.cone=new Fs(C,Ee),this.add(this.cone),this.update()}((mf.prototype=Object.create(Sn.prototype)).constructor=mf).prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},mf.prototype.update=function(){this.light.updateMatrixWorld();var u=this.light.distance?this.light.distance:1e3,g=u*Math.tan(this.light.angle);this.cone.scale.set(g,g,u),vm.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(vm),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Qd=new Kt,Gp=new Ki,Jf=new Ki;function Qf(u){for(var g=function We(tt){var ot=[];tt&&tt.isBone&&ot.push(tt);for(var Oe=0;Oe vec4 inputTexelToLinear(vec4 value){ if(inputEncoding == 0){ return value; }else if(inputEncoding == 1){ return sRGBToLinear(value); }else if(inputEncoding == 2){ return RGBEToLinear(value); }else if(inputEncoding == 3){ return RGBMToLinear(value, 7.0); }else if(inputEncoding == 4){ return RGBMToLinear(value, 16.0); }else if(inputEncoding == 5){ return RGBDToLinear(value, 256.0); }else{ return GammaToLinear(value, 2.2); } } vec4 linearToOutputTexel(vec4 value){ if(outputEncoding == 0){ return value; }else if(outputEncoding == 1){ return LinearTosRGB(value); }else if(outputEncoding == 2){ return LinearToRGBE(value); }else if(outputEncoding == 3){ return LinearToRGBM(value, 7.0); }else if(outputEncoding == 4){ return LinearToRGBM(value, 16.0); }else if(outputEncoding == 5){ return LinearToRGBD(value, 256.0); }else{ return LinearToGamma(value, 2.2); } } vec4 envMapTexelToLinear(vec4 color) { return inputTexelToLinear(color); } #define ENVMAP_TYPE_CUBE_UV #include void main() { gl_FragColor = vec4(0.0); for (int i = 0; i < n; i++) { if (i >= samples) break; for (int dir = -1; dir < 2; dir += 2) { if (i == 0 && dir == 1) continue; vec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection); if (all(equal(axis, vec3(0.0)))) axis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection); axis = normalize(axis); float theta = dTheta * float(dir * i); float cosTheta = cos(theta); // Rodrigues' axis-angle rotation vec3 sampleDirection = vOutputDirection * cosTheta + cross(axis, vOutputDirection) * sin(theta) + axis * dot(axis, vOutputDirection) * (1.0 - cosTheta); gl_FragColor.rgb += weights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt); } } gl_FragColor = linearToOutputTexel(gl_FragColor); } `,blending:N,depthTest:!1,depthWrite:!1})).type="SphericalGaussianBlur",Ch),th=null,Sh=null,Cm=function(){for(var u=[],g=[],C=[],L=Gc,K=0;K vec4 inputTexelToLinear(vec4 value){ if(inputEncoding == 0){ return value; }else if(inputEncoding == 1){ return sRGBToLinear(value); }else if(inputEncoding == 2){ return RGBEToLinear(value); }else if(inputEncoding == 3){ return RGBMToLinear(value, 7.0); }else if(inputEncoding == 4){ return RGBMToLinear(value, 16.0); }else if(inputEncoding == 5){ return RGBDToLinear(value, 256.0); }else{ return GammaToLinear(value, 2.2); } } vec4 linearToOutputTexel(vec4 value){ if(outputEncoding == 0){ return value; }else if(outputEncoding == 1){ return LinearTosRGB(value); }else if(outputEncoding == 2){ return LinearToRGBE(value); }else if(outputEncoding == 3){ return LinearToRGBM(value, 7.0); }else if(outputEncoding == 4){ return LinearToRGBM(value, 16.0); }else if(outputEncoding == 5){ return LinearToRGBD(value, 256.0); }else{ return LinearToGamma(value, 2.2); } } vec4 envMapTexelToLinear(vec4 color) { return inputTexelToLinear(color); } #define RECIPROCAL_PI 0.31830988618 #define RECIPROCAL_PI2 0.15915494 void main() { gl_FragColor = vec4(0.0); vec3 outputDirection = normalize(vOutputDirection); vec2 uv; uv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5; uv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5; vec2 f = fract(uv / texelSize - 0.5); uv -= f * texelSize; vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x += texelSize.x; vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.y += texelSize.y; vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb; uv.x -= texelSize.x; vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb; vec3 tm = mix(tl, tr, f.x); vec3 bm = mix(bl, br, f.x); gl_FragColor.rgb = mix(tm, bm, f.y); gl_FragColor = linearToOutputTexel(gl_FragColor); } `,blending:N,depthTest:!1,depthWrite:!1});return u.type="EquirectangularToCubeUV",u}function im(){var u=new Id({uniforms:{envMap:{value:null},inputEncoding:{value:hu[bn]},outputEncoding:{value:hu[bn]}},vertexShader:` precision mediump float; precision mediump int; attribute vec3 position; attribute vec2 uv; attribute float faceIndex; varying vec3 vOutputDirection; vec3 getDirection(vec2 uv, float face) { uv = 2.0 * uv - 1.0; vec3 direction = vec3(uv, 1.0); if (face == 0.0) { direction = direction.zyx; direction.z *= -1.0; } else if (face == 1.0) { direction = direction.xzy; direction.z *= -1.0; } else if (face == 3.0) { direction = direction.zyx; direction.x *= -1.0; } else if (face == 4.0) { direction = direction.xzy; direction.y *= -1.0; } else if (face == 5.0) { direction.xz *= -1.0; } return direction; } void main() { vOutputDirection = getDirection(uv, faceIndex); gl_Position = vec4( position, 1.0 ); } `,fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform samplerCube envMap; uniform int inputEncoding; uniform int outputEncoding; #include vec4 inputTexelToLinear(vec4 value){ if(inputEncoding == 0){ return value; }else if(inputEncoding == 1){ return sRGBToLinear(value); }else if(inputEncoding == 2){ return RGBEToLinear(value); }else if(inputEncoding == 3){ return RGBMToLinear(value, 7.0); }else if(inputEncoding == 4){ return RGBMToLinear(value, 16.0); }else if(inputEncoding == 5){ return RGBDToLinear(value, 256.0); }else{ return GammaToLinear(value, 2.2); } } vec4 linearToOutputTexel(vec4 value){ if(outputEncoding == 0){ return value; }else if(outputEncoding == 1){ return LinearTosRGB(value); }else if(outputEncoding == 2){ return LinearToRGBE(value); }else if(outputEncoding == 3){ return LinearToRGBM(value, 7.0); }else if(outputEncoding == 4){ return LinearToRGBM(value, 16.0); }else if(outputEncoding == 5){ return LinearToRGBD(value, 256.0); }else{ return LinearToGamma(value, 2.2); } } vec4 envMapTexelToLinear(vec4 color) { return inputTexelToLinear(color); } void main() { gl_FragColor = vec4(0.0); gl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb; gl_FragColor = linearToOutputTexel(gl_FragColor); } `,blending:N,depthTest:!1,depthWrite:!1});return u.type="CubemapToCubeUV",u}function $m(u){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),fa.call(this,u),this.type="catmullrom",this.closed=!0}function Hm(u){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),fa.call(this,u),this.type="catmullrom"}function am(u){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),fa.call(this,u),this.type="catmullrom"}Ef.prototype={constructor:Ef,fromScene:function(u,g,C,L){g===void 0&&(g=0),C===void 0&&(C=.1),L===void 0&&(L=100),Sf=ol.getRenderTarget();var K=Sm();return function(ie,ce,ge,Ee){var Ae=new Js(90,1,ce,ge),We=[1,1,1,1,-1,1],tt=[1,1,-1,-1,-1,1],ot=ol.outputEncoding,Oe=ol.toneMapping,mt=ol.toneMappingExposure,Tt=ol.getClearColor(),At=ol.getClearAlpha();ol.toneMapping=Ke,ol.toneMappingExposure=1,ol.outputEncoding=bn,ie.scale.z*=-1;var nn=ie.background;if(nn&&nn.isColor){nn.convertSRGBToLinear();var fn=Math.max(nn.r,nn.g,nn.b),An=Math.min(Math.max(Math.ceil(Math.log2(fn)),-128),127);nn=nn.multiplyScalar(Math.pow(2,-An));var zn=(An+128)/255;ol.setClearColor(nn,zn),ie.background=null}for(var Dn=0;Dn<6;Dn++){var Qn=Dn%3;Qn==0?(Ae.up.set(0,We[Dn],0),Ae.lookAt(tt[Dn],0,0)):Qn==1?(Ae.up.set(0,0,We[Dn]),Ae.lookAt(0,tt[Dn],0)):(Ae.up.set(0,We[Dn],0),Ae.lookAt(0,0,tt[Dn])),Tm(Ee,Qn*ud,2_.x)q=w.MxThreeJS.createLines(B,16777215),D=255;else{var F=V.getMcEdJig().getMxObject().viewCoordLong2Cad(3);q=w.MxThreeJS.createDashedLines(B,16777215,2*F,F)}var re=[];re.push(_),re.push(ne),re.push(G),re.push(_),re.push(G),re.push(W);var le=w.MxThreeJS.createTriangle(re,D,.27);V.drawEntity(le,30),V.drawEntity(q,31)}else q=w.MxThreeJS.createLines(B,16777215),V.drawEntity(q,31)}),A.setUserDraw(z),A.go(function(G){I&&I({status:G,detailedResult:A.getDetailedResult()}),G!=0?N(null):(A.clearLastInputPoint(),N(A.value()))})})}},{"./MxThreeJS":36,"./Operate/MrxDbgUiPrBase":44,"./Operate/MrxDbgUiPrPoint":46,"./Operate/MxEntSelJig":49,"./Operate/MxJigCmdManager":53,"./UI/MxUiVue":63,three:19}],21:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MxDrawCommands=void 0;var n=t("./MxFun"),o=t("./MxType"),s=t("./Operate/MxIntelliSelect"),c=t("./Operate/MxJigCmdManager"),l=t("./MxWindowsEvent");function v(O){if(O!=null&&O.pt1!=null){var N=new s.MxIntelliSelectJig(O.pt1);N.setDisableDynInput(!0),N.setDisableOsnap(!0);var A=O.pt1,z=n.MxFun.getCurrentMx();z.isMultipleSelect||z.getMcObject().isValid()&&z.getMcObject().getGripManager().clearAll(),N.doPointSelect(n.MxFun.getCurrentMx(),O.pt1,function(G){if(JSON.parse(G).lCount!=0&&z.isMultipleSelect){var V=l.MxWindowsEvent.getCurrentMousePostion();if(z.screenCoord2Current(V.x,V.y,0).distanceTo(A)me.x){var ye=fe.x;fe.x=me.x,me.x=ye}if(fe.y>me.y){var Te=fe.y;fe.y=me.y,me.y=Te}this.reInit(),this._devicePixelRatio=window.devicePixelRatio,this._openFile="",this._openFileExtName="dwg",this._iniParam=[],this._initZoomwCoordPt1=null,this._initZoomWCoordPt2=null;var ke=new c.Matrix4;ke.identity(),this.intiDoc2Wold(ke),this.initCAD2Doc(ke),this.initializingObjectMatrix(),this.mxdrawThreeJS.updateCameraDisplayRange(fe,me,0),this.updateDisplay(!0);var Le=l.MxFun.getUiObj();Le!=null&&(Le.SetLayoutData(this._allLayoutName),Le.UpDisplayLayout())},q.prototype.calcViewsize=function(){if(this._userCanvas==null)return{viewWidth:window.innerWidth,viewHeight:window.innerHeight};var D=this._userCanvas.clientWidth,F=this._userCanvas.clientHeight;if(this._event.onResize!=null){var re=this._event.onResize;re instanceof Array&&(re=re[0]);var le=re();le!=null&&(D=parseInt(le.width),F=parseInt(le.height))}return{viewWidth:D,viewHeight:F}},q.prototype.initMxCpp=function(D){D&&D.getImp()?(this.mcObject.init(this,D),this.secenView!=null?this.secenView.background=null:this.scene.background=null):console.log("mxerror: mcppObjectImp is null")},q.prototype.create=function(D,F,re,le){if(this._is2d?this.mxdrawThreeJS=le?new A.MxDrawMapBoxThreeJS(le,this):new A.MxDrawObject2dThreeJS(this):this.mxdrawThreeJS=new A.MxDrawObject3dThreeJS(this),this._callCreateCanvasImageData=void 0,this._devicePixelRatio=window.devicePixelRatio,this._runMode==n.kCPPMxCAD)this._openFile="";else{if(F instanceof Array?(this._openFile=F[0],this._staticLoadingOpenFiles=F):this._openFile=F,this._iniParam=l.MxFun.getUrlParams(),this._openFileExtName=this._openFile.substring(this._openFile.lastIndexOf(".")+1),this._openFile!=""){var fe=new Array;fe.push("file"),fe.push(this._openFile),this._iniParam.push(fe)}this._userIdentitySign!=""&&(this.addInitParam("userIdentitySign",this._userIdentitySign),this.addInitParam("userRandomToken",this._userRandomToken)),this.addInitParam("runMode","browse")}this._userCanvas=D;var me=window.innerWidth,ye=window.innerHeight;if(D!=null&&(me=D.clientWidth,ye=D.clientHeight),this._viewWidth=me,this._viewHeight=ye,this.m_mxDatabase.getSelectManager().setCanvasSize(me,ye),this.mxdrawThreeJS.onInitThreejs(),this.eventManager.registEvent(this),this.onCreate(),this.m_mxDatabase.init(this),this._parentDocObject=new c.Object3D,this.scene.add(this._parentDocObject),this._parentDocObject_SmallCoord=new c.Object3D,this.scene.add(this._parentDocObject_SmallCoord),this.threejsselectObjects=new c.Object3D,this.scene.add(this.threejsselectObjects),this._objectsOsnap=new O.MxDrawObjectOsnap(this),b.MxManager.add(this),b.MxManager.setCurrentMx(this),this.mxdrawThreeJS.addControlsChangeEvent(),le||this.updateDisplay(),this.mxdrawThreeJS.getType()!=A.MxThreeJSType.kMapBox){var Te=this;if(D==null){var ke=function(){Te._viewWidth=window.innerWidth,Te._viewHeight=window.innerHeight,Te.onResizeImp(),Te.updateDisplay()};window.addEventListener("resize",ke,!1),this._onResizeFun=ke}else{var Le=function(Ve){Ve&&Ve.viewWidth&&Ve.viewHeight||(Ve=Te.calcViewsize()),Te._viewWidth=Ve.viewWidth,Te._viewHeight=Ve.viewHeight,Te.onResizeImp(Te._viewWidth,Te._viewHeight),Te.updateDisplay()};if(this._onResizeFun=Le,this._event.addResizeEvent!=null){var et=this._event.addResizeEvent;et instanceof Array&&(et=et[0]),et(Le,D)}else window.addEventListener("resize",Le,!1);if(window.setTimeout(function(){Le()},5),this._event.onResize!=null){var it=Te.calcViewsize();Le(it);var Ue=0,ht=0,De=!0,Be=window.setInterval(function(){ht++;var Ve=Te.calcViewsize();if(Ve.viewWidth==it.viewWidth&&Ve.viewHeight==it.viewHeight&&0>24&255;vt==2?(Ve.push(dn,Ze),Ve.push(at,Lt),Ve.push(Ne,ze)):vt==1?it!=0&&et?(He.push(dn,Ze),He.push(at,Lt),He.push(Ne,ze)):(Be.push(dn,Ze),Be.push(at,Lt),Be.push(Ne,ze)):(Ke=this.automaticInversionColor(16777215&Ke),ht.push(dn,Ze),ht.push(at,Lt),ht.push(Ne,ze),De.push((255&Ke)/255,(Ke>>8&255)/255,(Ke>>16&255)/255),De.push((255&Ke)/255,(Ke>>8&255)/255,(Ke>>16&255)/255),De.push((255&Ke)/255,(Ke>>8&255)/255,(Ke>>16&255)/255))}var Ft=this._blocks,Ot=this._layers;me!=0&&(Ft=this._extRefManager.getBlocks(me),Ot=this._extRefManager.getLayers(me));var _t=Ft.crateBlock(it);_t.addGeometryMesh(ht,De,Le,Ve,Be,He),Ft.createThreejsObj(_t,this,Ot)}}},q.prototype.mxWebAddEntityForMemorySections=function(D,F){var re=new w.MxNetData(D),le=re.getMemorySectionsHead(),fe=(le.zeroLayerIdIndex,le.databaseIndex);F!=-1&&(fe=F);var me=le.nOffset,ye=this._blocks,Te=this._layers;fe!=0&&(ye=this._extRefManager.getBlocks(fe),Te=this._extRefManager.getLayers(fe));for(var ke=0;ke>10),56320+(1023&Te)))}return le.join("")},q.prototype.mxWebAddEntityFor2dPointTextureBuffers=function(D,F){var re=new w.MxNetData(D),le=re.getdPointTextureBuffersHead(),fe=le.ver,me=(le.zeroLayerIdIndex,le.databaseIndex);F!=-1&&(me=F);for(var ye=le.datasize,Te=0;Te>24&255;$n=Fe==2||Fe==1?16777215:this.automaticInversionColor(16777215&$n),ze.push(Zt,Et),ze.push(rn,wt),ze.push(Yn,pt),Ne.push((255&$n)/255,($n>>8&255)/255,($n>>16&255)/255),Ne.push((255&$n)/255,($n>>8&255)/255,($n>>16&255)/255),Ne.push((255&$n)/255,($n>>8&255)/255,($n>>16&255)/255)}Be.addGeometryTexture(Lt,ze,Ne,Le,at,Ve,He,gt)}}ht.createThreejsObj(Be,this,De)}}},q.prototype.mxWebAddEntityFor2dPointCurveBuffers=function(D,F){var re=new w.MxNetData(D),le=re.getdPointCurveBuffersHead(),fe=le.zeroLayerIdIndex,me=le.databaseIndex;F!=-1&&(me=F);for(var ye=le.datasize,Te=0;Te>24&255;ze==2?(Ve.push(dn,Ze),Ve.push(at,Lt)):ze==1?it!=0&&et?(He.push(dn,Ze),He.push(at,Lt)):(Be.push(dn,Ze),Be.push(at,Lt)):(ht.push(dn,Ze),ht.push(at,Lt),Ne=this.automaticInversionColor(16777215&Ne),De.push((255&Ne)/255,(Ne>>8&255)/255,(Ne>>16&255)/255),De.push((255&Ne)/255,(Ne>>8&255)/255,(Ne>>16&255)/255))}var Ke=this._blocks,vt=this._layers;me!=0&&(Ke=this._extRefManager.getBlocks(me),vt=this._extRefManager.getLayers(me));var Ft=Ke.crateBlock(it);Ft.addGeometryCurve(ht,De,Le,Ve,Be,He),Ke.createThreejsObj(Ft,this,vt)}}},q.prototype.mxWebAddEntityFor2dPointCurveBuffer=function(D,F){var re=new w.MxNetData(D);if(!re.getIsSketchEntity()){var le,fe=re.getLayerId(),me=fe==re.getZeroLayerId(),ye=re.getBlockId();if(!((le=D.getInt32(20,!0)/20)<1)){for(var Te=80,ke=[],Le=[],et=[],it=[],Ue=[],ht=0;ht>24&255;dn==2?(it.push(De,Be),it.push(Ve,He)):dn==1?ye!=0&&me?(Ue.push(De,Be),Ue.push(Ve,He)):(et.push(De,Be),et.push(Ve,He)):(gt=this.automaticInversionColor(16777215>),ke.push(De,Be),ke.push(Ve,He),Le.push((255>)/255,(gt>>8&255)/255,(gt>>16&255)/255),Le.push((255>)/255,(gt>>8&255)/255,(gt>>16&255)/255))}var Ze=re.getDatabaseIndex();F!=-1&&(Ze=F);var at=this._blocks,Lt=this._layers;Ze!=0&&(at=this._extRefManager.getBlocks(Ze),Lt=this._extRefManager.getLayers(Ze));var Ne=at.crateBlock(ye);Ne.addGeometryCurve(ke,Le,fe,it,et,Ue),at.createThreejsObj(Ne,this,Lt)}}},q.prototype.mxWebAddEntityFor2dPointMeshBuffer=function(D,F){var re=new w.MxNetData(D);if(!re.getIsSketchEntity()){var le,fe=re.getLayerId(),me=re.getBlockId(),ye=fe==re.getZeroLayerId();if(!((le=D.getInt32(12,!0)/28)<1)){for(var Te=80,ke=[],Le=[],et=[],it=[],Ue=[],ht=0;ht>24&255;at==2?(it.push(De,Be),it.push(Ve,He),it.push(gt,dn)):at==1?me!=0&&ye?(Ue.push(De,Be),Ue.push(Ve,He),Ue.push(gt,dn)):(et.push(De,Be),et.push(Ve,He),et.push(gt,dn)):(ke.push(De,Be),ke.push(Ve,He),ke.push(gt,dn),Ze=this.automaticInversionColor(16777215&Ze),Le.push((255&Ze)/255,(Ze>>8&255)/255,(Ze>>16&255)/255),Le.push((255&Ze)/255,(Ze>>8&255)/255,(Ze>>16&255)/255),Le.push((255&Ze)/255,(Ze>>8&255)/255,(Ze>>16&255)/255))}var Lt=re.getDatabaseIndex();F!=-1&&(Lt=F);var Ne=this._blocks,ze=this._layers;Lt!=0&&(Ne=this._extRefManager.getBlocks(Lt),ze=this._extRefManager.getLayers(Lt));var Ke=Ne.crateBlock(me);Ke.addGeometryMesh(ke,Le,fe,it,et,Ue),Ne.createThreejsObj(Ke,this,ze)}}},q.prototype.mxWebCreateAllBlocks=function(D,F){var re=new w.MxNetData(D).getDatabaseIndex();F!=-1&&(re=F);var le=this._blocks;re!=0&&(le=this._extRefManager.getBlocks(re)),le.createBlocks(D,this.scene)},q.prototype.mxWebEntitysData=function(D,F){F==-1&&this._objectsOsnap.mxWebEntitysData(D,F)},q.prototype.getObjectOsnap=function(){return this._objectsOsnap},q.prototype.saveMxEntityToJson=function(D){return this.m_mxDatabase.saveJson(D)},q.prototype.getDtabaseJsonString=function(){return JSON.stringify(this.m_mxDatabase.toJsonObject())},q.prototype.loadMxEntityFromJson=function(D){return this.m_mxDatabase.loadJson(D)},q);function q(D){this._is2d=!0,this._runMode=n.kBrowse,this._userCanvas=null,this._openFile="empty",this._staticLoadingOpenFiles=[],this._openFileExtName="",this._userIdentitySign="",this._rendererParam=void 0,this._userRandomToken="",this._isCreate=!1,this.m_iniSet={},this._net=null,this._staticNet=null,this._staticLoadTzNet=null,this._staticLocalNet=null,this._isStaticLocalLoad=!1,this._staticLocalLoadPath="",this._viewWidth=1,this._viewHeight=1,this.m_sysVariable=new E.MxSystemVariable,this._color="#FFFFFF",this._viewcolor=15790320,this._isAnimation=!1,this._isAnimationStarting=!1,this._isWaiteCount=0,this._callCreateCanvasImageData=void 0,this._event={},this.scene=null,this.camera=null,this.secenView=null,this.cameraView=null,this.renderer=null,this.controls=null,this.threejsselectObjectsView=null,this._mouseRightRotate=!1,this._isMouseMiddlePan=1,this._mapId2Entity=new Map,this._setAdyDelete=new Map,this._layers=new v.MxBrowseLayerData,this._blocks=new x.Blocks,this._extRefManager=new x.ExternalReferenceManager,this._doc2World=new c.Matrix4,this._word2doc=new c.Matrix4,this._cad2Doc=new c.Matrix4,this._doc2CAD=new c.Matrix4,this._word2Current=new c.Matrix4,this._current2word=new c.Matrix4,this._allLayoutName=new Array,this._devicePixelRatio=1,this._tzDwgStaticFile="",this._requestHeader="",this._objectsOsnap=null,this._initZoomwCoordPt1=null,this._initZoomWCoordPt2=null,this.m_mxDatabase=null,this._parentDocObject=null,this._parentDocObject_SmallCoord=null,this.threejsselectObjects=null,this._onResizeFun=null,this._sCurrentLoadURL="",this.eventManager=new z.MxDrawObjectEvent,this._viewangle=0,this.id=0,this.mcObject=new V.McDrawObject,this.isPointMultipleSelect=!1,this.isNewObjectMatrix=!0,this.bakControls=void 0,this.isMultipleSelect=!1,this.mxdrawThreeJS=null,this._is2d=D,this._blocks.initRootBlockRef(),this.m_iniSet[s.kEnableOsnapFunction]=!1,this.m_sysVariable.init(this),this.m_mxDatabase=new N.MxDbDatabase,this.id=b.MxManager.allocId(),this.isMultipleSelect=W.MxDrawData.m_isMultipleSelect}r.MxDrawObject=B},{"./MxDrawData":22,"./MxDrawObjectEvent":26,"./MxFun":27,"./MxLocalFileLoad":28,"./MxManager":29,"./MxNetData":31,"./MxSystemVariable":35,"./Operate/MxDrawObjectOsnap":48,"./UI/MxUiVue":63,"./View/MxBrowseDisplay":64,"./View/MxBrowseLayerData":65,"./View/MxDbDatabase":66,"./View/MxDbEntityGrip":68,"./View/MxDrawMapBox":73,"./cpp/McDrawObject":75,three:19}],24:[function(t,e,r){var n,o=this&&this.__extends||(n=function(N,A){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,G){z.__proto__=G}||function(z,G){for(var V in G)Object.prototype.hasOwnProperty.call(G,V)&&(z[V]=G[V])})(N,A)},function(N,A){function z(){this.constructor=N}n(N,A),N.prototype=A===null?Object.create(A):(z.prototype=A.prototype,new z)});Object.defineProperty(r,"__esModule",{value:!0}),r.MxDrawObject2d=void 0;var s,c=t("three"),l=t("./MxFun"),v=t("./MxDrawObject"),x=t("three-orbitcontrols"),w=t("./MxNetData"),_=t("./MxMaterial"),b=t("./MxDrawData"),E=t("./View/MxDrawMapBox"),I=(o(O,s=v.MxDrawObject),O.prototype.set3DDraw=function(N){this.is3DDraw=N},O.prototype.getOrthographicCamera=function(){return this.camera instanceof c.OrthographicCamera?this.camera:null},O.prototype.getFullDisplayRange=function(){return{minPt:this._initMinDisplayPoint,maxPt:this._initMaxDisplayPoint}},O.prototype.zoomW_call=function(N,A,z){if(N.distanceTo(A)<1e-7)console.log("Mx:ZoomW param invalid");else{if(z!=null&&z||(N=this.currentCoord2World(N.x,N.y,0),A=this.currentCoord2World(A.x,A.y,0)),N.x>A.x){var G=N.x;N.x=A.x,A.x=G}N.y>A.y&&(G=N.y,N.y=A.y,A.y=G);var V=this.getViewWidth(),ne=this.getViewHeight();ne<5&&(ne=5),V<5&&(V=5);var W=Math.abs(N.x-A.x),B=Math.abs(N.y-A.y);W<1e-5&&(W=1e-5),B<1e-5&&(B=1e-5);var q=this.getOrthographicCamera();if(W/BF.x&&(fe.x=F.x),fe.x>re.x&&(fe.x=re.x),fe.x>le.x&&(fe.x=le.x),fe.y>F.y&&(fe.y=F.y),fe.y>re.y&&(fe.y=re.y),fe.y>le.y&&(fe.y=le.y);var me=D.clone();me.x=this._dataNum)this._isShowLoading&&n.MxFun.hideLoading();else{var w=this._dataType[this._iGet];this._iGet++;var _=this,b=this._iGet+1,E="$"+this._filename+".mxb"+b+".wgh",I=w!=0;this.getFile(this._path,E,I,function(O){_.net.onStaticMessage(O),_.getDatas()},function(){_._dataNum=0,_._iGet=0,_._isShowLoading&&n.MxFun.hideLoading(),console.log("mx get "+E+" faild")})}},x.prototype.onRenderHead=function(w){var _=JSON.parse(w);this._dataType=_.type,this._dataNum=_.count,this._iGet=0,this._isShowLoading&&n.MxFun.showLoading(),this.getDatas()},x.prototype.getFile=function(w,_,b,E,I){var O=new c;O.setPath(w),O.setBinary(b),O.load(_,E,function(){},I)},x);function x(w){this.net=null,this._dataNum=0,this._iGet=0,this._dataType=[],this._path="",this._filename="",this._isShowLoading=!0,this.net=w}r.MxLocalDwgFileLoad=v},{"./MxFun":27}],29:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MxManager=r.MxCpp=r.MxData=void 0;var n,o=t("./View/MxDbEntity"),s=t("./View/MxDbTextureManager"),c=t("./SVGLoader/MxSVGLoader");(n=r.MxData||(r.MxData={})).iSelectRenderOrder=5,n.iCADMeshRenderOrder=10,n.iCADCurveRenderOrder=20,n.iMxEntityRenderOrder=30,n.iGripRenderOrder=110,n.iDynJigRenderOrder=120;var l,v,x,w,_,b,E,I,O,N,A,z=(G.prototype.init=function(V){this.imp=V},G.prototype.getMxCAD_MxCpp=function(){return this.imp},G.prototype.getMxCAD_App=function(){return this.imp.App},G.prototype.newMcGePoint3d=function(V){return this.imp?this.imp.newMcGePoint3d(V):null},G.prototype.decodeFromGb2312=function(V){return this.imp.decodeFromGb2312(V)},G.prototype.encodeToGb2312=function(V){return this.imp.encodeToGb2312(V)},G.prototype.getMcDbCurve=function(V){if(this.imp.App.objectIdIsKindOf(V,"McDbCurve"))return this.imp.App.objectIdToObject(V)},G);function G(){}r.MxCpp=z,l=r.MxManager||(r.MxManager={}),v=[],x=null,_=[],b=void(w=0),E=new s.MxDbTextureManager,I=new c.MxSvgManager,O=new o.MxDbEntityClassHierarchy,N=new z,A={},l.add=function(V){v.push(V)},l.on=function(V,ne){A[V]||(A[V]=[]),A[V].push(ne)},l.callEvent=function(V,ne){var W;if(A[V])return A[V].forEach(function(B){var q=B(ne);W=W||q}),W},l.initMxCpp=function(V){N.init(V)},l.getMxCpp=function(){return N},l.allocId=function(){return++w},l.getMxDbEntityClassHierarchy=function(){return O},l.getMxDbTextureManager=function(){return E},l.getMxDbSvgManager=function(){return I},l.outDebugString=function(V){b==null?console.log(V):b(V)},l.setOutDebugCall=function(V){b=V},l.onLoad=function(){for(var V in v)v[V].onLoad("")},l.updateDisplay=function(){for(var V in v)v[V].updateDisplay()},l.currentMx=function(){return x},l.setCurrentMx=function(V){x=V},l.initResize=function(){for(var V in v)v[V].initResize()},l.addSelectEvent=function(V){_.push(V)},l.clearSelectEvent=function(){_=[]},l.callSelectObject=function(V){for(var ne in _)if(_[ne](V)==1)break},l.getMxObject=function(V){if(typeof V=="number"){for(var ne in v)if(v[ne].getId()===V)return v[ne]}else for(var ne in v)if(v[ne].getCanvas()===V)return v[ne];return null}},{"./SVGLoader/MxSVGLoader":57,"./View/MxDbEntity":67,"./View/MxDbTextureManager":72}],30:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MxMaterial=void 0;var n=t("three");(function(o){o.shaderUniforms={crAmbient:{value:new n.Vector3(1,0,0)},crDiffuse:{value:new n.Vector3(1,0,0)},crSpecular:{value:new n.Vector3(1,0,0)}},o.m_arrSystemColors=new Array(0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10066176,10066252,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510272,8755532,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019904,7510348,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529536,6265164,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,39168,5019980,32512,4161343,19456,2509862,65343,8388511,52275,6737023,39206,5019999,32543,4161359,19475,2509871,65407,8388543,52326,6737049,39244,5020018,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39282,5020037,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39321,5020057,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29337,5014937,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19609,5010073,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9881,5005209,8063,4149119,4940,2502476,255,8355839,204,6710988,153,5000345,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490521,6245529,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980889,7490713,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471257,8735897,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,10027161,10046617,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,10027122,10046597,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,10027084,10046578,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,10027046,10046559,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215),o.m_arrDefUseMaterials=new Array(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null),o.m_arrDefUseCurveMaterials=new Array(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null),o.m_arrDefUseBasicMaterials=new Array(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null),o.m_selectMaterial=new n.MeshPhongMaterial({color:255,opacity:.2,transparent:!0,side:n.DoubleSide}),o.m_mouseMoveMaterial=new n.MeshPhongMaterial({color:16776960,side:n.DoubleSide}),o.m_lockedMaterial=new n.MeshPhongMaterial({color:197379,side:n.DoubleSide}),o.m_samplePoints=new n.PointsMaterial({color:255,depthTest:!1,size:8}),o.m_samplePointsMouseMove=new n.PointsMaterial({color:16711680,depthTest:!1,size:12});var s=new n.MeshBasicMaterial({color:16777215,transparent:!0,depthTest:!1,side:n.DoubleSide,opacity:1,stencilWrite:!1,colorWrite:!1});o.getStencilMaterial=function(){return s},o.GetColorByIndex=function(c){return o.m_arrSystemColors[c]},o.GetColorMaterial=function(c){var l=o.m_arrDefUseMaterials[c];return l===null&&(l=new n.MeshLambertMaterial({color:o.m_arrSystemColors[c],side:n.DoubleSide}),o.m_arrDefUseMaterials[c]=l),l},o.GetBaseColorMaterial=function(c){var l=o.m_arrDefUseBasicMaterials[c];return l===null&&(l=new n.MeshBasicMaterial({color:o.m_arrSystemColors[c],side:n.DoubleSide}),o.m_arrDefUseMaterials[c]=l),l},o.GetCurveColorMaterial=function(c){var l=o.m_arrDefUseCurveMaterials[c];return l===null&&(l=new n.LineBasicMaterial({color:o.m_arrSystemColors[c],linewidth:1}),o.m_arrDefUseCurveMaterials[c]=l),l},o.GetSelectMaterial=function(){return o.m_selectMaterial},o.GetMouseMoveMaterial=function(){return o.m_mouseMoveMaterial},o.GetLockedMaterial=function(){return o.m_lockedMaterial},o.GetSamplePointsMaterial=function(){return o.m_samplePoints},o.GetSamplePointsMouseMoveMaterial=function(){return o.m_samplePointsMouseMove},o.createMaterial=function(c){var l=void 0;if(c==null)return l;function v(x,w){if(w.map!=null){var _=w.map,b=new n.TextureLoader().load(_);b.wrapS=b.wrapT=n.RepeatWrapping,x.map=b,x.side=n.DoubleSide}}return c.transparent!=0?c.transparent=!0:c.transparent=!1,c.name=="MeshPhongMaterial"?v(l=new n.MeshPhongMaterial(c),c):c.name=="MeshBasicMaterial"?v(l=new n.MeshBasicMaterial(c),c):c.name=="MeshDepthMaterial"?v(l=new n.MeshDepthMaterial(c),c):c.name=="MeshNormalMaterial"?v(l=new n.MeshNormalMaterial(c),c):c.name=="MeshLambertMaterial"?v(l=new n.MeshLambertMaterial(c),c):c.name=="MeshStandardMaterial"&&v(l=new n.MeshStandardMaterial(c),c),l}})(r.MxMaterial||(r.MxMaterial={}))},{three:19}],31:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MxHFileLoad=r.MxNet=r.MxNetBinMessageType=r.MxNetSend=r.MxNetMessage=r.MxNetMessageType=r.MxNetData=void 0;var n,o,s=t("three"),c=t("./MxFun"),l=t("pako"),v=t("./MxManager"),x=t("./MxDrawData"),w=(_.prototype.getId=function(){return this._dataView.getInt32(4,!0)},_.prototype.getVersion_MwBlobHead=function(){return this._dataView.getInt32(60,!0)},_.prototype.getVersion_MwBlobHeadDynLen=function(){return this._dataView.getInt32(4,!0)},_.prototype.getdPointCurveBuffersHead=function(){var W={};return W.ver=this._dataView.getInt32(4,!0),W.databaseIndex=this._dataView.getInt32(8,!0),W.zeroLayerIdIndex=this._dataView.getInt32(16,!0),W.datacount=this._dataView.getInt32(20,!0),W.datasize=this._dataView.getInt32(24,!0),W},_.prototype.getdPointMeshBuffersHead=function(){var W={};return W.ver=this._dataView.getInt32(4,!0),W.databaseIndex=this._dataView.getInt32(8,!0),W.id=this._dataView.getInt32(12,!0),W.zeroLayerIdIndex=this._dataView.getInt32(16,!0),W.datacount=this._dataView.getInt32(20,!0),W.datasize=this._dataView.getInt32(24,!0),W},_.prototype.getdPointTextureBuffersHead=function(){var W={};return W.ver=this._dataView.getInt32(4,!0),W.databaseIndex=this._dataView.getInt32(8,!0),W.zeroLayerIdIndex=this._dataView.getInt32(16,!0),W.datacount=this._dataView.getInt32(20,!0),W.datasize=this._dataView.getInt32(24,!0),W},_.prototype.getBlobHeadForMemorySectionsHead=function(W){var B={};return B.type=this._dataView.getInt32(W,!0),W+=4,B.ver=this._dataView.getInt32(W,!0),W+=4,B.databaseIndex=this._dataView.getInt32(W,!0),W+=4,B.nOffset=W,B},_.prototype.getMemorySectionsHead=function(){var W=this.getBlobHeadForMemorySectionsHead(0);return W.zeroLayerIdIndex=this._dataView.getInt32(W.nOffset,!0),W.nOffset+=4,W.datacount=this._dataView.getInt32(W.nOffset,!0),W.nOffset+=4,W.datasize=this._dataView.getInt32(W.nOffset,!0),W.nOffset+=4,W.datasize!=W.nOffset&&console.log("mx: sectionshead size assert(0)"),W},_.prototype.getMemorySectionHead=function(W){var B=this.getBlobHeadForMemorySectionsHead(W);return W=B.nOffset,B.pointCount=this._dataView.getInt32(W,!0),W+=4,B.layerId=this._dataView.getInt32(W,!0),W+=4,B.blkId=this._dataView.getInt32(W,!0),W+=4,B.memColor=this._dataView.getInt32(W,!0),W+=4,B.memId=this._dataView.getInt32(W,!0),W+=4,B.memType=this._dataView.getInt32(W,!0),W+=4,B.offset=W,B},_.prototype.getdPointTextureBufferDataHead=function(W){W+=4,W+=4,W+=4;var B={};return B.dataCount=this._dataView.getInt32(W,!0),W+=4,B.layerId=this._dataView.getInt32(W,!0),W+=4,B.blkId=this._dataView.getInt32(W,!0),W+=4,B.offset=W,B},_.prototype.getdPointCurveBufferDataHead=function(W){W+=4,W+=4,W+=4;var B={};return B.pointCount=this._dataView.getInt32(W,!0),W+=4,B.layerId=this._dataView.getInt32(W,!0),W+=4,B.blkId=this._dataView.getInt32(W,!0),W+=4,B.offset=W,B},_.prototype.getdPointMeshBufferDataHead=function(W){W+=4,W+=4,W+=4;var B={};return B.pointCount=this._dataView.getInt32(W,!0),W+=4,B.layerId=this._dataView.getInt32(W,!0),W+=4,B.blkId=this._dataView.getInt32(W,!0),W+=4,B.offset=W,B},_.prototype.getDatabaseIndex=function(){return this._dataView.getInt32(8,!0)},_.prototype.getColorIndex=function(){return this._dataView.getInt32(24,!0)},_.prototype.getBufferType=function(){return this._dataView.getInt32(32,!0)},_.prototype.getIsSketchEntity=function(){return this._dataView.getInt32(40,!0)},_.prototype.getLayerId=function(){return this._dataView.getInt32(44,!0)},_.prototype.getBlockId=function(){return this._dataView.getInt32(48,!0)},_.prototype.getVertexBufferSize=function(){return this._dataView.getInt32(12,!0)},_.prototype.getIndexBufferSize=function(){return this._dataView.getInt32(16,!0)},_.prototype.getZeroLayerId=function(){return this._dataView.getInt32(52,!0)},_.prototype.getSelectMark=function(){return this._dataView.getInt32(56,!0)},_.prototype.getMateria=function(){var W=this._dataView.getInt32(36,!0);if(W==0)return"";for(var B=[],q=0;q=this._dataNum)this.hideLoading(0);else{var W=this._dataType[this._iGet];this._iGet++;var B=this,q=this._iGet+1,D="$"+this._filename+".mxb"+q+".wgh";if(1=this._staticLoadingOpenFiles.length)return console.log("Mx staticLoadingOpenFiles error!"),void this.hideLoading(7);D=this._staticLoadingOpenFiles[this._iGet]}var F=D;this._path&&(F=this._path+D);var re=F.substring(0,F.lastIndexOf("/")+1);if(this.net.getMxDrawObject().setCurrentLoadUrl(re),W==0)this.getFile(this._path,D,function(me){B._isStopLoading||(B.net.onStaticMessage(me)||(console.log(this._path),console.log(D)),B.getData())},function(){B._dataNum=0,B._iGet=0,B.hideLoading(8),console.log("mx get "+D+" faild")});else{var le=new XMLHttpRequest,fe=D;this._path&&(fe=this._path+D),this._urlParam.length!=0?le.open("GET",fe+this._urlParam):le.open("GET",fe),x.MxDrawData.m_isRequestHeaderCacheControl&&le.setRequestHeader("Cache-Control","max-age=7200"),this._requestHeader.length!=0&&le.setRequestHeader("usertoken",this._requestHeader),le.responseType="arraybuffer",le.onload=function(){B._isStopLoading||(B.net.onStaticMessage(le.response)||console.log(fe),B.getData())},le.addEventListener("error",function(me){B._dataNum=0,B._iGet=0,B.hideLoading(9),console.log("mx get "+D+" faild")},!1),le.send()}}},ne.prototype.onRenderHead=function(W){if(!this._isStopLoading){var B=JSON.parse(W);this._dataType=B.type,this._dataNum=B.count,this._iGet=0,this.showLoading(),this.getData()}},ne.prototype.getFile=function(W,B,q,D){var F=new s.FileLoader(this.manager);F.setPath(W);var re=B;this._urlParam.length!=0&&(re=B+this._urlParam),this._requestHeader.length!=0&&(F.requestHeader={usertoken:this._requestHeader}),F.load(re,q,function(){},D)},ne);function ne(W,B){this.net=null,this.manager=null,this._dataNum=0,this._iGet=0,this._dataType=[],this._path="",this._filename="",this._staticLoadingOpenFiles=[],this._isShowLoading=!0,this._requestHeader="",this._isStopLoading=!1,this._urlParam="",this.net=W,this.manager=B!==void 0?B:s.DefaultLoadingManager}r.MxHFileLoad=V},{"./MxDrawData":22,"./MxFun":27,"./MxManager":29,pako:1,three:19}],32:[function(t,e,r){var n;Object.defineProperty(r,"__esModule",{value:!0}),r.MxShader=void 0,(n=r.MxShader||(r.MxShader={})).VSHADER_COLOR_POINT=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; attribute vec2 position; attribute vec3 color; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.VSHADER_COLOR_POINT_BYLAYER=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT=` precision highp float; varying vec4 vColor; void main() { gl_FragColor = vColor; } `,n.VSHADER_COLOR_POINT_TEXTURE=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; attribute vec2 position; attribute vec2 uv; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; varying vec2 vUv; void main(){ vUv = uv; mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_TEXTURE=` precision highp float; varying vec2 vUv; uniform sampler2D texture; void main() { gl_FragColor = texture2D( texture, vUv ); } `,n.VSHADER_COLOR_POINT_CLIP=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec2 clippt1; uniform vec2 clippt2; uniform float vieww; uniform float viewh; attribute vec2 position; attribute vec3 color; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; vec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); vec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); vCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); vCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.VSHADER_COLOR_POINT_BYLAYER_CLIP=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; uniform vec2 clippt1; uniform vec2 clippt2; uniform float vieww; uniform float viewh; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; vec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); vec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); vCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); vCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_CLIP=`precision highp float; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main() { if(gl_FragCoord.x > vCp1.x && gl_FragCoord.x < vCp2.x && gl_FragCoord.y > vCp1.y && gl_FragCoord.y < vCp2.y) gl_FragColor = vColor; else discard; } `,n.VSHADER_COLOR_POINT_FORMXCAD=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; gl_PointSize = 1.0; if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_FORMXCAD=` precision highp float; varying vec4 vColor; void main() { gl_FragColor = vColor; } `,n.VSHADER_COLOR_POINT_CLIP_FORMXCAD=` precision highp float; uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform vec3 color; uniform vec2 clippt1; uniform vec2 clippt2; uniform float vieww; uniform float viewh; attribute vec2 position; attribute vec4 tran1; attribute vec4 tran2; attribute vec4 tran3; attribute vec4 tran4; attribute float ishide; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main(){ mat4 tran; tran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; tran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; tran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; tran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; vec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); vec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); vCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); vCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); if(ishide > 0.1) vColor = vec4(color,0.0); else vColor = vec4(color,1.0); gl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); } `,n.FSHADER_COLOR_POINT_CLIP_FORMXCAD=`precision highp float; varying vec4 vColor; varying vec2 vCp1; varying vec2 vCp2; void main() { if(gl_FragCoord.x > vCp1.x && gl_FragCoord.x < vCp2.x && gl_FragCoord.y > vCp1.y && gl_FragCoord.y < vCp2.y) gl_FragColor = vColor; else discard; } `},{}],33:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MxStencilObject=void 0;var n=t("three"),o=t("./MxMaterial"),s=(c.prototype.object_onAfterRender=function(l){var v=this.aryMeshStencil;if(v&&0I&&(A+=(ne.fontBoundingBoxAscent+ne.fontBoundingBoxDescent)*E,O.push(l.substring(z,G)),z=G,V++);if(zA&&(V+=B=(q.fontBoundingBoxAscent+q.fontBoundingBoxDescent)*N,z.push(l.substring(ne,W)),G.push(B),ne=W);if(ne>16&255)+"",(_>>8&255)+"",(255&_)+"");O.fillStyle=le,O.textAlign="left",O.textBaseline="bottom";for(var fe=0,me=0;feMath.abs(F.y-fe.y)?(this.m_ptOrtho.x=F.x,this.m_ptOrtho.y=fe.y):(this.m_ptOrtho.x=fe.x,this.m_ptOrtho.y=F.y),this.m_isValid=!0}else this.m_isValid=!1}},ne.prototype.GetCurOrthoPoint=function(){return{pt:this.m_ptOrtho,isValid:this.m_isValid}},ne);function ne(F){this.m_mxJig=null,this.m_ptOrtho=new E.Vector3,this.m_isValid=!1,this.m_isTrace=!0,this.m_mxJig=F}r.McEdJigOrtho=V;var W=(B.prototype.setAddDynDrawObject_call=function(F){this.m_addDynDrawObject_call=F},B.prototype.addDynDrawObject=function(F){this.m_addDynDrawObject_call?this.m_addDynDrawObject_call(F):s.addDynDrawObject(F)},B.prototype.drawLine=function(F,re,le){var fe=new E.Geometry,me=new E.LineBasicMaterial({color:this.m_iColor});fe.vertices.push(new E.Vector3(F.x,F.y,F.z),new E.Vector3(re.x,re.y,re.z));var ye=new E.Line(fe,me);le.add(ye),this.addDynDrawObject(ye)},B.prototype.drawPolyline=function(F,re){for(var le=new E.Geometry,fe=new E.LineBasicMaterial({color:this.m_iColor}),me=F.length,ye=0;yere)&&(this.m_osmode=N.MxJigCmdManager.OsnapMode.kOsModekInValid));var le=this.m_mxJig.getMxObject().getSysVarLong("OSMODE"),fe=s.getPrvPoint();this.notifyOsnap(le,s.isValidPrvpoint()?fe:void 0)}},D.prototype.seInValidPoint=function(){this.setPoint(void 0)},D.prototype.getCurrentOSnapPoint=function(F){var re={isSnapPoint:!1};return this.isEnable()?(re.pt=F,re.osmode=this.m_osmode,this.m_osmode!=N.MxJigCmdManager.OsnapMode.kOsModekInValid?(re.isSnapPoint=!0,re.pt.x=this.m_ptSnapPoint.x,re.pt.y=this.m_ptSnapPoint.y,re.pt.z=this.m_ptSnapPoint.z,s.isOsnapZValue()||(F.z=0)):re.pt=F):(re.pt=F,re.osmode=N.MxJigCmdManager.OsnapMode.kOsModekInValid),re},D.prototype.setLongprogressStatus=function(F){this.m_iLongprogressStatus=F},D.prototype.reComputeOffset=function(){},D);function D(F){this.m_inPoint=new E.Vector3,this.m_vecOffset=new E.Vector3,this.m_pt=new E.Vector3,this.m_isValid=!1,this.m_ptSnapPoint=new E.Vector3,this.m_ptSnapSrcPoint=new E.Vector3,this.m_snapObjectId=0,this.m_osmode=N.MxJigCmdManager.OsnapMode.kOsModekInValid,this.m_prvInputPoint=new E.Vector3,this.m_isValidPrvInputPoint=!1,this.m_lOSmode=0,this.m_iLongprogressStatus=-1,this.m_isOffsetInputPostion=!1,this.m_mxJig=null,this.m_notifyOsnap_delayCall=void 0,this.m_isRuning=!1,this.m_isEnable=!1,this.m_mxJig=F,this.m_draw=new W}r.McEdJigOsnap=q},{"../MxDrawData":22,"../MxDrawObject":23,"../MxFun":27,"../MxTools":37,"../MxWindowsEvent":40,"./MxJigCmdManager":53,three:19}],43:[function(t,e,r){var n,o=this&&this.__extends||(n=function(A,z){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,V){G.__proto__=V}||function(G,V){for(var ne in V)Object.prototype.hasOwnProperty.call(V,ne)&&(G[ne]=V[ne])})(A,z)},function(A,z){function G(){this.constructor=A}n(A,z),A.prototype=z===null?Object.create(z):(G.prototype=z.prototype,new G)});Object.defineProperty(r,"__esModule",{value:!0}),r.McGiWorldDrawSelect=r.McGiWorldDraw=r.McGiWorldDrawType=void 0;var s,c,l=t("three"),v=t("../MxThreeJS"),x=t("../MxManager"),w=t("three.meshline"),_=t("../MxFun");(c=s=r.McGiWorldDrawType||(r.McGiWorldDrawType={}))[c.kWorldDraw=1]="kWorldDraw",c[c.kDynDragDraw=2]="kDynDragDraw",c[c.kSelectDraw=3]="kSelectDraw";var b=(E.prototype.getType=function(){return this.worldDrawType},E.prototype.setXData=function(A){this.xData=A},E.prototype.setMatrix=function(A){this.matrix=A},E.prototype.getMatrix=function(){return this.matrix},E.prototype.setOpacity=function(A){this.opacity=A},E.prototype.getOpacity=function(){return this.opacity},E.prototype.setColor=function(A){A=_.MxFun.getNumberColor(A),this.iColor!=A&&(this.widthMaterial=null),this.iColor=A},E.prototype.setDash=function(A,z){this.dDashArray=A,this.dDashRatio=z},E.prototype.getDash=function(){return{dDashArray:this.dDashArray,dDashRatio:this.dDashRatio}},E.prototype.setDashLineDisplay=function(A){A?(this.dDashArray=.03,this.dDashRatio=.1,this.dLineWidth==0&&(this.dLineWidth=6,this.lineWidthByPixels=!0)):(this.dDashArray=0,this.dDashRatio=0)},E.prototype.isDashLineDisplay=function(){return 0=l.MxJigCmdManager.DragStatus.kKW1&&0=l.MxJigCmdManager.DragStatus.kKW1&&(F=l.MxJigCmdManager.DragStatus.kNormal),this.m_resultDragStatus=F,l.MxJigCmdManager.DoneStatius.kExitCommand;v.MxFun.Assert(0)},W.prototype.upDisplay=function(){this.m_currSamplerPoint&&this.m_pWorldDraw&&(this._mxObject.getMcObject().onReadyJigUpdateDispla(),this.m_pWorldDraw.worldDraw(this.m_currSamplerPoint))},W);function W(){var F=V.call(this)||this;return F.m_currSamplerPoint=null,F.m_retcall=null,F.m_resultDragStatus=l.MxJigCmdManager.DragStatus.kCancel,F.m_cursorType=w.MxUiVue.CursorType.kCross,F}r.MrxDbgUiPrKeyWord=ne;var B,q=(o(D,B=x.MrxDbgUiPrBase),D.prototype.value=function(){return this.m_value},D.prototype.basePt=function(){return new c.Vector3(this.m_basePt.x,this.m_basePt.y,0)},D.prototype.setBasePt=function(F){this.m_basePt==null?this.m_basePt=new c.Vector3(F.x,F.y,0):(this.m_basePt.x=F.x,this.m_basePt.y=F.y)},D.prototype.setUseBasePt=function(F){this.m_useBasePt=F},D.prototype.initGo=function(){this.m_keyWordPicked="",this.m_retcall=null},D.prototype.go=function(F){this.initGo(),this.m_retcall=F,this.m_previousInPoint=null,this.m_currentInPoint=null,this.m_value=0,l.MxJigCmdManager.runCmd(this)},D.prototype.onExitCommand=function(){var F=this;w.MxUiVue.setCursorType(w.MxUiVue.CursorType.kNormal);var re=!1;this.m_retcall!=null&&(l.MxJigCmdManager.setRunCmdEvent(function(){B.prototype.onExitCommand.call(F,!1),re=!0}),this.m_retcall(this.getReturnStatus(this.m_resultDragStatus)),l.MxJigCmdManager.setRunCmdEvent(void 0)),!re&&l.MxJigCmdManager.isWaitCmdNull()&&w.MxUiVue.restoreCmdStatus(),re||B.prototype.onExitCommand.call(this,!0)},D.prototype.onStartCommand=function(){w.MxUiVue.setCursorType(this.m_cursorType),this.printMessage(),l.MxJigCmdManager.setKeywordList(this.keyWords()),B.prototype.onStartCommand.call(this)},D.prototype.sampler=function(){var F,re=l.MxJigCmdManager.acquirePoint(this.m_toucheType,!1);return re.status==l.MxJigCmdManager.DragStatus.kNormal&&(this.m_currSamplerPoint==null?this.m_currSamplerPoint=new c.Vector3(re.pt.x,re.pt.y,0):(this.m_currSamplerPoint.x=re.pt.x,this.m_currSamplerPoint.y=re.pt.y)),F=this.m_useBasePt?this.acquireAngle(this.m_toucheType,this.m_basePt):this.acquireAngle(this.m_toucheType,this.m_currentInPoint),this.procInKeyword(F),F.status==l.MxJigCmdManager.DragStatus.kNormal?(this.m_value=F.ang,F.status):F.status==l.MxJigCmdManager.DragStatus.kKW1?F.status:this.m_useBasePt||this.m_currentInPoint?re.status:((F=this.acquirePoint(this.m_toucheType,!1)).status==l.MxJigCmdManager.DragStatus.kNormal&&F.exit&&(this.m_previousInPoint==null?this.m_previousInPoint=new c.Vector3(F.pt.x,F.pt.y,0):(this.m_previousInPoint.x=F.pt.x,this.m_previousInPoint.y=F.pt.y)),F.status)},D.prototype.done=function(F){if(this.m_retcall!=null)return this.m_resultDragStatus=F,this.m_useBasePt||F!=l.MxJigCmdManager.DragStatus.kNormal||!this.m_previousInPoint||this.m_currentInPoint?l.MxJigCmdManager.DoneStatius.kExitCommand:(this.m_currentInPoint=this.m_previousInPoint,this.m_previousInPoint=null,l.MxJigCmdManager.DoneStatius.kContinueCommand);v.MxFun.Assert(0)},D.prototype.upDisplay=function(){this.m_currSamplerPoint&&(this.m_pWorldDraw&&(this._mxObject.getMcObject().onReadyJigUpdateDispla(),this.m_pWorldDraw.worldDraw(this.m_currSamplerPoint)),this.m_useBasePt&&this.m_basePt?this.drawEntity(_.MxThreeJS.createLine(this.m_currSamplerPoint,this.m_basePt,16777215)):this.m_currentInPoint&&this.drawEntity(_.MxThreeJS.createLine(this.m_currSamplerPoint,this.m_currentInPoint,16777215)))},D);function D(){var F=B.call(this)||this;return F.m_useBasePt=!1,F.m_basePt=null,F.m_previousInPoint=null,F.m_currentInPoint=null,F.m_value=0,F.m_currSamplerPoint=null,F.m_retcall=null,F.m_resultDragStatus=l.MxJigCmdManager.DragStatus.kCancel,F.m_cursorType=w.MxUiVue.CursorType.kCross,F}r.MrxDbgUiPrAngle=q},{"../MxFun":27,"../MxThreeJS":36,"../UI/MxUiVue":63,"./MrxDbgUiPrBase":44,"./MxJigCmdManager":53,three:19}],46:[function(t,e,r){var n,o=this&&this.__extends||(n=function(O,N){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,z){A.__proto__=z}||function(A,z){for(var G in z)Object.prototype.hasOwnProperty.call(z,G)&&(A[G]=z[G])})(O,N)},function(O,N){function A(){this.constructor=O}n(O,N),O.prototype=N===null?Object.create(N):(A.prototype=N.prototype,new A)});Object.defineProperty(r,"__esModule",{value:!0}),r.MrxDbgUiPrPoint=void 0;var s,c=t("three"),l=t("./MxJigCmdManager"),v=t("../MxFun"),x=t("./MrxDbgUiPrBase"),w=t("../UI/MxUiVue"),_=t("../MxThreeJS"),b=t("../MxManager"),E=(o(I,s=x.MrxDbgUiPrBase),I.prototype.value=function(){return new c.Vector3(this.m_value.x,this.m_value.y,0)},I.prototype.getCADValue=function(){return b.MxManager.getMxCpp().newMcGePoint3d(new c.Vector3(this.m_value.x,this.m_value.y,0))},I.prototype.basePt=function(){return new c.Vector3(this.m_basePt.x,this.m_basePt.y,0)},I.prototype.setBasePt=function(O){this.m_basePt==null?this.m_basePt=new c.Vector3(O.x,O.y,0):(this.m_basePt.x=O.x,this.m_basePt.y=O.y)},I.prototype.setUseBasePt=function(O){this.m_useBasePt=O},I.prototype.initGo=function(){this.m_keyWordPicked="",this.m_retcall=null,this.m_retWhileCall=null,this.m_exitCall=null},I.prototype.go=function(O){this.initGo(),this.m_retcall=O,l.MxJigCmdManager.runCmd(this)},I.prototype.goWhile=function(O,N){this.initGo(),this.m_retWhileCall=O,N&&(this.m_exitCall=N),l.MxJigCmdManager.runCmd(this)},I.prototype.onExitCommand=function(){var O=this;w.MxUiVue.setCursorType(w.MxUiVue.CursorType.kNormal);var N=!1;this.m_retcall!=null&&(l.MxJigCmdManager.setRunCmdEvent(function(){s.prototype.onExitCommand.call(O,!1),N=!0}),this.m_retcall(this.getReturnStatus(this.m_resultDragStatus)),l.MxJigCmdManager.setRunCmdEvent(void 0)),!N&&l.MxJigCmdManager.isWaitCmdNull()&&w.MxUiVue.restoreCmdStatus(),N||s.prototype.onExitCommand.call(this,!0)},I.prototype.onStartCommand=function(){w.MxUiVue.setCursorType(this.m_cursorType),this.printMessage(),l.MxJigCmdManager.setKeywordList(this.keyWords()),this.m_useBasePt&&this.SetLASTPOINT(this.m_basePt),s.prototype.onStartCommand.call(this)},I.prototype.sampler=function(){var O=this.acquirePoint(this.m_toucheType);return this.procInKeyword(O),O.status==l.MxJigCmdManager.DragStatus.kNormal&&(this.m_value==null?this.m_value=new c.Vector3(O.pt.x,O.pt.y,0):(this.m_value.x=O.pt.x,this.m_value.y=O.pt.y)),O.status},I.prototype.done=function(O){if(this.m_retcall!=null)return this.m_resultDragStatus=O,this.m_exitCall&&this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)),l.MxJigCmdManager.DoneStatius.kExitCommand;if(this.m_retWhileCall!=null){if((this.m_resultDragStatus=O)==l.MxJigCmdManager.DragStatus.kCancel)return this.m_exitCall&&this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)),l.MxJigCmdManager.DoneStatius.kExitCommand;var N=!1;O==l.MxJigCmdManager.DragStatus.kNull&&(N=!0);var A=this.m_retWhileCall(this.getReturnStatus(this.m_resultDragStatus));return A!=null&&A.exit!=null&&(N=A.exit),N?(this.m_exitCall&&this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)),l.MxJigCmdManager.DoneStatius.kExitCommand):(l.MxJigCmdManager.setKeywordList(this.keyWords()),this.printMessage(),l.MxJigCmdManager.DoneStatius.kContinueCommand)}v.MxFun.Assert(0)},I.prototype.upDisplay=function(){if(this.m_value&&(this.m_pWorldDraw&&(this._mxObject.getMcObject().onReadyJigUpdateDispla(),this.m_pWorldDraw.worldDraw(this.m_value)),this.m_useBasePt&&this.m_basePt)){var O=16777215;this._mxObject.isWhiteViewColor()&&(O=0);var N=this._mxObject;this.drawEntity(_.MxThreeJS.createLine(N.toSmallcoord(this.m_value),N.toSmallcoord(this.m_basePt),O),void 0,!0)}},I);function I(){var O=s.call(this)||this;return O.m_useBasePt=!1,O.m_basePt=null,O.m_value=null,O.m_retcall=null,O.m_retWhileCall=null,O.m_exitCall=null,O.m_resultDragStatus=l.MxJigCmdManager.DragStatus.kCancel,O.m_cursorType=w.MxUiVue.CursorType.kCross,O}r.MrxDbgUiPrPoint=E},{"../MxFun":27,"../MxManager":29,"../MxThreeJS":36,"../UI/MxUiVue":63,"./MrxDbgUiPrBase":44,"./MxJigCmdManager":53,three:19}],47:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MxCmdRunManager=void 0;var n,o,s,c,l,v,x,w,_=t("../MxFun"),b=t("../MxType"),E=t("./MxJigCmdManager"),I=t("../UI/MxUiVue"),O=t("../MxDrawData");n=r.MxCmdRunManager||(r.MxCmdRunManager={}),o={},s=new Array,c=0,l=!1,v="",x={},w={},n.InitQuickCommand=function(N){if(N)if(N instanceof Array)for(var A=N.length,z=0;z=s.length&&(c=0):l=!0,!0},n.MoveDownKey=function(){return!!l&&(--c<0&&(c=s.length-1),!0)},n.GetListCommad=function(){return c<0||c>=s.length?"":s[c]},n.ClearPrvCmd=function(){v=""},n.GetPrvCmd=function(){return v},n.SetPrvCmd=function(N){v=N},n.runCmd=function(N,A,z){var G=A.toUpperCase(),V=o[G];if(N&&V==null){var ne=x[G];if(ne!=null&&(V=o[ne.toUpperCase()]),V==null)return I.MxUiVue.isNull()?console.log(_.MxFun.formatString('\u672A\u77E5\u547D\u4EE4"{0}"',A)):I.MxUiVue.acutPrintf(`\u672A\u77E5\u547D\u4EE4"{0}"\u3002 \u547D\u4EE4:`,A),!1}if(!V)return!1;N.endPanCommand();var W=s.indexOf(V.cmd);-1this.m_pt1.x)O=x.MxThreeJS.createLines(I,16777215),N=255;else{var A=this.getMxObject().viewCoordLong2Cad(3);O=x.MxThreeJS.createDashedLines(I,16777215,2*A,A)}var z=[];z.push(this.m_pt1),z.push(b),z.push(this.m_pt2),z.push(this.m_pt1),z.push(this.m_pt2),z.push(E);var G=x.MxThreeJS.createTriangle(z,N,.27);this.drawEntity(G,30),this.drawEntity(O,31)},_);function _(b){var E=s.call(this)||this;return E.m_pt1=b,E.m_pt2=b,E}r.MxIntelliSelectJig=w},{"../MxThreeJS":36,"./MxJig":52,"./MxJigCmdManager":53,three:19}],52:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.McEdJigCommand=r.MxDynamicInput=void 0;var n=t("three"),o=t("../MxFun"),s=t("./MxJigCmdManager"),c=t("../MxManager"),l=t("../MxTools"),v=t("../UI/MxUiVue"),x=t("./McEdJigOsnap"),w=t("../MxWindowsEvent"),_=t("./McEdJigDynamicTrace"),b=t("./MxPolarAxisTrace"),E=t("./MxGridTrace"),I=t("../MxThreeJS"),O=t("../MxDrawData"),N=(A.prototype.getFocusIndex=function(){return this.m_isShowDynInput?this.m_iFocusIndex:-1},A.prototype.ClearDynDrawEntity=function(){for(var V=this.m_jig.getMxObject().getTheTempDrawContainer_SmallCoord(),ne=this.m_vecDynDrawEntity.length,W=0;WNumber.EPSILON?b.loc=_.RIGHT:F*le<0||re*fe<0?b.loc=_.BEHIND:Math.sqrt(F*F+re*re)=Be.t-Number.EPSILON})===void 0&&(me.push(Be),ye.push(new c.Vector2(Be.x,Be.y)))},it=1;itq&&(q=fe.y),fe.yF&&(F=fe.x),fe.x=b&&Kr.push(Ht[yn]);return Kr.push(Ht[Ht.length-1]),Kr}(x)).length;if(Le<2)return 0;var et,it,Ue,ht,De,Be,Ve=x[0].equals(x[Le-1]),He=x[0],gt=w.strokeWidth/2,dn=1/(Le-1),Ze=0,at=!1,Lt=0,Ne=3*N,ze=2*N;rn(x[0],x[1],A).multiplyScalar(gt),q.copy(x[0]).sub(A),D.copy(x[0]).add(A),F.copy(q),re.copy(D);for(var Ke=1;Ke"),this.isShowMainMenu&&(document.write(""),document.write(""),document.write("