vendor: 14,693 bytes, lines 1-6
1var __had$=window.hasOwnProperty("$");(function(){ 2/** vim: et:ts=4:sw=4:sts=4 3 * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors. 4 * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE 5 */ 6var requirejs,require,define,global,factory;(function(global,setTimeout){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var n;if(e)for(n=0;n<e.length&&(!e[n]||!t(e[n],n,e));n+=1);}function eachReverse(e,t){var n;if(e)for(n=e.length-1;n>-1&&(!e[n]||!t(e[n],n,e));n-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,i){return t&&eachProp(t,function(t,r){!n&&hasProp(e,r)||(!i||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[r]=t:(e[r]||(e[r]={}),mixin(e[r],t,n,i)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,n,i){var r=new Error(t+"\nhttps://requirejs.org/docs/errors.html#"+e);return r.requireType=e,r.requireModules=i,n&&(r.originalError=n),r}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,n,i){var r,o,s=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=n,n=i):e=[]),o&&o.context&&(s=o.context),(r=getOwn(contexts,s))||(r=contexts[s]=req.s.newContext(s)),o&&r.configure(o),r.require(e,t,n)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,n){var i=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return i.type=e.scriptType||"text/javascript",i.charset="utf-8",i.async=!0,i},req.load=function(e,t,n){var i,r=e&&e.config||{};if(isBrowser)return(i=req.createNode(r,t,n)).setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),!i.attachEvent||i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0||isOpera?(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)),i.src=n,r.onNodeCreated&&r.onNodeCreated(i,r,t,n),currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{setTimeout(function(){},0),importScripts(n),e.completeLoad(t)}catch(i){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,i,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,n){var i,r;"string"!=typeof e&&(n=t,t=e,e=null),isArray(t)||(n=t,t=null),!t&&isFunction(n)&&(t=[],n.length&&(n.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(i=currentlyAddingScript||getInteractiveScript())&&(e||(e=i.getAttribute("data-requiremodule")),r=contexts[i.getAttribute("data-requirecontext")]),r?(r.defQueue.push([e,t,n]),r.defQueueMap[e]=!0):globalDefQueue.push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(e){var t,n,i,r,o,s={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},a={},l={},c={},u=[],d={},h={},p={},f=1,m=1;function g(e,t,n){var i,r,o,a,l,c,u,d,h,p,f=t&&t.split("/"),m=s.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,s.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&f&&(e=f.slice(0,f.length-1).concat(e)),function(e){var t,n;for(t=0;t<e.length;t++)if("."===(n=e[t]))e.splice(t,1),t-=1;else if(".."===n){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),n&&m&&(f||g)){e:for(o=(r=e.split("/")).length;o>0;o-=1){if(l=r.slice(0,o).join("/"),f)for(a=f.length;a>0;a-=1)if((i=getOwn(m,f.slice(0,a).join("/")))&&(i=getOwn(i,l))){u=i,d=o;break e}!h&&g&&getOwn(g,l)&&(h=getOwn(g,l),p=o)}!u&&h&&(u=h,d=p),u&&(r.splice(0,d,u),e=r.join("/"))}return getOwn(s.pkgs,e)||e}function v(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===i.contextName)return t.parentNode.removeChild(t),!0})}function y(e){var t=getOwn(s.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),i.require.undef(e),i.makeRequire(null,{skipMap:!0})([e]),!0}function _(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function x(e,t,n,r){var o,s,a,l,c=null,u=t?t.name:null,h=e,p=!0,v="";return e||(p=!1,e="_@r"+(f+=1)),c=(l=_(e))[0],e=l[1],c&&(c=g(c,u,r),s=getOwn(d,c)),e&&(c?v=n?e:s&&s.normalize?s.normalize(e,function(e){return g(e,u,r)}):-1===e.indexOf("!")?g(e,u,r):e:(c=(l=_(v=g(e,u,r)))[0],v=l[1],n=!0,o=i.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(a=!c||s||n?"":"_unnormalized"+(m+=1)),url:o,originalName:h,isDefine:p,id:(c?c+"!"+v:v)+a}}function b(e){var t=e.id,n=getOwn(a,t);return n||(n=a[t]=new i.Module(e)),n}function w(e,t,n){var i=e.id,r=getOwn(a,i);!hasProp(d,i)||r&&!r.defineEmitComplete?(r=b(e)).error&&"error"===t?n(r.error):r.on(t,n):"defined"===t&&n(d[i])}function T(e,t){var n=e.requireModules,i=!1;t?t(e):(each(n,function(t){var n=getOwn(a,t);n&&(n.error=e,n.events.error&&(i=!0,n.emit("error",e)))}),i||req.onError(e))}function S(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(i.defQueueMap[t]=!0),u.push(e)}),globalDefQueue=[])}function E(e){delete a[e],delete l[e]}function M(e,t,n){var i=e.map.id;e.error?e.emit("error",e.error):(t[i]=!0,each(e.depMaps,function(i,r){var o=i.id,s=getOwn(a,o);!s||e.depMatched[r]||n[o]||(getOwn(t,o)?(e.defineDep(r,d[o]),e.check()):M(s,t,n))}),n[i]=!0)}function A(){var e,n,r=1e3*s.waitSeconds,a=r&&i.startTime+r<(new Date).getTime(),c=[],u=[],d=!1,h=!0;if(!t){if(t=!0,eachProp(l,function(e){var t=e.map,i=t.id;if(e.enabled&&(t.isDefine||u.push(e),!e.error))if(!e.inited&&a)y(i)?(n=!0,d=!0):(c.push(i),v(i));else if(!e.inited&&e.fetched&&t.isDefine&&(d=!0,!t.prefix))return h=!1}),a&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=i.contextName,T(e);h&&each(u,function(e){M(e,{},{})}),a&&!n||!d||!isBrowser&&!isWebWorker||o||(o=setTimeout(function(){o=0,A()},50)),t=!1}}function R(e){hasProp(d,e[0])||b(x(e[0],null,!0)).init(e[1],e[2])}function C(e,t,n,i){e.detachEvent&&!isOpera?i&&e.detachEvent(i,t):e.removeEventListener(n,t,!1)}function L(e){var t=e.currentTarget||e.srcElement;return C(t,i.onScriptLoad,"load","onreadystatechange"),C(t,i.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function P(){var e;for(S();u.length;){if(null===(e=u.shift())[0])return T(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));R(e)}i.defQueueMap={}}return r={require:function(e){return e.require?e.require:e.require=i.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?d[e.map.id]=e.exports:e.exports=d[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(s.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(n=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(s.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,n,i){i=i||{},this.inited||(this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=n,this.inited=!0,this.ignore=i.ignore,i.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,i.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;h[e]||(h[e]=!0,i.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,n=this.map.id,r=this.depExports,o=this.exports,s=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(s)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=i.execCb(n,s,r,o)}catch(t){e=t}else o=i.execCb(n,s,r,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",T(this.error=e)}else o=s;if(this.exports=o,this.map.isDefine&&!this.ignore&&(d[n]=o,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(i,this.map,a)}E(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(i.defQueueMap,n)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,n=x(e.prefix);this.depMaps.push(n),w(n,"defined",bind(this,function(n){var r,o,l,c=getOwn(p,this.map.id),u=this.map.name,d=this.map.parentMap?this.map.parentMap.name:null,h=i.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(n.normalize&&(u=n.normalize(u,function(e){return g(e,d,!0)})||""),w(o=x(e.prefix+"!"+u,this.map.parentMap,!0),"defined",bind(this,function(e){this.map.normalizedMap=o,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((l=getOwn(a,o.id))&&(this.depMaps.push(o),this.events.error&&l.on("error",bind(this,function(e){this.emit("error",e)})),l.enable()))):c?(this.map.url=i.nameToUrl(c),void this.load()):((r=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(a,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&E(e.map.id)}),T(e)}),r.fromText=bind(this,function(n,o){var a=e.name,l=x(a),c=useInteractive;o&&(n=o),c&&(useInteractive=!1),b(l),hasProp(s.config,t)&&(s.config[a]=s.config[t]);try{req.exec(n)}catch(e){return T(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(l),i.completeLoad(a),h([a],r)}),void n.load(e.name,h,r,s))})),i.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){l[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var n,o,s;if("string"==typeof e){if(e=x(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,s=getOwn(r,e.id))return void(this.depExports[t]=s(this));this.depCount+=1,w(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?w(e,"error",bind(this,this.errback)):this.events.error&&w(e,"error",bind(this,function(e){this.emit("error",e)}))}n=e.id,o=a[n],hasProp(r,n)||!o||o.enabled||i.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(a,e.id);t&&!t.enabled&&i.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},i={config:s,contextName:e,registry:a,defined:d,urlFetched:h,defQueue:u,defQueueMap:{},Module:n,makeModuleMap:x,nextTick:req.nextTick,onError:T,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,n){return(-1===n.indexOf("?")?"?":"&")+t}}var n=s.shim,r={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){r[t]?(s[t]||(s[t]={}),mixin(s[t],e,!0,!0)):s[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(p[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=i.makeShimExports(e)),n[t]=e}),s.shim=n),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(s.paths[t]=e.location),s.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(a,function(e,t){e.inited||e.map.unnormalized||(e.map=x(t,
6null,!0))}),(e.deps||e.callback)&&i.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,n){function o(s,l,c){var u,h;return n.enableBuildCallback&&l&&isFunction(l)&&(l.__requireJsBuild=!0),"string"==typeof s?isFunction(l)?T(makeError("requireargs","Invalid require call"),c):t&&hasProp(r,s)?r[s](a[t.id]):req.get?req.get(i,s,t,o):(u=x(s,t,!1,!0).id,hasProp(d,u)?d[u]:T(makeError("notloaded",'Module name "'+u+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(P(),i.nextTick(function(){P(),(h=b(x(null,t))).skipMap=n.skipMap,h.init(s,l,c,{enabled:!0}),A()}),o)}return n=n||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var n,r=e.lastIndexOf("."),o=e.split("/")[0];return-1!==r&&(!("."===o||".."===o)||r>1)&&(n=e.substring(r,e.length),e=e.substring(0,r)),i.nameToUrl(g(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(d,x(e,t,!1,!0).id)},specified:function(e){return e=x(e,t,!1,!0).id,hasProp(d,e)||hasProp(a,e)}}),t||(o.undef=function(e){S();var n=x(e,t,!0),r=getOwn(a,e);r.undefed=!0,v(e),delete d[e],delete h[n.url],delete c[e],eachReverse(u,function(t,n){t[0]===e&&u.splice(n,1)}),delete i.defQueueMap[e],r&&(r.events.defined&&(c[e]=r.events),E(e))}),o},enable:function(e){getOwn(a,e.id)&&b(e).enable()},completeLoad:function(e){var t,n,r,o=getOwn(s.shim,e)||{},l=o.exports;for(S();u.length;){if(null===(n=u.shift())[0]){if(n[0]=e,t)break;t=!0}else n[0]===e&&(t=!0);R(n)}if(i.defQueueMap={},r=getOwn(a,e),!t&&!hasProp(d,e)&&r&&!r.inited){if(!(!s.enforceDefine||l&&getGlobal(l)))return y(e)?void 0:T(makeError("nodefine","No define call for "+e,null,[e]));R([e,o.deps||[],o.exportsFn])}A()},nameToUrl:function(e,t,n){var r,o,a,l,c,u,d=getOwn(s.pkgs,e);if(d&&(e=d),u=getOwn(p,e))return i.nameToUrl(u,t,n);if(req.jsExtRegExp.test(e))l=e+(t||"");else{for(r=s.paths,a=(o=e.split("/")).length;a>0;a-=1)if(c=getOwn(r,o.slice(0,a).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,a,c);break}l=o.join("/"),l=("/"===(l+=t||(/^data\:|^blob\:|\?/.test(l)||n?"":".js")).charAt(0)||l.match(/^[\w\+\.\-]+:/)?"":s.baseUrl)+l}return s.urlArgs&&!/^blob\:/.test(l)?l+s.urlArgs(e,l):l},load:function(e,t){req.load(i,e,t)},execCb:function(e,t,n,i){return t.apply(i,n)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=L(e);i.completeLoad(t.id)}},onScriptError:function(e){var t=L(e);if(!y(t.id)){var n=[];return eachProp(a,function(e,i){0!==i.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return n.push(i),!0})}),T(makeError("scripterror",'Script error for "'+t.id+(n.length?'", needed by: '+n.join(", "):'"'),e,[t.id]))}}},i.require=i.makeRequire(),i}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}})(this,"undefined"==typeof setTimeout?void 0:setTimeout), 7/*! 8 * jQuery JavaScript Library v3.7.1 9 * https://jquery.com/ 10 * 11 * Copyright OpenJS Foundation and other contributors 12 * Released under the MIT license 13 * https://jquery.org/license 14 * 15 * Date: 2023-08-28T13:37Z 16 */ 17function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){var n=[],i=Object.getPrototypeOf,r=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},s=n.push,a=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,d=u.toString,h=d.call(Object),p={},f=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},g=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var i,r,o=(n=n||g).createElement("script");if(o.text=e,t)for(i in v)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var x="3.7.1",b=/HTML$/i,w=function(e,t){return new w.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!f(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}
vendor: 5,267 bytes, line 17
17function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return r.call(this)},get:function(e){return null==e?r.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(w.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||f(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&s!==i&&(c&&i&&(w.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[t],o=r&&!Array.isArray(n)?[]:r||w.isPlainObject(n)?n:{},r=!1,s[t]=w.extend(c,o,i)):void 0!==i&&(s[t]=i));return s},w.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=u.call(t,"constructor")&&t.constructor)&&d.call(n)===h)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(T(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},text:function(e){var t,n="",i=0,r=e.nodeType;if(!r)for(;t=e[i++];)n+=w.text(t);return 1===r||11===r?e.textContent:9===r?e.documentElement.textContent:3===r||4===r?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(T(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:a.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!b.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,s=!n;r<o;r++)!t(e[r],r)!==s&&i.push(e[r]);return i},map:function(e,t,n){var i,r,s=0,a=[];if(T(e))for(i=e.length;s<i;s++)null!=(r=t(e[s],s,n))&&a.push(r);else for(s in e)null!=(r=t(e[s],s,n))&&a.push(r);return o(a)},guid:1,support:p}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});var E=n.pop,M=n.sort,A=n.splice,R="[\\x20\\t\\r\\n\\f]",C=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g");w.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var L=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function P(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}w.escapeSelector=function(e){return(e+"").replace(L,P)};var I=g,k=s;!function(){var t,i,o,s,l,c,d,h,f,m,g=k,v=w.expando,y=0,_=0,x=ee(),b=ee(),T=ee(),L=ee(),P=function(e,t){return e===t&&(l=!0),0},D="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",O="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\["+R+"*("+O+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+R+"*\\]",F=":("+O+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",U=new RegExp(R+"+","g"),B=new RegExp("^"+R+"*,"+R+"*"),H=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),z=new RegExp(R+"|>"),G=new RegExp(F),V=new RegExp("^"+O+"$"),W={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},j=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,Y=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),J=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Z=function(){le()},K=he(function(e){return!0===e.disabled&&S(e,"fieldset")},{dir:"parentNode",next:"legend"});try{g.apply(n=r.call(I.childNodes),I.childNodes),n[I.childNodes.length].nodeType}catch(e){g={apply:function(e,t){k.apply(e,r.call(t))}
vendor: 9,344 bytes, line 17
17,call:function(e){k.apply(e,r.call(arguments,1))}}}function Q(e,t,n,i){var r,o,s,a,l,u,d,m=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!i&&(le(t),t=t||c,h)){if(11!==y&&(l=X.exec(e)))if(r=l[1]){if(9===y){if(!(s=t.getElementById(r)))return n;if(s.id===r)return g.call(n,s),n}else if(m&&(s=m.getElementById(r))&&Q.contains(t,s)&&s.id===r)return g.call(n,s),n}else{if(l[2])return g.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(r)),n}if(!(L[e+" "]||f&&f.test(e))){if(d=e,m=t,1===y&&(z.test(e)||H.test(e))){for((m=$.test(e)&&ae(t.parentNode)||t)==t&&p.scope||((a=t.getAttribute("id"))?a=w.escapeSelector(a):t.setAttribute("id",a=v)),o=(u=ue(e)).length;o--;)u[o]=(a?"#"+a:":scope")+" "+de(u[o]);d=u.join(",")}try{return g.apply(n,m.querySelectorAll(d)),n}catch(t){L(e,!0)}finally{a===v&&t.removeAttribute("id")}}}return ye(e.replace(C,"$1"),t,n,i)}function ee(){var e=[];return function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function te(e){return e[v]=!0,e}function ne(e){var t=c.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return S(t,"input")&&t.type===e}}function re(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&K(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te(function(t){return t=+t,te(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var t,n=e?e.ownerDocument||e:I;return n!=c&&9===n.nodeType&&n.documentElement?(d=(c=n).documentElement,h=!w.isXMLDoc(c),m=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&I!=c&&(t=c.defaultView)&&t.top!==t&&t.addEventListener("unload",Z),p.getById=ne(function(e){return d.appendChild(e).id=w.expando,!c.getElementsByName||!c.getElementsByName(w.expando).length}),p.disconnectedMatch=ne(function(e){return m.call(e,"*")}),p.scope=ne(function(){return c.querySelectorAll(":scope")}),p.cssHas=ne(function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),p.getById?(i.filter.ID=function(e){var t=e.replace(Y,J);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(Y,J);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},i.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&h)return t.getElementsByClassName(e)},f=[],ne(function(e){var t;d.appendChild(e).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||f.push("\\["+R+"*(?:value|"+D+")"),e.querySelectorAll("[id~="+v+"-]").length||f.push("~="),e.querySelectorAll("a#"+v+"+*").length||f.push(".#.+[+~]"),e.querySelectorAll(":checked").length||f.push(":checked"),(t=c.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),(t=c.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||f.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")")}),p.cssHas||f.push(":has"),f=f.length&&new RegExp(f.join("|")),P=function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===c||e.ownerDocument==I&&Q.contains(I,e)?-1:t===c||t.ownerDocument==I&&Q.contains(I,t)?1:s?a.call(s,e)-a.call(s,t):0:4&n?-1:1)},c):c}for(t in Q.matches=function(e,t){return Q(e,null,null,t)},Q.matchesSelector=function(e,t){if(le(e),h&&!L[t+" "]&&(!f||!f.test(t)))try{var n=m.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){L(t,!0)}return Q(t,c,null,[e]).length>0},Q.contains=function(e,t){return(e.ownerDocument||e)!=c&&le(e),w.contains(e,t)},Q.attr=function(e,t){(e.ownerDocument||e)!=c&&le(e);var n=i.attrHandle[t.toLowerCase()],r=n&&u.call(i.attrHandle,t.toLowerCase())?n(e,t,!h):void 0;return void 0!==r?r:e.getAttribute(t)},Q.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},w.uniqueSort=function(e){var t,n=[],i=0,o=0;if(l=!p.sortStable,s=!p.sortStable&&r.call(e,0),M.call(e,P),l){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)A.call(e,n[i],1)}return s=null,e},w.fn.uniqueSort=function(){return this.pushStack(w.uniqueSort(r.apply(this)))},i=w.expr={cacheLength:50,createPseudo:te,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Y,J),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,J),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Q.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Q.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return W.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Y,J).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&x(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var r=Q.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,p,f=o!==s?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),_=!l&&!a,x=!1;if(m){if(o){for(;f;){for(d=t;d=d[f];)if(a?S(d,g):1===d.nodeType)return!1;p=f="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&_){for(x=(h=(c=(u=m[v]||(m[v]={}))[e]||[])[0]===y&&c[1])&&c[2],d=h&&m.childNodes[h];d=++h&&d&&d[f]||(x=h=0)||p.pop();)if(1===d.nodeType&&++x&&d===t){u[e]=[y,h,x];break}}else if(_&&(x=h=(c=(u=t[v]||(t[v]={}))[e]||[])[0]===y&&c[1]),!1===x)for(;(d=++h&&d&&d[f]||(x=h=0)||p.pop())&&(!(a?S(d,g):1===d.nodeType)||!++x||(_&&((u=d[v]||(d[v]={}))[e]=[y,x]),d!==t)););return(x-=r)===i||x%i===0&&x/i>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||Q.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,n){for(var i,o=r(e,t),s=o.length;s--;)e[i=a.call(e,o[s])]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:te(function(e){var t=[],n=[],i=ve(e.replace(C,"$1"));return i[v]?te(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:te(function(e){return function(t){return Q(e,t).length>0}}),contains:te(function(e){return e=e.replace(Y,J),function(t){return(t.textContent||w.text(t)).indexOf(e)>-1}}),lang:te(function(e){return V.test(e||"")||Q.error("unsupported lang: "+e),e=e.replace(Y,J).toLowerCase(),function(t){var n;do{if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===function(){try{return c.activeElement}catch(e){}}()&&c.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)}
vendor: 10,941 bytes, line 17
17,input:function(e){return j.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se(function(){return[0]}),last:se(function(e,t){return[t-1]}),eq:se(function(e,t,n){return[n<0?n+t:n]}),even:se(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:se(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:se(function(e,t,n){var i;for(i=n<0?n+t:n>t?t:n;--i>=0;)e.push(i);return e}),gt:se(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=ie(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=re(t);function ce(){}function ue(e,t){var n,r,o,s,a,l,c,u=b[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=i.preFilter;a;){for(s in n&&!(r=B.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=H.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(C," ")}),a=a.slice(n.length)),i.filter)!(r=W[s].exec(a))||c[s]&&!(r=c[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?Q.error(e):b(e,l).slice(0)}function de(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function he(e,t,n){var i=t.dir,r=t.next,o=r||i,s=n&&"parentNode"===o,a=_++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,r);return!1}:function(t,n,l){var c,u,d=[y,a];if(l){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(u=t[v]||(t[v]={}),r&&S(t,r))t=t[i]||t;else{if((c=u[o])&&c[0]===y&&c[1]===a)return d[2]=c[2];if(u[o]=d,d[2]=e(t,n,l))return!0}return!1}}function pe(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function fe(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),c&&t.push(a)));return s}function me(e,t,n,i,r,o){return i&&!i[v]&&(i=me(i)),r&&!r[v]&&(r=me(r,o)),te(function(o,s,l,c){var u,d,h,p,f=[],m=[],v=s.length,y=o||function(e,t,n){for(var i=0,r=t.length;i<r;i++)Q(e,t[i],n);return n}(t||"*",l.nodeType?[l]:l,[]),_=!e||!o&&t?y:fe(y,f,e,l,c);if(n?n(_,p=r||(o?e:v||i)?[]:s,l,c):p=_,i)for(u=fe(p,m),i(u,[],l,c),d=u.length;d--;)(h=u[d])&&(p[m[d]]=!(_[m[d]]=h));if(o){if(r||e){if(r){for(u=[],d=p.length;d--;)(h=p[d])&&u.push(_[d]=h);r(null,p=[],u,c)}for(d=p.length;d--;)(h=p[d])&&(u=r?a.call(o,h):f[d])>-1&&(o[u]=!(s[u]=h))}}else p=fe(p===s?p.splice(v,p.length):p),r?r(null,s,p,c):g.apply(s,p)})}function ge(e){for(var t,n,r,s=e.length,l=i.relative[e[0].type],c=l||i.relative[" "],u=l?1:0,d=he(function(e){return e===t},c,!0),h=he(function(e){return a.call(t,e)>-1},c,!0),p=[function(e,n,i){var r=!l&&(i||n!=o)||((t=n).nodeType?d(e,n,i):h(e,n,i));return t=null,r}];u<s;u++)if(n=i.relative[e[u].type])p=[he(pe(p),n)];else{if((n=i.filter[e[u].type].apply(null,e[u].matches))[v]){for(r=++u;r<s&&!i.relative[e[r].type];r++);return me(u>1&&pe(p),u>1&&de(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(C,"$1"),n,u<r&&ge(e.slice(u,r)),r<s&&ge(e=e.slice(r)),r<s&&de(e))}p.push(n)}return pe(p)}function ve(e,t){var n,r=[],s=[],a=T[e+" "];if(!a){for(t||(t=ue(e)),n=t.length;n--;)(a=ge(t[n]))[v]?r.push(a):s.push(a);a=T(e,function(e,t){var n=t.length>0,r=e.length>0,s=function(s,a,l,u,d){var p,f,m,v=0,_="0",x=s&&[],b=[],T=o,S=s||r&&i.find.TAG("*",d),M=y+=null==T?1:Math.random()||.1,A=S.length;for(d&&(o=a==c||a||d);_!==A&&null!=(p=S[_]);_++){if(r&&p){for(f=0,a||p.ownerDocument==c||(le(p),l=!h);m=e[f++];)if(m(p,a||c,l)){g.call(u,p);break}d&&(y=M)}n&&((p=!m&&p)&&v--,s&&x.push(p))}if(v+=_,n&&_!==v){for(f=0;m=t[f++];)m(x,b,a,l);if(s){if(v>0)for(;_--;)x[_]||b[_]||(b[_]=E.call(u));b=fe(b)}g.apply(u,b),d&&!s&&b.length>0&&v+t.length>1&&w.uniqueSort(u)}return d&&(y=M,o=T),x};return n?te(s):s}(s,r)),a.selector=e}return a}function ye(e,t,n,r){var o,s,a,l,c,u="function"==typeof e&&e,d=!r&&ue(e=u.selector||e);if(n=n||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===t.nodeType&&h&&i.relative[s[1].type]){if(!(t=(i.find.ID(a.matches[0].replace(Y,J),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(o=W.needsContext.test(e)?0:s.length;o--&&(a=s[o],!i.relative[l=a.type]);)if((c=i.find[l])&&(r=c(a.matches[0].replace(Y,J),$.test(s[0].type)&&ae(t.parentNode)||t))){if(s.splice(o,1),!(e=r.length&&de(s)))return g.apply(n,r),n;break}}return(u||ve(e,d))(r,t,!h,n,!t||$.test(e)&&ae(t.parentNode)||t),n}ce.prototype=i.filters=i.pseudos,i.setFilters=new ce,p.sortStable=v.split("").sort(P).join("")===v,le(),p.sortDetached=ne(function(e){return 1&e.compareDocumentPosition(c.createElement("fieldset"))}),w.find=Q,w.expr[":"]=w.expr.pseudos,w.unique=w.uniqueSort,Q.compile=ve,Q.select=ye,Q.setDocument=le,Q.tokenize=ue,Q.escape=w.escapeSelector,Q.getText=w.text,Q.isXML=w.isXMLDoc,Q.selectors=w.expr,Q.support=w.support,Q.uniqueSort=w.uniqueSort}();var D=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&w(e).is(n))break;i.push(e)}return i},O=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=w.expr.match.needsContext,F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function U(e,t,n){return f(t)?w.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return a.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?w.find.matchesSelector(i,e)?[i]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<i;t++)if(w.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)w.find(e,r[t],n);return i>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(U(this,e||[],!1))},not:function(e){return this.pushStack(U(this,e||[],!0))},is:function(e){return!!U(this,"string"==typeof e&&N.test(e)?w(e):e||[],!1).length}});var B,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||B,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:H.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),F.test(i[1])&&w.isPlainObject(t))for(i in t)f(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=g.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,B=w(g);var z=/^(?:parents|prev(?:Until|All))/,G={children:!0,contents:!0,next:!0,prev:!0};function V(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!=typeof e&&w(e);if(!N.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?a.call(w(e),this[0]):a.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return D(e,"parentNode")},parentsUntil:function(e,t,n){return D(e,"parentNode",n)},next:function(e){return V(e,"nextSibling")},prev:function(e){return V(e,"previousSibling")},nextAll:function(e){return D(e,"nextSibling")},prevAll:function(e){return D(e,"previousSibling")},nextUntil:function(e,t,n){return D(e,"nextSibling",n)},prevUntil:function(e,t,n){return D(e,"previousSibling",n)},siblings:function(e){return O((e.parentNode||{}).firstChild,e)},children:function(e){return O(e.firstChild)},contents:function(e){return null!=e.contentDocument&&i(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,i){var r=w.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=w.filter(i,r)),this.length>1&&(G[e]||w.uniqueSort(r),z.test(e)&&r.reverse()),this.pushStack(r)}});var W=/[^\x20\t\r\n\f]+/g;function j(e){return e}function q(e){throw e}function X(e,t,n,i){var r;try{e&&f(r=e.promise)?r.call(e).done(t).fail(n):e&&f(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return w.each(e.match(W)||[],function(e,n){t[n]=!0}),t}(e):w.extend({},e);var t,n,i,r,o=[],s=[],a=-1,l=function(){for(r=r||e.once,i=t=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,r&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){w.each(n,function(n,i){f(i)?e.unique&&c.has(i)||o.push(i):i&&i.length&&"string"!==_(i)&&t(i)})}(arguments),n&&!t&&l()),this},remove:function(){return w.each(arguments,function(e,t){for(var n;(n=w.inArray(t,o,n))>-1;)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,i){var r=f(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&f(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,i,r){var o=0;function s(t,n,i,r){return function(){var a=this,l=arguments,c=function(){var e,c;
vendor: 6,049 bytes, line 17
17if(!(t<o)){if((e=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,f(c)?r?c.call(e,s(o,n,j,r),s(o,n,q,r)):(o++,c.call(e,s(o,n,j,r),s(o,n,q,r),s(o,n,j,n.notifyWith))):(i!==j&&(a=void 0,l=[e]),(r||n.resolveWith)(a,l))}},u=r?c:function(){try{c()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,u.error),t+1>=o&&(i!==q&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?u():(w.Deferred.getErrorHook?u.error=w.Deferred.getErrorHook():w.Deferred.getStackHook&&(u.error=w.Deferred.getStackHook()),e.setTimeout(u))}}return w.Deferred(function(e){n[0][3].add(s(0,e,f(r)?r:j,e.notifyWith)),n[1][3].add(s(0,e,f(t)?t:j)),n[2][3].add(s(0,e,f(i)?i:q))}).promise()},promise:function(e){return null!=e?w.extend(e,r):r}},o={};return w.each(n,function(e,t){var s=t[2],a=t[5];r[t[1]]=s.add,a&&s.add(function(){i=a},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),o=r.call(arguments),s=w.Deferred(),a=function(e){return function(n){i[e]=this,o[e]=arguments.length>1?r.call(arguments):n,--t||s.resolveWith(i,o)}};if(t<=1&&(X(e,s.done(a(n)).resolve,s.reject,!t),"pending"===s.state()||f(o[n]&&o[n].then)))return s.then();for(;n--;)X(o[n],a(n),s.reject);return s.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&$.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var Y=w.Deferred();function J(){g.removeEventListener("DOMContentLoaded",J),e.removeEventListener("load",J),w.ready()}w.fn.ready=function(e){return Y.then(e).catch(function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||Y.resolveWith(g,[w]))}}),w.ready.then=Y.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(w.ready):(g.addEventListener("DOMContentLoaded",J),e.addEventListener("load",J));var Z=function(e,t,n,i,r,o,s){var a=0,l=e.length,c=null==n;if("object"===_(n))for(a in r=!0,n)Z(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,f(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(w(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:c?t.call(e):l?t(e[0],n):o},K=/^-ms-/,Q=/-([a-z])/g;function ee(e,t){return t.toUpperCase()}function te(e){return e.replace(K,"ms-").replace(Q,ee)}var ne=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function ie(){this.expando=w.expando+ie.uid++}ie.uid=1,ie.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ne(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[te(t)]=n;else for(i in t)r[te(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][te(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(te):(t=te(t))in i?[t]:t.match(W)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||w.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var re=new ie,oe=new ie,se=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ae=/[A-Z]/g;function le(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(ae,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:se.test(e)?JSON.parse(e):e)}(n)}catch(e){}oe.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return oe.hasData(e)||re.hasData(e)},data:function(e,t,n){return oe.access(e,t,n)},removeData:function(e,t){oe.remove(e,t)},_data:function(e,t,n){return re.access(e,t,n)},_removeData:function(e,t){re.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=oe.get(o),1===o.nodeType&&!re.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=te(i.slice(5)),le(o,i,r[i]));re.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){oe.set(this,e)}):Z(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=oe.get(o,e))||void 0!==(n=le(o,e))?n:void 0;this.each(function(){oe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){oe.remove(this,e)})}}),w.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=re.get(e,t),n&&(!i||Array.isArray(n)?i=re.access(e,t,w.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),i=n.length,r=n.shift(),o=w._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,function(){w.dequeue(e,t)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return re.get(e,n)||re.access(e,n,{empty:w.Callbacks("once memory").add(function(){re.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=w.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;
vendor: 5,849 bytes, line 17
17)(n=re.get(o[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var ce=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ue=new RegExp("^(?:([+-])=|)("+ce+")([a-z%]*)$","i"),de=["Top","Right","Bottom","Left"],he=g.documentElement,pe=function(e){return w.contains(e.ownerDocument,e)},fe={composed:!0};he.getRootNode&&(pe=function(e){return w.contains(e.ownerDocument,e)||e.getRootNode(fe)===e.ownerDocument});var me=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&pe(e)&&"none"===w.css(e,"display")};function ge(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return w.css(e,t,"")},l=a(),c=n&&n[3]||(w.cssNumber[t]?"":"px"),u=e.nodeType&&(w.cssNumber[t]||"px"!==c&&+l)&&ue.exec(w.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)w.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u*=2,w.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}var ve={};function ye(e){var t,n=e.ownerDocument,i=e.nodeName,r=ve[i];return r||(t=n.body.appendChild(n.createElement(i)),r=w.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),ve[i]=r,r)}function _e(e,t){for(var n,i,r=[],o=0,s=e.length;o<s;o++)(i=e[o]).style&&(n=i.style.display,t?("none"===n&&(r[o]=re.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&me(i)&&(r[o]=ye(i))):"none"!==n&&(r[o]="none",re.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}w.fn.extend({show:function(){return _e(this,!0)},hide:function(){return _e(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){me(this)?w(this).show():w(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;xe=g.createDocumentFragment().appendChild(g.createElement("div")),(be=g.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),p.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",p.option=!!xe.lastChild;var Ee={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?w.merge([e],n):n}function Ae(e,t){for(var n=0,i=e.length;n<i;n++)re.set(e[n],"globalEval",!t||re.get(t[n],"globalEval"))}Ee.tbody=Ee.tfoot=Ee.colgroup=Ee.caption=Ee.thead,Ee.th=Ee.td,p.option||(Ee.optgroup=Ee.option=[1,"<select multiple='multiple'>","</select>"]);var Re=/<|&#?\w+;/;function Ce(e,t,n,i,r){for(var o,s,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((o=e[p])||0===o)if("object"===_(o))w.merge(h,o.nodeType?[o]:o);else if(Re.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Te.exec(o)||["",""])[1].toLowerCase(),l=Ee[a]||Ee._default,s.innerHTML=l[1]+w.htmlPrefilter(o)+l[2],u=l[0];u--;)s=s.lastChild;w.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",p=0;o=h[p++];)if(i&&w.inArray(o,i)>-1)r&&r.push(o);else if(c=pe(o),s=Me(d.appendChild(o),"script"),c&&Ae(s),n)for(u=0;o=s[u++];)Se.test(o.type||"")&&n.push(o);return d}var Le=/^([^.]*)(?:\.(.+)|)/;function Pe(){return!0}function Ie(){return!1}function ke(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)ke(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ie;else if(!r)return e;return 1===o&&(s=r,r=function(e){return w().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=w.guid++)),e.each(function(){w.event.add(this,t,r,i,n)})}function De(e,t,n){n?(re.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var n,i=re.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=r.call(arguments),re.set(this,t,i),this[t](),n=re.get(this,t),re.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(re.set(this,t,w.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Pe)}})):void 0===re.get(e,t)&&w.event.add(e,t,Pe)}w.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,p,f,m,g=re.get(e);if(ne(e))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&w.find.matchesSelector(he,r),n.guid||(n.guid=w.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(W)||[""]).length;c--;)p=m=(a=Le.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=w.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=w.event.special[p]||{},u=w.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&w.expr.match.needsContext.test(r),namespace:f.join(".")},o),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),w.event.global[p]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,p,f,m,g=re.hasData(e)&&re.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(W)||[""]).length;c--;)if(p=m=(a=Le.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=w.event.special[p]||{},h=l[p=(i?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.
vendor: 11,073 bytes, line 17
17join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||w.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)w.event.remove(e,p+t[c],n,i,!0);w.isEmptyObject(l)&&re.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=new Array(arguments.length),l=w.event.fix(e),c=(re.get(this,"events")||Object.create(null))[l.type]||[],u=w.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(s=w.event.handlers.call(this,l,c),t=0;(r=s[t++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(i=((w.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,r,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[r=(i=t[n]).selector+" "]&&(s[r]=i.needsContext?w(r,this).index(c)>-1:w.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:f(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&S(t,"input")&&De(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&S(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&S(t,"input")&&re.get(t,"click")||S(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Pe:Ie,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:Ie,isPropagationStopped:Ie,isImmediatePropagationStopped:Ie,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Pe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Pe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Pe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){if(g.documentMode){var n=re.get(this,"handle"),i=w.event.fix(e);i.type="focusin"===e.type?"focus":"blur",i.isSimulated=!0,n(e),i.target===i.currentTarget&&n(i)}else w.event.simulate(t,e.target,w.event.fix(e))}w.event.special[e]={setup:function(){var i;if(De(this,e,!0),!g.documentMode)return!1;(i=re.get(this,t))||this.addEventListener(t,n),re.set(this,t,(i||0)+1)},trigger:function(){return De(this,e),!0},teardown:function(){var e;if(!g.documentMode)return!1;(e=re.get(this,t)-1)?re.set(this,t,e):(this.removeEventListener(t,n),re.remove(this,t))},_default:function(t){return re.get(t.target,e)},delegateType:t},w.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,r=g.documentMode?this:i,o=re.get(r,t);o||(g.documentMode?this.addEventListener(t,n):i.addEventListener(e,n,!0)),re.set(r,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=g.documentMode?this:i,o=re.get(r,t)-1;o?re.set(r,t,o):(g.documentMode?this.removeEventListener(t,n):i.removeEventListener(e,n,!0),re.remove(r,t))}}}),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,r=e.handleObj;return i&&(i===this||w.contains(this,i))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,i){return ke(this,e,t,n,i)},one:function(e,t,n,i){return ke(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,w(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ie),this.each(function(){w.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Fe=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ue(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function ze(e,t){var n,i,r,o,s,a;if(1===t.nodeType){if(re.hasData(e)&&(a=re.get(e).events))for(r in re.remove(t,"handle events"),a)for(n=0,i=a[r].length;n<i;n++)w.event.add(t,r,a[r][n]);oe.hasData(e)&&(o=oe.access(e),s=w.extend({},o),oe.set(t,s))}}function Ge(e,t){var n=t.nodeName.toLowerCase();"input"===n&&we.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ve(e,t,n,i){t=o(t);var r,s,a,l,c,u,d=0,h=e.length,m=h-1,g=t[0],v=f(g);if(v||h>1&&"string"==typeof g&&!p.checkClone&&Ne.test(g))return e.each(function(r){var o=e.eq(r);v&&(t[0]=g.call(this,r,o.html())),Ve(o,t,n,i)});if(h&&(s=(r=Ce(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=s),s||i)){for(l=(a=w.map(Me(r,"script"),Be)).length;d<h;d++)c=r,d!==m&&(c=w.clone(c,!0,!0),l&&w.merge(a,Me(c,"script"))),n.call(e[d],c,d);if(l)for(u=a[a.length-1].ownerDocument,w.map(a,He),d=0;d<l;d++)c=a[d],Se.test(c.type||"")&&!re.access(c,"globalEval")&&w.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?w._evalUrl&&!c.noModule&&w._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):y(c.textContent.replace(Fe,""),c,u))}return e}function We(e,t,n){for(var i,r=t?w.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||w.cleanData(Me(i)),i.parentNode&&(n&&pe(i)&&Ae(Me(i,"script")),i.parentNode.removeChild(i));return e}w.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,r,o,s,a=e.cloneNode(!0),l=pe(e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(s=Me(a),i=0,r=(o=Me(e)).length;i<r;i++)Ge(o[i],s[i]);if(t)if(n)for(o=o||Me(e),s=s||Me(a),i=0,r=o.length;i<r;i++)ze(o[i],s[i]);else ze(e,a);return(s=Me(a,"script")).length>0&&Ae(s,!l&&Me(e,"script")),a},cleanData:function(e){for(var t,n,i,r=w.event.special,o=0;void 0!==(n=e[o]);o++)if(ne(n)){if(t=n[re.expando]){if(t.events)for(i in t.events)r[i]?w.event.remove(n,i):w.removeEvent(n,i,t.handle);n[re.expando]=void 0}n[oe.expando]&&(n[oe.expando]=void 0)}}}),w.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return Z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ve(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ue(this,e).appendChild(e)})},prepend:function(){return Ve(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ue(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(Me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return Z(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!Ee[(Te.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(Me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Ve(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(Me(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,i=[],r=w(e),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(r[a])[t](n),s.apply(i,n.get());return this.pushStack(i)}});var je=new RegExp("^("+ce+")(?!px)[a-z%]+$","i"),qe=/^--/,Xe=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},$e=function(e,t,n){var i,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in i=n.call(e),t)e.style[r]=o[r];return i},Ye=new RegExp(de.join("|"),"i");function Je(e,t,n){var i,r,o,s,a=qe.test(t),l=e.style;return(n=n||Xe(e))&&(s=n.getPropertyValue(t)||n[t],a&&s&&(s=s.replace(C,"$1")||void 0),""!==s||pe(e)||(s=w.style(e,t)),!p.pixelBoxStyles()&&je.test(s)&&Ye.test(t)&&(i=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=s,s=n.width,l.width=i,l.minWidth=r,l.maxWidth=o)),void 0!==s?s+"":s}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;
17left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",he.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);i="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",s=36===n(t.right),r=36===n(t.width),u.style.position="absolute",o=12===n(u.offsetWidth/3),he.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var i,r,o,s,a,l,c=g.createElement("div"),u=g.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===u.style.backgroundClip,w.extend(p,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,n,i,r;return null==a&&(t=g.createElement("table"),n=g.createElement("tr"),i=g.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;
17border:1px solid",n.style.height="1px",i.style.height="9px",i.style.display="block",he.appendChild(t).appendChild(n).appendChild(i),r=e.getComputedStyle(n),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===n.offsetHeight,he.removeChild(t)),a}}))}();var Ke=["Webkit","Moz","ms"],Qe=g.createElement("div").style,et={};function tt(e){var t=w.cssProps[e]||et[e];return t||(e in Qe?e:et[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ke.length;n--;)if((e=Ke[n]+t)in Qe)return e}(e)||e)}var nt=/^(none|table(?!-c[ea]).+)/,it={position:"absolute",visibility:"hidden",display:"block"},rt={letterSpacing:"0",fontWeight:"400"};function ot(e,t,n){var i=ue.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function st(e,t,n,i,r,o){var s="width"===t?1:0,a=0,l=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=w.css(e,n+de[s],!0,r)),i?("content"===n&&(l-=w.css(e,"padding"+de[s],!0,r)),"margin"!==n&&(l-=w.css(e,"border"+de[s]+"Width",!0,r))):(l+=w.css(e,"padding"+de[s],!0,r),"padding"!==n?l+=w.css(e,"border"+de[s]+"Width",!0,r):a+=w.css(e,"border"+de[s]+"Width",!0,r));return!i&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l+c}function at(e,t,n){var i=Xe(e),r=(!p.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,i),o=r,s=Je(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(je.test(s)){if(!n)return s;s="auto"}return(!p.boxSizingReliable()&&r||!p.reliableTrDimensions()&&S(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===w.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===w.css(e,"boxSizing",!1,i),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+st(e,t,n||(r?"border":"content"),o,i,s)+"px"}function lt(e,t,n,i,r){return new lt.prototype.init(e,t,n,i,r)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=te(t),l=qe.test(t),c=e.style;if(l||(t=tt(a)),s=w.cssHooks[t]||w.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:c[t];"string"===(o=typeof n)&&(r=ue.exec(n))&&r[1]&&(n=ge(e,t,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(w.cssNumber[a]?"":"px")),p.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,o,s,a=te(t);return qe.test(t)||(t=tt(a)),(s=w.cssHooks[t]||w.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=Je(e,t,i)),"normal"===r&&t in rt&&(r=rt[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,i){if(n)return!nt.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?at(e,t,i):$e(e,it,function(){return at(e,t,i)})},set:function(e,n,i){var r,o=Xe(e),s=!p.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===w.css(e,"boxSizing",!1,o),l=i?st(e,t,i,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-st(e,t,"border",!1,o)-.5)),l&&(r=ue.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),ot(0,n,l)}}}),w.cssHooks.marginLeft=Ze(p.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+de[i]+t]=o[i]||o[i-2]||o[0];return r}},"margin"!==e&&(w.cssHooks[e+t].set=ot)}),w.fn.extend({css:function(e,t){return Z(this,function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=Xe(e),r=t.length;s<r;s++)o[t[s]]=w.css(e,t[s],!1,i);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}}),w.Tween=lt,lt.prototype={constructor:lt,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=lt.propHooks[this.prop];return e&&e.get?e.get(this):lt.propHooks._default.get(this)},run:function(e){var t,n=lt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):lt.propHooks._default.set(this),this}},lt.prototype.init.prototype=lt.prototype,lt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[tt(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},lt.propHooks.scrollTop=lt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=lt.prototype.init,w.fx.step={};var ct,ut,dt=/^(?:toggle|show|hide)$/,ht=/queueHooks$/;function pt(){ut&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(pt):e.setTimeout(pt,w.fx.interval),w.fx.tick())}function ft(){return e.setTimeout(function(){ct=void 0}),ct=Date.now()}function mt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=de[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function gt(e,t,n){for(var i,r=(vt.tweeners[t]||[]).concat(vt.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,t,e))return i}function vt(e,t,n){var i,r,o=0,s=vt.prefilters.length,a=w.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=ct||ft(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(i);return a.notifyWith(e,[c,i,n]),i<1&&s?n:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:ct||ft(),duration:n.duration,tweens:[],createTween:function(t,n){var i=w.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||
vendor: 4,104 bytes, line 17
17c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(!function(e,t){var n,i,r,o,s;for(n in e)if(r=t[i=te(n)],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(s=w.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}(u,c.opts.specialEasing);o<s;o++)if(i=vt.prefilters[o].call(c,e,u,c.opts))return f(i.stop)&&(w._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return w.map(u,gt,c),f(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),w.fx.timer(w.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}w.Animation=w.extend(vt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ge(n.elem,e,ue.exec(t),n),n}]},tweener:function(e,t){f(e)?(t=e,e=["*"]):e=e.match(W);for(var n,i=0,r=e.length;i<r;i++)n=e[i],vt.tweeners[n]=vt.tweeners[n]||[],vt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,r,o,s,a,l,c,u,d="width"in t||"height"in t,h=this,p={},f=e.style,m=e.nodeType&&me(e),g=re.get(e,"fxshow");for(i in n.queue||(null==(s=w._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always(function(){h.always(function(){s.unqueued--,w.queue(e,"fx").length||s.empty.fire()})})),t)if(r=t[i],dt.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}p[i]=g&&g[i]||w.style(e,i)}if((l=!w.isEmptyObject(t))||!w.isEmptyObject(p))for(i in d&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=re.get(e,"display")),"none"===(u=w.css(e,"display"))&&(c?u=c:(_e([e],!0),c=e.style.display||c,u=w.css(e,"display"),_e([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===w.css(e,"float")&&(l||(h.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",h.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=re.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&_e([e],!0),h.done(function(){for(i in m||_e([e]),re.remove(e,"fxshow"),p)w.style(e,i,p[i])})),l=gt(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?vt.prefilters.unshift(e):vt.prefilters.push(e)}}),w.speed=function(e,t,n){var i=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||f(e)&&e,duration:e,easing:n&&t||t&&!f(t)&&t};return w.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in w.fx.speeds?i.duration=w.fx.speeds[i.duration]:i.duration=w.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){f(i.old)&&i.old.call(this),i.queue&&w.dequeue(this,i.queue)},i},w.fn.extend({fadeTo:function(e,t,n,i){return this.filter(me).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=w.isEmptyObject(e),o=w.speed(t,n,i),s=function(){var t=vt(this,w.extend({},e),o);(r||re.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=w.timers,s=re.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&ht.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=re.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=w.timers,s=i?i.length:0;for(n.finish=!0,w.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1)
vendor: 5,991 bytes, line 17
17);for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(mt(t,!0),e,i,r)}}),w.each({slideDown:mt("show"),slideUp:mt("hide"),slideToggle:mt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(ct=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),ct=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){ut||(ut=!0,pt())},w.fx.stop=function(){ut=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx&&w.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,i){var r=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(r)}})},function(){var e=g.createElement("input"),t=g.createElement("select").appendChild(g.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=t.selected,(e=g.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var yt,_t=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return Z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(r=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=w.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(W);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=_t[t]||w.find.attr;_t[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=_t[s],_t[s]=r,r=null!=n(e,t,i)?s:null,_t[s]=o),r}});var xt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;function wt(e){return(e.match(W)||[]).join(" ")}function Tt(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(W)||[]}w.fn.extend({prop:function(e,t){return Z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,r=w.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this}),w.fn.extend({addClass:function(e){var t,n,i,r,o,s;return f(e)?this.each(function(t){w(this).addClass(e.call(this,t,Tt(this)))}):(t=St(e)).length?this.each(function(){if(i=Tt(this),n=1===this.nodeType&&" "+wt(i)+" "){for(o=0;o<t.length;o++)r=t[o],n.indexOf(" "+r+" ")<0&&(n+=r+" ");s=wt(n),i!==s&&this.setAttribute("class",s)}}):this},removeClass:function(e){var t,n,i,r,o,s;return f(e)?this.each(function(t){w(this).removeClass(e.call(this,t,Tt(this)))}):arguments.length?(t=St(e)).length?this.each(function(){if(i=Tt(this),n=1===this.nodeType&&" "+wt(i)+" "){for(o=0;o<t.length;o++)for(r=t[o];n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");s=wt(n),i!==s&&this.setAttribute("class",s)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,i,r,o,s=typeof e,a="string"===s||Array.isArray(e);return f(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,Tt(this),t),t)}):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each(function(){if(a)for(o=w(this),r=0;r<n.length;r++)i=n[r],o.hasClass(i)?o.removeClass(i):o.addClass(i);else void 0!==e&&"boolean"!==s||((i=Tt(this))&&re.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===e?"":re.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+wt(Tt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;w.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=f(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,w(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=w.map(r,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=w.valHooks[r.type]||w.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Et,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:wt(w.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!S(n.parentNode,"optgroup"))){if(t=w(n).val(),s)return t;a.push(t)}return a}
vendor: 12,860 bytes, line 17
17,set:function(e,t){for(var n,i,r=e.options,o=w.makeArray(t),s=r.length;s--;)((i=r[s]).selected=w.inArray(w.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},p.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Mt=e.location,At={guid:Date.now()},Rt=/\?/;w.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return i=n&&n.getElementsByTagName("parsererror")[0],n&&!i||w.error("Invalid XML: "+(i?w.map(i.childNodes,function(e){return e.textContent}).join("\n"):t)),n};var Ct=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,r){var o,s,a,l,c,d,h,p,v=[i||g],y=u.call(t,"type")?t.type:t,_=u.call(t,"namespace")?t.namespace.split("."):[];if(s=p=a=i=i||g,3!==i.nodeType&&8!==i.nodeType&&!Ct.test(y+w.event.triggered)&&(y.indexOf(".")>-1&&(_=y.split("."),y=_.shift(),_.sort()),c=y.indexOf(":")<0&&"on"+y,(t=t[w.expando]?t:new w.Event(y,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=_.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),h=w.event.special[y]||{},r||!h.trigger||!1!==h.trigger.apply(i,n))){if(!r&&!h.noBubble&&!m(i)){for(l=h.delegateType||y,Ct.test(l+y)||(s=s.parentNode);s;s=s.parentNode)v.push(s),a=s;a===(i.ownerDocument||g)&&v.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=v[o++])&&!t.isPropagationStopped();)p=s,t.type=o>1?l:h.bindType||y,(d=(re.get(s,"events")||Object.create(null))[t.type]&&re.get(s,"handle"))&&d.apply(s,n),(d=c&&s[c])&&d.apply&&ne(s)&&(t.result=d.apply(s,n),!1===t.result&&t.preventDefault());return t.type=y,r||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(v.pop(),n)||!ne(i)||c&&f(i[y])&&!m(i)&&((a=i[c])&&(i[c]=null),w.event.triggered=y,t.isPropagationStopped()&&p.addEventListener(y,Lt),i[y](),t.isPropagationStopped()&&p.removeEventListener(y,Lt),w.event.triggered=void 0,a&&(i[c]=a)),t.result}},simulate:function(e,t,n){var i=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(i,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}});var Pt=/\[\]$/,It=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,i){var r;if(Array.isArray(t))w.each(t,function(t,r){n||Pt.test(e)?i(e,r):Ot(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==_(t))i(e,t);else for(r in t)Ot(e+"["+r+"]",t[r],n,i)}w.param=function(e,t){var n,i=[],r=function(e,t){var n=f(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){r(this.name,this.value)});else for(n in e)Ot(n,e[n],t,r);return i.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Dt.test(this.nodeName)&&!kt.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(It,"\r\n")}}):{name:t.name,value:n.replace(It,"\r\n")}}).get()}});var Nt=/%20/g,Ft=/#.*$/,Ut=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,zt=/^\/\//,Gt={},Vt={},Wt="*/".concat("*"),jt=g.createElement("a");function qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(W)||[];if(f(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Xt(e,t,n,i){var r={},o=e===Vt;function s(a){var l;return r[a]=!0,w.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)}),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function $t(e,t){var n,i,r=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&w.extend(!0,e,i),e}jt.href=Mt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Mt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Mt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,w.ajaxSettings),t):$t(w.ajaxSettings,e)},ajaxPrefilter:qt(Gt),ajaxTransport:qt(Vt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,r,o,s,a,l,c,u,d,h,p=w.ajaxSetup({},n),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?w(f):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),_=p.statusCode||{},x={},b={},T="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Bt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)S.always(e[S.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),E(0,t),this}};if(v.promise(S),p.url=((t||p.url||Mt.href)+"").replace(zt,Mt.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(W)||[""],null==p.crossDomain){l=g.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=jt.protocol+"//"+jt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=w.param(p.data,p.traditional)),Xt(Gt,p,n,S),c)return S;for(d in(u=w.event&&p.global)&&0===w.active++&&w.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ht.test(p.type),r=p.url.replace(Ft,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Nt,"+")):(h=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(Rt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Ut,"$1"),h=(Rt.test(r)?"&":"?")+"_="+At.guid+++h),p.url=r+h),p.ifModified&&(w.lastModified[r]&&S.setRequestHeader("If-Modified-Since",w.lastModified[r]),w.etag[r]&&S.setRequestHeader("If-None-Match",w.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Wt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,S,p)||c))return S.abort();if(T="abort",y.add(p.complete),S.done(p.success),S.fail(p.error),i=Xt(Vt,p,n,S)){if(S.readyState=1,u&&m.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(a=e.setTimeout(function(){S.abort("timeout")},p.timeout));try{c=!1,i.send(x,E)}catch(e){if(c)throw e;E(-1,e)}}else E(-1,"No Transport");function E(t,n,s,l){var d,h,g,x,b,T=n;c||(c=!0,a&&e.clearTimeout(a),i=void 0,o=l||"",S.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(x=function(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,S,s)),!d&&w.inArray("script",p.dataTypes)>-1&&w.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),x=function(e,t,n,i){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,x,S,d),d?(p.ifModified&&((b=S.getResponseHeader("Last-Modified"))&&(w.lastModified[r]=b),(b=S.getResponseHeader("etag"))&&(w.etag[r]=b)),204===t||"HEAD"===p.type?T="nocontent":304===t?T="notmodified":(T=x.state,h=x.data,d=!(g=x.error))):(g=T,!t&&T||(T="error",t<0&&(t=0))),S.status=t,S.statusText=(n||T)+"",d?v.resolveWith(f,[h,T,S]):v.rejectWith(f,[S,T,g]),S.statusCode(_),_=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[S,p,d?h:g]),y.fireWith(f,[S,T]),u&&(m.trigger("ajaxComplete",[S,p]),--w.active||w.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,i,r){return f(n)&&(r=r||i,i=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:r,data:n,success:i},w.isPlainObject(e)&&e))}}),w.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(f(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return f(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=f(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Jt=w.ajaxSettings.xhr();p.cors=!!Jt&&"withCredentials"in Jt,p.ajax=Jt=!!Jt,w.ajaxTransport(function(t){var n,i;if(p.cors||Jt&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Yt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=w("<script>").attr(e.scriptAttrs||{}
17).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}});var Zt,Kt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||w.expando+"_"+At.guid++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,s,a=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=f(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Qt,"$1"+r):!1!==t.jsonp&&(t.url+=(Rt.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||w.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},i.always(function(){void 0===o?w(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Kt.push(r)),s&&f(o)&&o(s[0]),s=o=void 0}),"script"}),p.createHTMLDocument=((Zt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Zt.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(p.createHTMLDocument?((i=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(i)):t=g),o=!n&&[],(r=F.exec(e))?[t.createElement(r[1])]:(r=Ce([e],t,o),o&&o.length&&w(o).remove(),w.merge([],r.childNodes)));var i,r,o},w.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return a>-1&&(i=wt(e.slice(a)),e=e.slice(0,a)),f(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&w.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(i?w("<div>").append(w.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=w.css(e,"position"),u=w(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=w.css(e,"top"),l=w.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(s=(i=u.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),f(t)&&(t=t.call(e,n,w.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):u.css(d)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===w.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),r.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-w.css(i,"marginTop",!0),left:t.left-r.left-w.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||he})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(i){return Z(this,function(e,i,r){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r},e,i,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=Ze(p.pixelPosition,function(e,n){if(n)return n=Je(e,t),je.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){w.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return Z(this,function(t,n,r){var o;return m(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?w.css(t,n,a):w.style(t,n,r,a)},t,s?r:void 0,s)}})}),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;w.proxy=function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),f(e))return i=r.call(arguments,2),o=function(){return e.apply(t||this,i.concat(r.call(arguments)))},o.guid=e.guid=e.guid||w.guid++,o},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=S,w.isFunction=f,w.isWindow=m,w.camelCase=te,w.type=_,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},w.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var tn=e.jQuery,nn=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=nn),t&&e.jQuery===w&&(e.jQuery=tn),w},void 0===t&&(e.jQuery=e.$=w),w}),define("radical/component/UAjammer",[],function(){"use strict";var e,t,n,i,r,o,s,a,l,c,u,d=(o=window,s={},void 0===(a=void 0===o._uajArgs?{}:o._uajArgs).immediately||a.immediately,l=void 0===a.addClasses||a.addClasses,c=a.nameSpace||"_ua",u=["Edge/","Firefox/","Chrome/","Safari/","Opera/","MSIE "],s.Raw=navigator.userAgent,s.ClassString="",s.OS="other",s.OSv="",s.Device="pc",s.Venue="desktop",s.Mobile=!1,s.Touch=!!("ontouchstart"in o)||!!("onmsgesturechange"in o),s.Pixels=o.devicePixelRatio&&o.devicePixelRatio>=2?2:1,s.Browser={Name:"",Version:"",VersionFull:""},s.Classes=[],s.isLt=function(e){return e.toString().indexOf(".")>0?s.Browser.VersionFull<e:s.Browser.Version<e},s.isLte=function(e){return e.toString().indexOf(".")>0?s.Browser.VersionFull<=e:s.Browser.Version<=e},s.isGt=function(e){return e.toString().indexOf(".")>0?s.Browser.VersionFull>e:s.Browser.Version>e},s.isGte=function(e){return e.toString().indexOf(".")>0?s.Browser.VersionFull>=e:s.Browser.Version>=e},s.init=function(){return console.log("_UAjammer.init()"),e(),t(),n(),s.Classes.push("device_"+s.Device),s.Classes.push("venue_"+s.Venue),s.Classes.push("browser_"+s.Browser.Name),s.Classes.push("browser_"+s.Browser.Name+"_"+s.Browser.Version),s.Classes.push(s.Mobile?"mobile":"not_mobile"),s.Raw.match(/webkit/i)&&s.Classes.push("webkit"),s.Classes.push("os_"+s.OS),s.Classes.push("os_"+s.OS+"_"+s.OSv),s.Classes.push("pixels_"+s.Pixels),s.ClassString=c+"_"+s.Classes.join(" "+c+"_"),l&&i(),s},e=function(){for(var e=!1,t=0;t<u.length;t++){var n,i,r,o,a=u[t];if(-1!=s.Raw.indexOf(a)){e=!0,n=a.length,i=-1!=s.Raw.indexOf("Version")?s.Raw.indexOf("Version")+7:s.Raw.indexOf(a)+n,r=s.Raw.length-i,o=(o=-1!=(o=s.Raw.substr(i,r)).indexOf(" ")?o.substr(0,o.indexOf(" ")):o).replace(/[^0-9\.]/,""),s.Browser.Name=a.substr(0,n-1).toLowerCase(),s.Browser.Version=parseInt(o),s.Browser.VersionFull=parseFloat(o);break}}e||-1==s.Raw.indexOf("Trident/")||(s.Browser.Name="msie",s.Browser.Version=10,s.Browser.VersionFull=10)},t=function(){switch(!0){case s.Raw.match(/iPhone/i)&&s.Raw.match(/iPhone/i).length>0:s.Device="iphone",s.Venue="phone",s.Mobile=!0;break;case s.Raw.match(/iPad/i)&&s.Raw.match(/iPad/i).length>0:s.Device="ipad",s.Venue="tablet",s.Mobile=!0;break;case s.Raw.match(/android/i)&&s.Raw.match(/android/i).length>0&&s.Raw.match(/mobile/i)&&s.Raw.match(/mobile/i).length>0:s.Device="android",s.Venue="phone",s.Mobile=!0;break;case s.Raw.match(/android/i)&&s.Raw.match(/android/i).length>0:s.Device="android",s.Venue="tablet",s.Mobile=!1;break;case s.Raw.match(/avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)&&s.Raw.match(/avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i).length>0:s.Device="other_mobile",s.Venue="phone",s.Mobile=!0}},n=function(){var e,t;switch(!0){case s.Raw.match(/macintosh/i)&&s.Raw.match(/macintosh/i).length>0:s.OS="OSX",e=s.Raw.indexOf("OS X")+5,t=s.Raw.indexOf(" ",e)-e,s.OSv=s.Raw.substr(e,t).replace(/[^0-9\.\_]/,"").replace(/\_/g,".");break;case s.Raw.match(/windows/i)&&s.Raw.match(/windows/i).length>0:s.OS="windows",e=s.Raw.indexOf(s.Raw.match(/windows/i))+8,t=s.Raw.indexOf(";",e)-e,s.OSv=s.Raw.substr(e,t).replace(/\_/g,".");break;case s.Raw.match(/linux/i)&&s.Raw.match(/linux/i).length>0:s.OS="linux";break;case s.Raw.match(/\sOS\s/)&&s.Raw.match(/\sOS\s/).length>0:s.OS="iOS",e=s.Raw.indexOf("OS")+3,t=s.Raw.indexOf(" ",e)-e,s.OSv=s.Raw.substr(e,t).replace(/\_/g,".")}},i=function(){document.documentElement?(clearTimeout(r),document.documentElement.className+=" "+s.ClassString):r=setTimeout(i,10)},s);return console.log("_UAjammer loaded"),d.init()}
17),define("_UAjammer",["radical/component/UAjammer"],function(e){return e}),function(e){if("function"!=typeof e.define){var t={ikelos:"ikelos",jquery:"jQuery",_UAjammer:"_UAjammer"},n=function(n,i,r){var o=[];if(i instanceof Array&&i.length>0)for(var s=0;s<i.length;s++){if(void 0===e[t[i[s]]])throw"Missing required global '"+i[s]+"' from module "+n;switch(i[s]){default:console.warn("Unknown global '"+i[s]+"' in module "+n+" - ignoring (ikelos AMD shim)");break;case"jquery":case"ikelos":case"_UAjammer":o.push(e[t[i[s]]])}}r.apply(null,o)};n.amd=!0,e.define=n}}(this),function(e){"use strict";define("ikelos",["jquery","_UAjammer"],function(t,n){if(e.ikelos)return e.ikelos;var i=document,r=t,o=0,s=["video","source","track"],a=[],l={autoplay:null,autobuffer:null,loop:null,muted:null,controls:null,event_namespace:"ikls_",guid_namespace:"ikls_",class_namespace:"ikls_",default_groupname:"ikls_default",default_group:!1,disabled_groups:["disabled"],pause_others:!1,clone_class:!0,clone_style:!0,enable_dash:!1,debug:!1,verbose:!1,poster:!0,interactive:!0,interface:!0},c={},u=["click","mouseover","mouseout","play","pause","loadstart","loadedmetadata","loadeddata","loadedalldata","canplay","canplaythrough","seeking","seeked","timeupdate","ended","durationchange","progress","volumechange","resize","error","loop","progress","ratechange","waiting","stalled","emptied","suspend"],d={spacebar:32,enter:13,esc:27,shift:16,arrow_up:38,arrow_right:39,arrow_down:40,arrow_left:37},h=function(){return d},p=function(){!0===l.debug&&console&&console.log&&console.log.apply(console,arguments)},f=function(){console&&console.log&&console.log.apply(console,arguments)},m=function(){console&&console.warn&&console.warn.apply(console,arguments)}
17,g=function(e,t){!0===l.verbose&&p("Ikls."+e+"()",t||"no arguments")},v={canHas:"localStorage"in window&&null!==window.localStorage,setItem:function(e,t){return this.canHas?window.localStorage.setItem(e,t):null},getItem:function(e){return this.canHas?window.localStorage.getItem(e):null},removeItem:function(e){return this.canHas?window.localStorage.removeItem(e):null}},y=function(e){return null===e},_=function(e){return!function(e){return void 0===e}(e)&&!y(e)},x=function(e){return e&&"[object Array]"===Object.prototype.toString.call(e)},b=function(e,t){if(!x(t))return m("array expected to inArray, got "+typeof t),!1;for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},w=function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},T=function(e){return e&&"[object Function]"==={}.toString.call(e)},S=function(e,t){return E(e,t)&&T(e[t])},E=function(e,t){return w(e)&&e.hasOwnProperty(t)},M=function(e){return!isNaN(e)},A=function(e){return"string"==typeof e},R=function(e){return"boolean"==typeof e},C=function(e){return P(e)||I(e)},L=function(e){return e instanceof jQuery},P=function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},I=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},k=function(e){var t=[];for(var n in e)t.push(n);return t},D=function(e){if(!w(e))return"";var t,n=[];for(t in e)n.push(t+"="+encodeURIComponent(e[t]));return n.join("&")},O=function(e){return!_(e)||""===e},N=function(e,t){return _(t)||(t=1),(e+="").substring(0,t)},F=function(e,t){return _(t)||(t=1),(e+="").substring(e.length-t,e.length)},U=function(e,t){return r.extend(!0,t||{},e)},B=function(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n},H=function(e){for(var t in e)return t},z=function(e,t,n){var i,r=0,o=0,s=0,a="";return 0===e?(a="00:00","precise"===t&&(a+=".00"),"frames"===t&&n>0&&(a=0),a):"frames"===t?!isNaN(n)&&n>0?Math.floor(e*n):0:(r=e-3600*(i=e>=3600?Math.floor(e/3600):0)>=60?Math.floor((e-3600*i)/60):0,o=Math.abs(Math.floor(e-Math.floor(3600*i)-Math.floor(60*r))),s=(e-Math.floor(3600*i+60*r+o)).toFixed(2),"00"!=i&&(a+=i+":"),a+=(r=W(r))+":"+(o=W(o)),"precise"===t&&(a+="."+(s>0?s.split(".")[1]:0)),a)},G=function(e,t){return e*t/100},V=function(e,t){return e>0&&t>0?100*e/t:0},W=function(e){return(e+"").length<2?"0"+e:e},j=function(){g("canDash");var e=window.hasOwnProperty("dashjs"),t=window.hasOwnProperty("MediaSource"),n=T(MediaSource);return p("canDash?",e,t,n),e&&t&&n},q=n,X=function(){return{log:f,isSet:_,isEmpty:O,isArray:x,isObject:w,isFunction:T,isNumeric:M,isString:A,isBoolean:R,hasProperty:E,hasFunction:S,getKeys:k,objSize:B,objFirst:H,buildQuery:D,firstChars:N,lastChars:F,translateTime:z,percToSec:G,secToPerc:V,keyCodes:d,storage:v,getKeyCodes:h}},$=function(){var e=arguments;switch(e.length){case 0:return $("video");case 1:return $(e[0],{});case 2:if("option"==e[0])return l[e[1]];var t=r(e[0]),n=[],i=null;return r(t).each(function(t,o){r(o).data("ikelos")?(i=r(o).data("ikelos"),n.push(r(o).data("ikelos"))):(i=new Y(o,e[1]),n.push(i),r(o).data("ikelos",i))}),n.length>1?n:n[0];case 3:case 4:if("plugin"==e[0])c[e[1]]=e[2];else if("extend"==e[0])Y.prototype[e[1]]=e[2];else if("option"==e[0])"jquery"==e[1]?r=e[2]:l[e[1]]=e[2];else{if("call"==e[0]&&3==e.length)return $(e[0],e[1],e[2],!1);if("call"==e[0]&&4==e.length){var o,s=$(e[1]),a=x(e[3])?e[3]:null,u=[];if(x(s)){for(var d=0;d<s.length;d++)o=Y.prototype[e[2]].apply(s[d],a),u.push(o);return u}return s[e[2]].apply(s,a)}}}},Y=function(e,t){if(this.harvestAttributes=["width","height"],this.harvestProperties=["controls","loop","autoplay","autobuffer","muted"],this.harvestData=["plugins"],this.version="2.2.1",this.jQuery=r,this.ua=q,this.instanceOptions=U(l),this.plugins=null,this.disabledPlugins=[],this.emitterObject=null,this.htmlObject=null,this.selectedSourceGroup=!1,this.timers={},this.dom=r(e),!this.dom.is("video"))throw"Error: Selector provided does not resolve to a <video> tag.";return this.dom.attr("id")||this.dom.attr("id",(o++,l.guid_namespace+o)),this.id=this.dom.attr("id"),this.htmlObject=i.getElementById(this.dom.attr("id")),this.emitter(this.object()),this.parseConfig(),this.parseSource(),p("Initialize using native player for HTML5 video or DASH"),this.init(),this};Y.prototype.events=u,Y.prototype.instanceOptions=null,Y.prototype.timers=null,Y.prototype.plugins=null,Y.prototype.disabledPlugins=[],Y.prototype.emitterObject=null,Y.prototype.htmlOb
17ject=null,Y.prototype.sourceStack=null,Y.prototype.sourceMap=null,Y.prototype.sourceGroupsObject=null,Y.prototype.selectedSourceGroup=!1,Y.prototype.ua={},Y.prototype.init=function(){g("init");var e=this;for(var t in this.instanceOptions)t;var n="webkitbeginfullscreen webkitendfullscreen webkitfullscreenchange mozfullscreenchange fullscreenchange";r(this.object()).on(u.join(" "),function(t){e.handleEvent(t)}),r(this.object()).on(n,function(t){e.trigger(l.event_namespace+"fullscreenchange")}),r(document).on(n,function(t){e.trigger(l.event_namespace+"fullscreenchange")}),this.plugins={},this.initPlugins(),function(e){g("addPlayer : "+e.id),a.push(e)}(e),this.trigger(l.event_namespace+"init",{})},Y.prototype.cloneToObject=function(e,t){let n;g("cloneToObject");let i=["attributes","properties","data"],o={};if(o.attributes=E(t,"attributes")?t.attributes:this.harvestAttributes,o.properties=E(t,"properties")?t.properties:this.harvestProperties,o.data=E(t,"data")?t.data:this.harvestData,o.source=!E(t,"source")||t.source,A(e))n=r("<div>"+e+"</div>");else{if(!L(e)&&!C(e))throw"Critical Error: No source provided to cloneToObject() - this will never work. Refactor now.";n=r(e)}let s=n.find("video");console.log(s);for(let e in i){let n=i[e];if(E(t,"add_"+n)){if(!x(t["add_"+n]))throw"Wrong type for add_"+n+" - must be an array";o[n]=[...o[n],...t["add_"+n]],console.log("Merged",o)}}for(var a in console.log("After adding add_{xyz} properties to harvest rules"),console.log(o),o){var l=a,c=o[a],u=0;switch(p("Looping through options "+l,c),f("Looping through options "+a+" -> "+l,c),l){case"source":!0===c&&(p("source",c),_(s.attr("src"))&&(r(this.object()).attr("src",s.attr("src")),console.log("Setting src to "+s.attr("src"))),r(this.object()).find("source").remove(),s.find("source").appendTo(r(this.object())));break;case"harvest_attributes":for(A(c)&&(c=c.split(",")),p("harvest_attributes",c,c.length),u=0;u<c.length;u++){var d=c[u];p("Attr: Checking "+d),s.attr(d)&&(p("Attr: Got "+d+" - applying to object"),r(this.object()).attr(d,s.attr(d)))}break;case"harvest_properties":for(A(c)&&(c=c.split(",")),p("Prop: harvest_properties",c,c.length),u=0;u<c.length;u++){var h=c[u];p("Prop: Checking "+h),s.prop(h)?(p("Prop: Got "+h+" - applying to object"),r(this.object()).prop(h,s.prop(h))):(p("Prop: Template did not have "+h+" - removing from object"),r(this.object()).removeProp(h))}break;case"harvest_data":for(A(c)&&(c=c.split(",")),p("harvest_data",c,c.length),u=0;u<c.length;u++){var m=c[u];p("Checking "+m),s.data(m)&&(p("Got "+m+" - applying to object"),r(this.object()).data(m,s.data(m)))}}}},Y.prototype.parseConfig=function(e,t){p("parseConfig");let n,i=["attributes","properties","data"],o=U(l),s={};s.attributes=E(t,"attributes")?t.attributes:this.harvestAttributes,s.properties=E(t,"properties")?t.properties:this.harvestProperties,s.data=E(t,"data")?t.data:this.harvestData,console.log("We are going to do harvesting"),console.log(s);for(let e in i){let n=i[e];if(E(t,"add_"+n)){if(!x(t["add_"+n]))throw"Wrong type for add_"+n+" - must be an array";s[n]=[...s[n],...t["add_"+n]],console.log("Merged",s)}}console.log("After adding add_{xyz} properties to harvest rules"),console.log(s),n=A(e)?r("<div>"+e+"</div>"):L(e)||C(e)?r(e):r(this.object());let a=n.is("video")?n:n.find("video");for(var u in console.warn("THIS IS THE SOURCE VIDEO WE ARE HARVESTING FROM:"),console.log(a),s.attributes){let e=s.attributes[u];console.log("Attr",e),_(a.attr(e))&&(o[e]=a.attr(e))}for(var d in p("Harvested some attrs",o),s.properties){let e=s.properties[d];console.log("Prop",e),_(a.prop(e))&&(o[e]=a.prop(e))}for(var h in p("Harvested some props",o),s.data){let e=s.data[h];console.log("Data",e),_(a.data(e))&&(o[e]=a.data(e))}p("Harvested some data",o),_(o["data-plugins"])&&!O(o["data-plugins"])?(o.plugins=(o["data-plugins"]+"").split(","),console.log("data-plugins for PLUGINS - OVERRIDE!")):_(o["data-plugins"])&&O(o["data-plugins"])?(o.plugins=[],console.log("NO PLUGINS - INTENTIONALLY EMPTY")):_(o.plugins)&&!x(o.plugins)?(console.log("CSV IN PLUGINS"),o.plugins=(o.plugins+"").split(",")):_(o.plugins)&&x(o.plugins)?console.log("ALREADY IN PLUGINS ARRAY"):_(o.plugins)&&(console.log("DEFAULT TO ALL OF THE PLUGINS"),o.plugins=k(c)),o.plugins=function(e){return e.filter(function(e){return!O
17(e)})}(o.plugins),delete o["data-plugins"],this.instanceOptions=o,console.log("Instance Options!!!!!!!!!!!! >>!>!!>!>!><>!@>!@>!<>@<>!<@<>!<@<!><@ SERIOUSLY!"),console.log(this.instanceOptions)},Y.prototype.parseSource=function(e,t){var n;g("parseSource",e?"from string":"from object"),n=A(e)?r("<div>"+e+"</div>"):L(e)||C(e)?r(e):r(this.object());var o=T(i.createElement("video").canPlayType),s=!1,a=!1,c=n.find("source"),u=n.is("video")?n:n.find("video");p("Video: ",u),p("Sources: ",c),p("Options: ",l),this.sourceGroupsObject={},this.sourceStack=[],this.sourceMap={};for(var d=0;d<c.length;d++){p("Checking source #"+d,c,c.length);var h=c.get(d),f={src:h.src,type:h.type,group:r(h).data("group")||this.instanceOptions.default_groupname};r(h).attr("data-type",r(h).attr("type")).removeAttr("type"),y(f.group)||!b(f.group,this.instanceOptions.disabled_groups)?(o&&!1===s&&this.object().canPlayType(f.type)&&(s=!0),o&&!1===a&&"application/dash+xml"===f.type&&(a=!0),this.sourceStack.push(f),this.sourceMap[f.src]=f.type,null!==f.group&&(!1===this.selectedSourceGroup&&(this.selectedSourceGroup=f.group),_(this.sourceGroupsObject[f.group])||(this.sourceGroupsObject[f.group]=[]),this.sourceGroupsObject[f.group].push(f))):p("disabled group",f.group,"skipping!",f)}_(n.attr("src"))&&(_(this.sourceGroupsObject[l.default_groupname])||(this.sourceGroupsObject[l.default_groupname]=[]),this.sourceGroupsObject[l.default_groupname].push(n.attr("src"))),!1!==this.instanceOptions.default_group&&this.sourceGroupsObject.hasOwnProperty(this.instanceOptions.default_group)?(this.selectedSourceGroup=l.default_group,p("using default source group",this.selectedSourceGroup)):!1===this.instanceOptions.default_group||this.sourceGroupsObject.hasOwnProperty(this.instanceOptions.default_group)||m("default_group option is set but not found in <source> groups"),!1===this.selectedSourceGroup&&_(l.default_groupname)&&(this.selectedSourceGroup=l.default_groupname,this.sourceGroupsObject[l.default_groupname]=this.sourceStack),p("Attemping to load "+this.selectedSourceGroup),this.sourceGroups(this.selectedSourceGroup,t)},Y.prototype.isPlaying=function(){return g("isPlaying"),!1===this.object().paused&&!1===this.object().ended},Y.prototype.elements=function(){return g("elements"),r(this.htmlObject)},Y.prototype.object=function(){return g("object"),this.htmlObject},Y.prototype.options=function(){return g("options"),U(this.instanceOptions)},Y.prototype.emitter=function(e){if(g("emitter",e),!_(e))return this.emitterObject;this.emitterObject=r(e)},Y.prototype.plugin=function(e){return g("plugin getter",e),!!_(e)&&this.plugins[e]},Y.prototype.handleEvent=function(e){switch(g("handleEvent",e),e.type){default:break;case"click":case"mouseover":case"mouseout":if(!1===this.instanceOptions.interaction)return e.preventDefault(),!1}var t={element:this.dom.attr("id"),Ikls:this};this.trigger(l.event_namespace+e.type,t,e)},Y.prototype.trigger=function(e,t,n){g("trigger",[e,t,n]),_(t)||(t={}),_(n)&&(t.originalEvent=n);var i=r.Event(e,t);r(this.emitter()).trigger(i)},Y.prototype.play=function(){if(g("play"),!0===l.pause_others)for(var e=0;e<a.length;e++)a[e].pause();var t=this,n=this.object().src;if(this.canPlaySrc(n)){var i=this.object().play();void 0!==i&&i.then(function(){p("ikls:play:success")}).catch(function(e){p("ikls:play:error",e),t.handleEvent({type:"error",error:e,context:"play promise"})})}else t.handleEvent({type:"error",error:"unsupported source",src:n,context:"play"})},Y.prototype.pause=function(){g("pause"),this.object().pause()},Y.prototype.load=function(e){g("load"),e=void 0!==e&&e;var t=this,n=this.object().src;if(e||this.canPlaySrc(n)){var i=this.object().load();void 0!==i&&i.then(function(){}).catch(function(n){e||(p("ikls:load:error",n),t.handleEvent({type:"error",error:n,context:"load promise"}))})}else t.handleEvent({type:"error",error:"unsupported source",src:n,context:"load"})},Y.prototype.unload=function(){g("unload"),this.dashPlayer&&this.dashPlayer.reset(),this.object().pause(),this.object().src="",this.object().removeAttribute("src"),this.load(!0)},Y.prototype.loop=function(e){if(g("loop",e),!0===e)this.object().setAttribute("loop",1);else{if(!1!==e)return!0;this.object().removeAttribute("loop")}},Y.prototype.controls=function(e){if(g("controls",e),!0===e)this.object().setAttribute("controls",1);else{if(!1!==e)return!0;this.object().removeAttribute("controls")}},Y.prototype.toggleInterface=function(e){if(g("toggleInterface",e),!0!==e&&!1!==e)return this.instanceOptions.interface;for(var t in this.instanceOptions.interface=e,this.plugins)this.plugins[t].hasOwnProperty("toggleInterface")&&this.plugins[t].toggleInterface(e)},Y.prototype.toggleInteractive=function(e){if(g("toggleInteractive",e),!0!==e&&!1!==e)return this.instanceOptions.interactive;for(var t in this.instanceOptions.interactive=e,this.plugins)this.plugins[t].hasOwnProperty("toggleInteractive")&&this.plugins[t].toggleInteractive(e)},Y.prototype.hasPlugin=function(e){return g("hasPlugin",e),_(this.plugins[e])&&w(this.plugins[e])},Y.prototype.getPlugin=function(e){return g("getPlugin",e),this.plugins[e]},Y.prototype.disablePlugin=function(e){g("disablePlugin",e),this.hasPlugin(e)&&(this.getPlugin(e).destroy(),delete this.plugins[e]),this.disabledPlugins.push(e),this.disabledPlugins=this.disabledPlugins.filter(function(e,t,n){return t==n.indexOf(e)})},Y.prototype.enablePlugin=function(e){var t,n;g("enablePlugin",e),b(e,this.disabledPlugins)&&(this.disabledPlugins=(t=this.disabledPlugins,n=e,t.filter(function(e){return e!==n}))),b(this.instanceOptions.plugins,e)||this.instanceOptions.plugins.push(e)},Y.prototype.initPlugins=function(){g("initPlugins");for(let e in this.instanceOptions.plugins){if(b(e,this.disabledPlugins))continue;let t=this.instanceOptions.plugins[e];this.plugins[t]=new c[this.instanceOptions.plugins[e]](this,U(this.instanceOptions))}for(let e in this.plugins){console.log(e,this.plugins);this.plugins[e];if(!S(this.plugins[e],"init"))throw"Error: Plugin "+e+" is missing public .init() method!";this.plugins[e].init(),S(this.plugins[e],"toggleInterface")&&this.plugins[e].toggleInterface(this.instanceOptions.interface),S(this.plugins[e],"toggleInteractive")&&this.plugins[e].toggleInteractive(this.instanceOptions.interactive)}},Y.prototype.destroyPlugins=function(){g("destroyPlugins"),console.log(this.plugins);for(let e in this.plugins)this.hasPlugin(e)?(console.log("destroyPlugins() -> destroying plugin "+e),this.getPlugin(e).destroy(),delete this.plugins[e]):console.warn("destroyPlugins() -> can't get plugin? "+e)},Y.prototype.getPlugins=function(){return g("getPlugins"),this.plugins},Y.prototype.currentTime=function(e,t){if(g("currentTime",[e,t]),!_(e))return this.object().currentTime;var n=this;this.duration()>e?(this.object().currentTime=e,!0===t&&this.object().play()):(O(this.timers.forceplay)||clearTimeout(this.timers.forceplay),this.timers.forceplay=setTimeout(function(){n.currentTime(e,t)},100))},Y.prototype.duration=function(){return g("duration"),this.object().duration||0},Y.prototype.buffered=function(){g("buffered");var e=0;return this.object()&&this.object().buffered&&this.object().buffered.length>0&&this.object().buffered.end&&this.object().duration?e=this.object().buffered.end(0)/this.object().duration:this.object()&&void 0!==this.object().bytesTotal&&this.object().bytesTotal>0&&void 0!==this.object().bufferedBytes&&(e=this.object().bufferedBytes/this.object().bytesTotal),e},Y.prototype.bufferedPercent=function(){g("bufferedPercent");var e=this.buffered();return null!==e&&(e=100*Math.min(1,Math.max(0,e))),e},Y.prototype.canPlaySrc=function(e){var t=void 0!==e?e:this.object().src,n=this.sourceMap[t],i=t.length>0,r="function"==typeof this.object().canPlayType?this.object().canPlayType(n):"";return i&&r.length>0},Y.prototype.src=function(e){if(g("src",e),!e)return this.object().src;this.object().src=e},Y.prototype.source=function(e){return g("source",e),_(e)?this.src(e):this.sourceStack},Y.prototype.setStartTime=function(e){m("setStartTime is not implemented")},Y.prototype.getNativeTime=function(){return m("getNativeTime is not implemented"),0},Y.prototype.getNativeDuration=function(){return m("getNativeDuration is not implemented"),0},Y.prototype.sources=function(e){if(g("sources",e),!_(e))return this.sourceStack;m("Ikls.sources(sources) setting not implemented!")},Y.prototype.sourceGroups=function(e,t){if(g("sourceGroups",e),!_(e))return this.sourceGroupsObject;var n;if(t=t||{},A(e)){if(p(e),p(this.sourceStack),p(this.sourceGroupsObject),!this.sourceGroupsObject.hasOwnProperty(e)){var i=k(this.sourceGroupsObject)[0];m("Tried to load set "+e+" which was not available in our sourceGroups --- defaulting to "+i),e=i}var r=this.sourceGroupsObject[e],o=this.currentTime(),s=this.isPlaying(),a=this,l=!1,c=!1;for(n=0;n<r.length;n++){if(!0===this.instanceOptions.enable_dash&&j()&&"application/d
17ash+xml"===r[n].type){this.sourceGroups();this.dashPlayer=dashjs.MediaPlayer().create();try{this.dashPlayer.initialize(this.object(),r[n].src,!1)}catch(e){m("Couldn't initialize dashPlayer with "+r[n].src)}l=!0,c=!0;break}if(this.object().canPlayType(r[n].type)){this.dashPlayer&&(p("dashjs.reset due to change to native player"),this.dashPlayer.reset()),p("Setting src",r[n].src),this.src(r[n].src),c=!0,l=!0;break}}c||p("Unable to find source in sourceGroups processing"),!0!==l||t.restart||(p("Changed source group, seeking to ",o,s),setTimeout(function(){a.currentTime(o,s)},10))}else w(e)&&p("Add a whole group (?)")},Y.prototype.sourceGroupNames=function(){return g("sourceGroupNames"),k(this.sourceGroups())},Y.prototype.volume=function(e){if(g("volume",e),!_(e))return this.object().volume;0===e&&0!==this.object().volume||0!==e&&this.object().volume,this.object().volume=e},Y.prototype.width=function(e,t){if(g("width",[e,t]),!_(e))return r(this.object()).attr("width");this.object().width=e,!1!==t&&this.trigger(l.event_namespace+"resize",{dimension:"width"})},Y.prototype.height=function(e,t){if(g("height",[e,t]),!_(e))return r(this.object()).attr("height");this.object().height=e,!1!==t&&this.trigger(l.event_namespace+"resize",{dimension:"height"})},Y.prototype.videoWidth=function(){return g("videoWidth"),this.object().videoWidth||!1},Y.prototype.videoHeight=function(){return g("videoHeight"),this.object().videoHeight||!1},Y.prototype.size=function(e,t){if(!_(e)&&!_(t))return{width:this.width(),height:this.height()};this.width(e,!1),this.height(t,!1),this.trigger(l.event_namespace+"resize",{dimension:"both"})},Y.prototype.toggleFullScreen=function(e){this.inFullScreen()?this.cancelFullScreen():this.requestFullScreen(e)},Y.prototype.inFullScreen=function(){return i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement||this.object().webkitDisplayingFullscreen},Y.prototype.requestFullScreen=function(e){var t=_(e)?r(e).get(0):this.object();t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.ALLOW_KEYBOARD_INPUT?t.webkitRequestFullscreen(t.ALLOW_KEYBOARD_INPUT):t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.webkitEnterFullscreen?t.webkitEnterFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},Y.prototype.cancelFullScreen=function(){i.cancelFullScreen?i.cancelFullScreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitCancelFullScreen?i.webkitCancelFullScreen():i.msExitFullscreen&&i.msExitFullscreen()},Y.prototype.hasFullScreenSupport=function(){return!!(i.fullscreenEnabled||i.webkitFullscreenEnabled||i.mozFullScreenEnabled||i.msFullscreenEnabled||this.object().webkitSupportsFullscreen)},Y.prototype.on=function(e,t){return r(this.emitter()).on(e,t),this},Y.prototype.off=function(e){return r(this.emitter()).off(e),this},Y.prototype.getHelpers=function(){return X()},Y.prototype.destroy=function(){for(var e in this.unload(),this.plugins)w(this.plugins[e])&&this.plugins[e].hasOwnProperty("destroy")&&T(this.plugins[e].destroy)&&this.plugins[e].destroy(),delete this.plugins[e];r(this.object()).data("ikelos",null),function(e){g("removePlayerByID : "+e);for(var t=[],n=0;n<a.length;n++)p("try to remove player",a),a[n].id==e?delete a[n]:t.push(a[n]);p("removed player",a=t)}(this.id)};for(var J=0;J<s.length;J++)i.createElement(s[J]);return $.helpers=X(),e.ikelos=$,e.ikelos})}(this),define("audia",[],function(){return function(){var e,t=null;"function"==typeof AudioContext?t=new AudioContext:"function"==typeof webkitAudioContext&&(t=new webkitAudioContext);var n,i=Boolean(t),r=0,o={},s=function(e){var t=++r;return o[t]=e,t},a=function(e,t,n){return Math.min(Math.max(Number(e),t),n)};if(i){var l={},c=function(e,n){var i=function(t){t.duration!==e._duration&&(e._duration=t.duration,e.dispatchEvent("durationchange")),e.dispatchEvent("canplay"),e.dispatchEvent("canplaythrough"),e.dispatchEvent("load"),e._autoplay&&e.play()};if(n in l)i(l[n]);else{var r=new XMLHttpRequest;r.open("GET",n,!0),r.responseType="arraybuffer",r.onload=function(){t.decodeAudioData(r.response,function(e){l[n]=e,i(e)})},r.send()}},u=function(e){e.bufferSource=t.createBufferSource(),e.bufferSource.buffer=l[e.src],e.bufferSource.connect(e.gainNode),e.bufferSource.loop=e._loop},d=t.createGain();d.gain.value=1,d.connect(t.destination),(e=function(e){this.id=s(this),this._listenerId=0,this._listeners={},this._autoplay=!1,this._buffered=[],this._currentSrc="",this._currentTime=0,this._defaultPlaybackRate=1,this._duration=NaN,this._loop=!1,this._muted=!1,this._paused=!0,this._playbackRate=1,this._played=[],this._preload="auto",this._seekable=[],this._seeking=!1,this._src="",this._volume=1,this.gainNode=t.createGain(),this.gainNode.gain.value=this._volume,this.gainNode.connect(d),void 0!==e&&(this.src=e)}).prototype.load=function(){this._src&&c(this,this._src)},e.prototype.play=function(){this._paused=!1,u(this),this.bufferSource.start?this.bufferSource.start(0):this.bufferSource.noteOn(0)},e.prototype.pause=function(){this._paused||(this._paused=!0,this.bufferSource.stop?this.bufferSource.stop(0):this.bufferSource.noteOff(0))},e.prototype.stop=function(){this._paused||(this.pause(),this.currentTime=0)},e.prototype.addEventListener=function(e,t){this._listeners[++this._listenerKey]={eventName:e,callback:t}},e.prototype.dispatchEvent=function(e,t){for(var n in this._listeners){var i=this._listeners[n];i.eventName==e&&i.callback&&i.callback.apply(i.callback,t)}},e.prototype.removeEventListener=function(e,t){var n=null;for(var i in this._listeners){var r=this._listeners[i];if(r.eventName===e&&r.callback===t){n=i;break}}null!==n&&delete this._listeners[n]},Object.defineProperty(e.prototype,"autoplay",{get:function(){return this._autoplay}
17,set:function(e){this._autoplay=e}}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._buffered}}),Object.defineProperty(e.prototype,"currentSrc",{get:function(){return this._currentSrc}}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._currentTime},set:function(e){this._currentTime=e}}),Object.defineProperty(e.prototype,"defaultPlaybackRate",{get:function(){return Number(this._defaultPlaybackRate)},set:function(e){this._defaultPlaybackRate=e}}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration}}),Object.defineProperty(e.prototype,"loop",{get:function(){return this._loop},set:function(e){this._loop!==e&&(this._loop=e,this.bufferSource&&(this._paused?(u(this),this.bufferSource.loop=e):(this.pause(),u(this),this.bufferSource.loop=e,this.play())))}}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._muted},set:function(e){this._muted=e,this.gainNode.gain.value=e?0:this._volume}}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused}}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(e){this._playbackRate=e}}),Object.defineProperty(e.prototype,"played",{get:function(){return this._played}}),Object.defineProperty(e.prototype,"preload",{get:function(){return this._preload},set:function(e){this._preload=e}}),Object.defineProperty(e.prototype,"seekable",{get:function(){return this._seekable}}),Object.defineProperty(e.prototype,"seeking",{get:function(){return this._seeking}}),Object.defineProperty(e.prototype,"src",{get:function(){return this._src},set:function(e){this._src=e,c(this,e)}}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._volume},set:function(t){e.preventErrors||a(t,0,1),t<0&&(t=0),this._volume=t,this._muted||(this.gainNode.gain.value=t,this.dispatchEvent("volumechange"))}})}else(e=function(e){this.id=s(this),this._audioNode=new Audio,void 0!==e&&(this.src=e)}).prototype.load=function(e){this._audioNode.load()},e.prototype.play=function(e){void 0!==e&&(this._audioNode.currentTime=e),this._audioNode.play()},e.prototype.pause=function(){this._audioNode.pause()},e.prototype.stop=function(){this._audioNode.pause(),this._audioNode.currentTime=0},e.prototype.addEventListener=function(e,t,n){this._audioNode.addEventListener(e,t,n)},e.prototype.removeEventListener=function(e,t,n){this._audioNode.removeEventListener(e,t,n)},Object.defineProperty(e.prototype,"autoplay",{get:function(){return this._audioNode.autoplay},set:function(e){this._audioNode.autoplay=e}}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._audioNode.buffered}}),Object.defineProperty(e.prototype,"currentSrc",{get:function(){return this._audioNode.src}}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._audioNode.currentTime},set:function(e){this._audioNode.currentTime=e}}),Object.defineProperty(e.prototype,"defaultPlaybackRate",{get:function(){return this._audioNode.defaultPlaybackRate},set:function(e){this._audioNode.defaultPlaybackRate=e}}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._audioNode.duration}}),Object.defineProperty(e.prototype,"loop",{get:function(){return this._audioNode.loop},set:function(e){this._audioNode.currentTime>=this._audioNode.duration&&(this._audioNode.currentTime=0),this._audioNode.loop=e}}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._audioNode.muted},set:function(e){this._audioNode.muted=e}}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._audioNode.paused}}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._audioNode.playbackRate},set:function(e){this._audioNode.playbackRate=e}}),Object.defineProperty(e.prototype,"played",{get:function(){return this._audioNode.played}}),Object.defineProperty(e.prototype,"preload",{get:function(){return this._audioNode.preload},set:function(e){this._audioNode.preload=e}}),Object.defineProperty(e.prototype,"seekable",{get:function(){return this._audioNode.seekable}}),Object.defineProperty(e.prototype,"seeking",{get:function(){return this._audioNode.seeking}}),Object.defineProperty(e.prototype,"src",{get:function(){return this._audioNode.src},set:function(e){this._audioNode.src=e}}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._audioNode.volume},set:function(t){if(e.preventErrors)t=a(t,0,1);this._audioNode.volume=t}});e.preventErrors=!0,Object.defineProperty(e,"hasWebAudio",{get:function(){return i}}),Object.defineProperty(e,"audioContext",{get:function(){return t}}),Object.defineProperty(e,"gainNode",{get:function(){return d}}),Object.defineProperty(e,"version",{get:function(){return"0.3.0"}}),e.canPlayType=function(e){void 0===n&&(n=new Audio);e=(null===e.match("/")?"audio/":"")+e;return n.canPlayType(e)},e.prototype.canPlayType=function(t){return e.canPlayType(t)};for(var h=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange"],p=0,f=h.length;p<f;++p)(function(t){var n="_on"+t;e.prototype[n]=null,Object.defineProperty(e.prototype,"on"+t,{get:function(){return this[n]},set:function(e){this[n]&&this.removeEventListener(t,this[n],!1),"function"==typeof e?(this[n]=e,this.addEventListener(t,e,!1)):this[n]=null}})})(h[p]);return new e(...arguments)}}),define("radical/component/global",[],function(){var e={init:(new Date).getTime(),updated:(new Date).getTime(),data:{},getItem:function(e){return this.isset(e)?this.data[e]:null},setItem:function(e,t){this.updated=(new Date).getTime(),this.data[e]=t},isset:function(e){return this.data.hasOwnProperty(e)}};return e.set=e.setItem,e.get=e.getItem,e}),define("radical/component/console",["radical/component/global"],function(e){var t=!1,n=!1,i=(new Date).getTime();function r(t){if(!0!==t&&!1!==t)throw"Wrong type for logger.setDebug (expected boolean)";e.set("debug",t)}function o(e){if(!0!==e&&!1!==e)throw"Wrong type for logger.setTimestamps (expected boolean)";n=e}return t||(t=function s(a){if(!a&&t)return t;a=a||!1;var l={log:[],warn:[],error:[]},c=!1;function u(){return!c&&!1!==e.get("debug")&&!navigator.userAgent.match("MSIE")&&console}function d(e){if(!a&&!n)return e;var t=Array.prototype.slice.call(e);
17if(a&&t.unshift(a),n){var r=(new Date).getTime();t.unshift(r-i),t.unshift(r),i=r}return t}function h(){var e=d(arguments);if(!u()||"function"!=typeof console.warn)return!1;console.warn.apply(console,e),l.warn.length>0&&p(l.warn,e)}function p(e,t){for(var n=0;n<e.length;n++)e[n].callback.apply(e[n].scope,t)}return{on:function(e,t,n){return"function"!=typeof t?(h("Bad callback definition for "+e+" - skipping"),!1):"log"!==e&&"warn"!==e&&"error"!==e?(h("Log event "+e+" - not supported"),!1):void l[e].push({callback:t,scope:n||null})},log:function(){var e=d(arguments);if(!u()||"function"!=typeof console.log)return!1;console.log.apply(console,e),l.log.length>0&&p(l.log,e)},warn:h,error:function(){var e=d(arguments);if(!u()||"function"!=typeof console.error)return!1;console.error.apply(console,e),l.error.length>0&&p(l.error,e)},setDebug:r,setTimestamps:o,disable:function(){c=!0},enable:function(){c=!1},getLogger:s}}()),t}),define("radical/component/mutation",["jquery","radical/component/console"],function(e,t){t=t.getLogger("radical/component/mutation");var n=!1;function i(e){return null!=e&&e.length>0}return function(r,o){function s(e,n){if(!u.hasOwnProperty(e))throw'on() -- Unknown callback type "'+e+'" supplied.';t.log("on() -- registering callback "+e),u[e].push(n)}function a(e,t,n){for(var i=0;i<u[e].length;i++)"function"==typeof u[e][i]&&u[e][i](t,n)}function l(e,i,r){o.events&&(n||(t.log("registerEvents() - first call, registering events in $.event"),n=!0),c.trigger(e,r))}o=o||{};var c=e(r),u={mutation:[],added:[],removed:[]},d={targetNode:c[0],listen:function(){t.log("listen() - observe node"),h.observe(d.targetNode,p)},on:s,kill:function(){t.log("kill() - disconnect observer"),h.disconnect()}},h=new MutationObserver(function(t){t.forEach(function(t){var n=t.addedNodes,r=t.removedNodes;if(l("mutation"),a("mutation",t),i(n)){var o=e(n);l("newMutants",0,t),a("added",o,t)}if(i(r)){var s=e(r);l("lessMutants",0,t),a("removed",s,t)}})}),p={childList:!0,subtree:!0,characterData:!0};for(var f in u)o.hasOwnProperty(u["on"+f])&&s(f,u["on"+f]);return void 0!==o.defer&&!0===o.defer||d.listen(),d}}),define("radical/component/module/registry",["jquery","radical/component/console","radical/component/global","radical/component/mutation"],function(e,t,n,i){(t=t.getLogger("radical/component/registry")).log("We are getting loaded!");var r={},o={},s=!1,a=!1,l=(new Date).getTime(),c=!1,u="M"+(new Date).getTime(),d=0;function h(n,i,s,a){r.hasOwnProperty(n)||(r[n]={}),["_guid","_type","_config","_element"].forEach(function(e){if(i.hasOwnProperty(e))throw"Module "+n+" using reserved property "+e+" (registry::addModuleToRegistry)"}),i._guid=(d++,u+d),i._type=n,i._config=a,i._element=s,i.hasOwnProperty("destroy")&&"function"==typeof i.destroy&&(i._destroy=i.destroy),e(s).attr("data-module-guid",i._guid),i.destroy=function(){t.log("registry unloading / module::destroy() "+this._type+" @ "+this._guid),i.hasOwnProperty("destroy")&&"function"==typeof i.destroy&&i._destroy(),function(e){var t=p(e);t&&(delete o[e],delete r[t._type][e])}(i._guid),e(i._element).removeData("module-guid")},r[n][i._guid]=i,o[i._guid]=i}function p(e){return o.hasOwnProperty(e)?o[e]:null}function f(n){s=!0,e(n||".radical_module, .rmod").each(function(){if(!0!==e(this).data("module-initialized")&&!0!==e(this).data("module-init-failed")){var n=e(this).data(),i=n.config||{};if("object"!=typeof i&&t.warn('Config format may be malformed JSON! Expected object, resolved to "'+typeof i+'"'),!i.type&&i.main)i.type=i.main;else if(!i.type&&n.main)i.type=n.main;else if(!i.type)return t.warn("Misconfigured module!",this,n,i),e(this).data("module-init-failed",!0),!1;if(i.hasOwnProperty("disabled")&&!0===i.disabled)return t.warn("Module is disabled and will not init.",i,i.disabled),e(this).data("module-init-failed",!0),!1;var r=require("radical/module/"+i.type);if("function"!=typeof r)return e(this).data("module-init-failed",!0),t.warn("Module definition of "+i.type+" does not return a constructor function!"),!1;var o=r(this,i);h(i.type,o,this,i),e(this).data("module-initialized",!0).removeClass("radical_module").removeClass("rmod")}}),s=!1}function m(e,t){var n=(new Date).getTime();!s&&n-l>250?(f(),l=(new Date).getTime()):(!function(){try{clearTimeout(a)}catch(e){}a=!1}(),a=setTimeout(m,250))}function g(t,n){e(t).each(function(){var t=p(e(this).attr("data-module-guid"));t&&t.hasOwnProperty("destroy")&&"function"==typeof t.destroy&&t.destroy()})}return{init:function(n){if("boolean"!=typeof n&&"object"!=typeof n)throw"registry.init called with invali
17d parameters";return"boolean"==typeof n&&(n={live:n}),n.quiet||(n.quiet=!1),n.events||(n.events=!1),n.live||(n.live=!1),n.quiet&&t.disable(),f(),n.live&&((c=i(e("body"),{defer:!0,events:n.events})).on("added",m),c.on("removed",g),c.listen()),!0},initModules:f,getModule:function(t){if("string"==typeof t&&r.hasOwnProperty(t))for(var n in r[t])return r[t][n];else if("object"==typeof t){var i=e(t);if(i.length>0&&i.data("module-guid"))return p(i.data("module-guid"))}return!1},getModules:function(e){if(r.hasOwnProperty(e)){var t=[];for(var n in r[e])t.push(r[e][n]);return t}return[]},getModuleByGUID:p,destroy:function(){c&&c.kill()},destroyAll:function(e){var n=e?[e]:Object.keys(r);t.log(n),n.forEach(function(e){if(t.log(e),r.hasOwnProperty(e)){for(var n in r[e])r[e][n].destroy();delete r[e]}})}}}),define("radical/component/debounce",[],function(){return function(e,t,n){var i;return function(){var r=this,o=arguments,s=n&&!i;clearTimeout(i),i=setTimeout(function(){i=null,n||e.apply(r,o)},t),s&&e.apply(r,o)}}}),define("radical/component/endedevents",["jquery","radical/component/console","radical/component/global"],function(e,t,n){var i={isScrollStopped:!0,isResizedStopped:!0,scrollTimer:void 0,resizeTimer:void 0},r={scrollThrottle:Date.now(),resizeThrottle:Date.now()},o=function(){i.isScrollStopped=!0,e(window).trigger("scrollStopped")},s=function(){e(window).trigger("scrollThrottled")},a=function(e,t,n){i[e]=!1,clearTimeout(i[t]),i[t]=setTimeout(n,150)},l=function(e,t){var n=Date.now();if(n-r[e]<250)return!1;r[e]=n,"function"==typeof t&&t()},c=function(){i.isResizedStopped=!0,e(window).trigger("resizeStopped")},u=function(){e(window).trigger("resizeThrottled")};return{init:function(){window.addEventListener("scroll",function(){a("isScrollStopped","scrollTimer",o),l("scrollThrottle",s)}),window.addEventListener("resize",function(){a("isResizeStopped","resizeTimer",c),l("resizeThrottle",u)})},destroy:function(){}}}),define("radical/component/donottrack",["radical/component/console","radical/component/global"],function(e,t){e.log("radical/component/donottrack");var n,i,r=t.getItem("edit_mode"),o=t.getItem("doNotTrack");return n=r?1:t.isset("doNotTrack")?o:void 0!==navigator.doNotTrack?navigator.doNotTrack:void 0!==window.doNotTrack?window.doNotTrack:void 0!==navigator.msDoNotTrack?navigator.msDoNotTrack:null,i=1===parseInt(n)||"yes"===n,t.setItem("doNotTrack",i),i}),define("radical/component/google/ga4",["radical/component/console","radical/component/global","radical/component/donottrack"],function(e,t,n){return e.log("radical/component/google/ga4"),{init:function(){var i;t.getItem("ga4-code")||e.warn("Missing 'ga4-code' from global::getItem() - check configuration");var r=t.getItem("edit_mode"),o=window.dataLayer||[],s=t.getItem("ga4-code"),a="https://www.googletagmanager.com/gtag/js?id="+s;if(r||n)return function(){};window.dataLayer=o,window.gtag=function(){o.push(arguments)},i=function(){window.gtag.apply(this,arguments)},i("js",new Date),i("config",s);var l=document.createElement("script");return l.id="ga4",l.src=a,l.async=!0,document.body.append(l),i}}}),define("radical/component/analytics",["radical/component/global","radical/component/console","radical/component/donottrack","radical/component/google/ga4"],function(e,t,n,i){var r=e.getItem("edit_mode");return{trackPage:function(e){if(!r&&!n){var t=(e=e||window.location.pathname+window.location.search).split("?");t[0].length>1&&"/"==t[0].substring(t[0].length-1)&&(t[0]=t[0].substring(0,t[0].length-1),!0),e=t.join("?"),i="function"!=typeof i?i.init():i}},trackEvent:function(e,t,o,s,a,l){if(!r&&!n){var c={hitType:"event",eventCategory:e,eventAction:String(t)},u=e+" - "+t,d={eventCategory:e,eventAction:String(t)};void 0!==o&&(c.eventLabel=o,d.eventLabel=o),void 0!==s&&(c.eventValue=s,d.eventValue=s),void 0!==a&&(c.nonInteraction=a,d.nonInteraction=a),void 0!==l&&(c.transport=l,d.transport=l),(i="function"!=typeof i?i.init():i)("event",u,d)}}}}),define("ikelos/ui",["ikelos","radical/component/UAjammer"],function(e,t){var n=function(e,t,n,i){if(void 0===n)return"";t="object"==typeof t?t:[t],i=void 0===i||i,(e="object"==typeof e?e:[e]).push("IMG_DIR"),t.push(a.imgDir);for(var r=i&&void 0!==a[n]?a[n]:n,s=0;s<e.length;s++){var l=new RegExp("%"+e[s].replace("_","_")+"%","g"),c=e[s].indexOf("TZL8-")<=-1?t[s]:o(e[s].split("-").pop(),t[s]);r=r.replace(l,c)}return r},i=document.getElementsByTagName("html")[0].getAttribute("lang"),r=null!==i?i:"en",o=function(e,t,i,o,a){var l=void 0!==t?t:"";return a=void 0!==a?a:r,void 0!==s[e]&&void 0!==s[e][a]?l=s[e][a]:""===l&&void 0!==s[e]&&void 0!==s[e].en&&(l=s[e].en),l=l.indexOf("%REPLACE%")<=-1?l:n(i,o,l,!1)},s={PLAY_VIDEO:{en:"play video"},PAUSE_VIDEO:{en:"play video"},MUTE:{en:"mute"},UNMUTE:{en:"un-mute"},VOLUME:{en:"volume"},VOLUME_LEVEL:{en:"volume level"},VOLUME_LEVEL_TEXT:{en:"volume level %REPLACE% percent"},BUFFERED:{en:"percent buffered"},PLAYBACK_SCRUBBER:{en:"playback scrubber"},CURRENT_TIME:{en:"current time"},DURATION:{en:"video duration"},TOGGLE_CC:{en:"toggle captions"},TOGGLE_SETTINGS:{en:"open settings panel"},CLOSE_SETTINGS_PANEL:{en:"close settings panel"},CLOSE_TRANSCRIPT:{en:"close transcript"},TOGGLE_FULLSCREEN:{en:"toggle settings"},TRANSCRIPT:{en:"transcript"},TRACK_HEADER:{en:"Closed Captions / Subtitles"},TRANSCRIPTS_HEADER:{en:"Transcripts"},VIDEO_QUALITY:{en:"video quality"}
17,DOWNLOAD:{en:"Download"},PLAYBACK_AT:{en:"playback at %REPLACE%"},PERCENT:{en:"percent"},AIRPLAY:{en:"airplay"}},a={imgDir:"/img/ikelos/",wrap:'<div id="ikls_wrap-%VIDEO_ID%" class="ikls_vid_uber_wrap" data-playback-state="paused" data-volume-state="" aria-busy="false" role="toolbar" data-ikls-duration="0" />',wrapInner:'<div class="ikls_vid_uber_wrap_inner" data-vid-id="%VIDEO_ID%" />',bigPlay:'<button class="ikls_play_pause ikls_big_play" aria-controls="%VIDEO_ID%" aria-label="%TZL8-PLAY_VIDEO%"><span class="ikls_poster"></span><svg class="ikls_icon ikls_play_pause-icon iklsicon-play" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-big-play"></use></svg><span class="ikls_icon ikls_busy" aria-hidden="true"></span><div class="ikls_bottom_third"></div></button>',controls:'<div class="ikls_vid_controls_wrap"><div class="ikls_vid_controls_title"></div><div class="ikls_vid_controls_inner" role="menubar"></div></div>',playButton:'<button class="ikls_play_pause ikls_btn ikls_left" aria-controls="%VIDEO_ID%" aria-label="%TZL8-PLAY_VIDEO%" role="menuitem"><svg class="ikls_icon ikls_play_pause-icon iklsicon-play" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-play"></use></svg><svg class="ikls_icon ikls_play_pause-icon iklsicon-pause" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-pause"></use></svg><span class="ikls_icon ikls_busy" aria-hidden="true"></span></button>',volume:'<button class="ikls_volume ikls_btn ikls_left" role="menuitem" aria-label="%TZL8-MUTE%" aria-live="polite"><svg class="ikls_icon iklsicon-volume-off" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-volume-off"></use></svg><svg class="ikls_icon iklsicon-volume-on" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-volume-on"></use></svg></button><div class="ikls_volume_scrubber_wrap"><label for="volume_scrubber-%VIDEO_ID%" class="ikls_screen_reader_only">%TZL8-VOLUME_LEVEL%</label><input id="volume_scrubber-%VIDEO_ID%" class="ikls_volume_scrubber" type="range" min="0" max="100" value="50" step="1" aria-valuetext="" role="menuitem" aria-live="polite" /></div>',scrubber:'<div class="ikls_scrubber_wrap"><progress class="ikls_scrubber_buffered" max="100" value="0" aria-label="%TZL8-BUFFERED%"></progress><input class="ikls_scrubber" type="range" min="0" max="0" value="0" step="0.01" aria-valuetext="" aria-valuenow="0" aria-label="%TZL8-PLAYBACK_SCRUBBER%" role="menuitem" /></div>',time:'<div class="ikls_time_wrap ikls_left"><time class="ikls_time ikls_current_time" aria-label="%TZL8-CURRENT_TIME%" aria-valuenow="0"></time> <span>/</span> <time class="ikls_time ikls_video_duration" aria-label="%TZL8-DURATION%"></time></div>',controlsRight:'<div class="ikls_controls_right ikls_right" />',settingsWrap:'<div id="ikls_settings-%VIDEO_ID%" class="ikls_settings" role="menu"><div class="ikls_settings_inner"><div class="ikls_settings_content"></div></div><button class="ikls_close_settings" aria-label="%TZL8-CLOSE_SETTINGS_PANEL%" aria-controls="ikls_settings-%VIDEO_ID%"><svg class="ikls_icon iklsicon-close"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-close"></use></svg></button></div>',button:'<button class="ikls_btn %CLASS%" data-ikls-value="%VALUE%">%COPY%</button>',textButton:'<button class="ikls_text_btn %CLASS%" data-ikls-value="%VALUE%">%COPY%</button>',link:'<a href="%HREF%" class="ikls_link %CLASS%" data-ikls-value="%VALUE%">%COPY%</a>',closedCaptionsButton:'<button class="ikls_captions_toggle ikls_btn ikls_btn_skinny ikls_left" aria-label="%TZL8-TOGGLE_CC%" role="menuitem" aria-haspopip="true" aria-controls="ikls_track_wrap-%VIDEO_ID%"><svg class="ikls_cc ikls_icon iklsicon-cc" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-cc"></use></svg></button>',trackDisplayWrap:'<div id="ikls_track_wrap-%VIDEO_ID%" class="ikls_track_wrap"><div class="ikls_track_wrap_inner" aria-live="polite"></div></div>',transcriptWrap:'<div id="ikls_transcript-%VIDEO_ID%" class="ikls_transcript_wrap"><div class="ikls_transcript_wrap_inner" aria-label="" aria-live="polite">%CONTENT%</div><button class="ikls_close_transcript" aria-label="%TZL8-CLOSE_TRANSCRIPT%" aria-controls="ikls_transcript-%VIDEO_ID%"><svg class="ikls_icon iklsicon-close"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-close"></use></svg></button></div>',downloadLink:'<a href="%VIDEO_DOWNLOAD_URL%" download="%VIDEO_FILENAME%" class="ikls_btn ikls_left" aria-label="%TZL8-DOWNLOAD%" role="menuitem" aria-haspopup="true" aria-controls="ikls_settings-%VIDEO_ID%" target="_blank"><svg class="ikls_icon iklsicon-download" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-download"></use></svg></a>',settingsButton:'<button class="ikls_settings_toggle ikls_btn ikls_left" aria-label="%TZL8-TOGGLE_SETTINGS%" role="menuitem" aria-haspopup="true" aria-controls="ikls_settings-%VIDEO_ID%"><svg class="ikls_icon iklsicon-cog" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-cog"></use></svg></button>',settingsSection:'<section class="ikls_section %CLASS%"><div class="ikls_sectionhead" role="sectionhead" tabindex="0">%SECTION_HEAD%</div><div class="ikls_section_content">%SECTION_CONTENT%</div></section>',fullscreenButton:'<button class="ikls_fullscreen_toggle ikls_btn ikls_left" aria-label="%TZL8-TOGGLE_FULLSCREEN%" role="menuitem"><svg class="ikls_icon iklsicon-fullscreen" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-fullscreen"></use></svg><svg class="ikls_icon iklsicon-exit-fullscreen" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-exit-fullscreen"></use></svg></button>',airplayButton:'<button class="ikls_btn ikls_left ikls_airplay" aria-label="%TZL8-AIRPLAY%" role="menuitem"><svg class="ikls_icon iklsicon-tv" role="presentation" tabindex="-1"><use tabindex="-1" xlink:href="%IMG_DIR%#iklsicon-tv"></use></svg></button>',quality:""},l=function(e){var i,s,l,c,u,d,h,p,f,m,g,v,y,_,x,b,w,T,S,E,M,A,R,C,L=this,P=e.jQuery,I=P("#"+e.id),k=e.getHelpers().keyCodes,D=e.getHelpers().storage,O=e.getHelpers().translateTime,N=(e.getHelpers().percToSec,e.getHelpers().secToPerc,e.getHelpers().leadingZero,0);return L.version="2.0.0-radcom",L.options={addUI:!0,interactive:!0,interface:!0,hideControls:!1,forceControls:!1,hideSettings:!1,hideDownload:!1,hideFullscreen:!1,hideQuality:!1,hideTracks:!1,hideTranscripts:!1,hideAirplay:!1,hideControlsAfter:3500,imgDir:"/img/ikelos/",ui_callbacks:{init_pre:!1,init:!1,addUI_pre:!1,addUI:!1,addMarkup_pre:!1,addMarkup:!1,addControl
17s_pre:!1,addControls:!1,bindUI_pre:!1,bindUI:!1,bindControls_pre:!1,bindControls:!1,play_pre:!1,play:!1,pause_pre:!1,pause:!1,setVolume_pre:!1,setVolume:!1,updateTime_pre:!1,updateTime:!1,destroy_pre:!1,destroy:!1}},L.state={time:e.currentTime(),volume:e.options().muted?0:100,prevVolume:50,poster:I.attr("poster"),isPlaying:!1,isPaused:!0,isEnded:!1,activeTrack:void 0,inAirplay:!1},L.info={aspectRatio:isNaN(e.videoWidth()/e.videoHeight())?this.options.aspectRatio:e.videoWidth()/e.videoHeight(),duration:Math.round(e.duration()),qualityOpts:e.sourceGroupNames(),hasTracks:!1,tracks:!1,trackCount:0,defaultTrack:void 0,hasSettings:!1,monitoringAirplayMode:!1},L.originals={inDom:I.length,classes:I.length<=0?"":I.attr("class")},L.canHas={fullscreen:e.hasFullScreenSupport(),storage:D.canHas},L.init=function(){console.warn("UAjammer",{UAjammer:t}),"msie"!==t.Browser.Name&&"edge"!==t.Browser.Name||window.ikelosPluginUiRanSvgxuse||(window.ikelosPluginUiRanSvgxuse=!0, 18/*! 19 * @copyright Copyright (c) 2016 IcoMoon.io 20 * @license Licensed under MIT license 21 * See https://github.com/Keyamoon/svgxuse 22 * @version 1.1.10 23 */ 24function(){if(window&&window.addEventListener){var e,t,n=Object.create(null),i=function(){clearTimeout(t),t=setTimeout(e,100)},r=function(){},o=function(){var e;window.addEventListener("resize",i,!1),window.addEventListener("orientationchange",i,!1),window.MutationObserver?((e=new MutationObserver(i)).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),r=function(){try{e.disconnect(),window.removeEventListener("resize",i,!1),window.removeEventListener("orientationchange",i,!1)}catch(e){}}):(document.documentElement.addEventListener("DOMSubtreeModified",i,!1),r=function(){document.documentElement.removeEventListener("DOMSubtreeModified",i,!1),window.removeEventListener("resize",i,!1),window.removeEventListener("orientationchange",i,!1)})};e=function(){function e(){0===--p&&o()}function t(t){return function(){var n=document.body,i=document.createElement("x");t.onload=null,i.innerHTML=t.responseText,(i=i.getElementsByTagName("svg")[0])&&(i.style.position="absolute",i.style.width=0,i.style.height=0,i.style.overflow="hidden",n.insertBefore(i,n.firstChild)),e()}}function i(t){return function(){t.onerror=null,t.ontimeout=null,e()}}var s,a,l,c,u,d,h,p=0;if(window.XMLHttpRequest&&(u=void 0!==(u=new XMLHttpRequest).withCredentials?XMLHttpRequest:XDomainRequest||void 0),void 0!==u){for(r(),h=document.getElementsByTagName("use"),c=0;c<h.length;c+=1){try{a=h[c].getBoundingClientRect()}catch(e){a=!1}s=(l=h[c].getAttributeNS("http://www.w3.org/1999/xlink","href").split("#"))[0],l=l[1],d=a&&0===a.left&&0===a.right&&0===a.top&&0===a.bottom,a&&0===a.width&&0===a.height&&!d?s.length&&(!0!==(d=n[s])&&h[c].setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+l),void 0===d&&(d=new u,n[s]=d,d.onload=t(d),d.onerror=i(d),d.ontimeout=i(d),d.open("GET",s),d.send(),p+=1)):d||void 0!==n[s]||(n[s]=!0)}h="",p+=1,e()}},window.addEventListener("load",function t(){window.removeEventListener("load",t,!1),e()},!1)}}()),L.id=e.id,L.$els={},L.info.qualityOpts=e.sourceGroupNames(),L.options.hideAirplay=!!(I[0].hasAttribute("x-webkit-airplay")&&"deny"===I.attr("x-webkit-airplay")||I.attr("x-webkit-wirelessvideoplaybackdisabled")),void 0!==e.instanceOptions&&(console.warn("HERE COME OPTIONS!"),console.log(e.instanceOptions),L.setOptions(e.instanceOptions)),L.originals.inDom&&"object"==typeof I.data("ikelosuioptions")&&L.setOptions(I.data("ikelosuioptions"));var n=S("init_pre");if("ikls_exit"!==n){if(L.options.addUI){if("ikls_exit"===(n=S("addUI_pre")))return;a.imgDir=L.options.imgDir+"sprite.symbol.svg?v=2024",L.originals.controls=e.controls(),e.controls(!1),L.originals.tabIndex=I.attr("tabindex"),I.attr("tabindex","-1"),f(),console.warn("DID WE INDEED ADD MARKUP???"),P(e.emitter()).data("ui-events-bound")||l(),c(),d(),v(e.bufferedPercent()),g(),S("addUI")}L.options.autoplay&&L.play(),S("init")}},L.destroy=function(){"ikls_exit"!==S("destroy_pre")&&(L.originals.inDom?(L.$els.wrap.find(".ikls_vid_uber_wrap_inner > button, .ikls_vid_uber_wrap_inner > div").remove(),L.$els.wrap.find(".ikls_transcript_wrap").remove(),I.unwrap().unwrap(),I.append(L.originals.trackEls),e.controls(L.originals.controls),void 0!==L.originals.tabIndex&&I.attr("tabIndex",L.originals.tabIndex)):L.$els.wrap.remove(),clearTimeout(A),clearInterval(R),S("destroy"),unbindIkelosEvents(),delete L)},L.setOptions=function(e){if("object"==typeof e)for(var t in e)L.options[t]=e[t]},L.play=function(t,n){if(n=void 0===n||n,void 0!==t&&e.currentTime(t),n){if
24("ikls_exit"===S("play_pre"))return;h("playing"),e.play(),L.$els.wrap.find(".ikls_play_pause").attr("aria-label",o("PAUSE_VIDEO")),S("play")}},L.pause=function(){"ikls_exit"!==S("pause_pre")&&(h("paused"),e.pause(),L.$els.wrap.find(".ikls_play_pause").attr("aria-label",o("PLAY_VIDEO")),S("pause"))},L.togglePlayback=function(){L.state.isPlaying?L.pause():L.play()},L.setVolume=function(t,n,i){if("ikls_exit"!==S("setVolume_pre")){n=void 0===n||n,i=void 0===i||i;var r=(t=void 0===t?100*e.volume():t)<=0?"muted":"",s=o(t<=0?"UNMUTE":"MUTE");L.$els.wrap.attr("data-volume-state",r),L.$els.volume.attr("aria-valuetext",o("VOLUME_LEVEL_TEXT","","REPLACE",t)).val(t),L.$els.wrap.find(".ikls_volume").attr("aria-label",s+" "+o("VOLUME")),L.state.volume=t,t>0&&(L.state.prevVolume=t>=5?t:50),t>=0&&!L.options.muted&&i&&D.setItem("_ikelos_ui_volume",t),n&&(e.volume(0===t?0:t/100),S("setVolume"))}},L.mute=function(){L.setVolume(0),L.$els.wrap.find(".ikls_volume").attr("aria-label",o("UNMUTE"))},L.toggleVolume=function(){100*e.volume()<=0?(L.setVolume(L.state.prevVolume),L.$els.wrap.find(".ikls_volume").attr("aria-label",o("MUTE"))):L.mute()},L.fullscreenToggle=function(){var n="tablet"!=t.Venue?L.$els.wrapInner:I,i=S("fullscreenToggle_pre");if("ikls_exit"!==i)if(void 0!==i&&void 0!==i.fullscreenEl&&(n=i.fullscreenEl),e.inFullScreen()){if("ikls_exit"===S("fullscreenExit_pre"))return;e.cancelFullScreen(n),L.$els.wrapInner.removeClass("ikls_is-fullscreen");S("fullscreenExit")}else{if("ikls_exit"===S("fullscreenEnter_pre"))return;"tablet"===t.Venue&&b(),e.requestFullScreen(n),L.$els.wrapInner.addClass("ikls_is-fullscreen");S("fullscreenEnter")}},L.setPoster=function(e){e=e?"url("+e+")":"none",L.$els.wrap.find(".ikls_poster").css({"background-image":e})},L.showTrack=function(t){if(void 0!==(t=void 0===t?L.info.defaultTrack:t)&&e.getHelpers().isSet(L.info.tracks[t]))if(void 0===L.info.tracks[t].data){_(t,function(){L.showTrack(t)})}else L.state.activeTrack=L.info.tracks[t].data,L.state.activeTrackLabel=t,x(),D.setItem("_ikelos_track_option",t),L.$els.wrap.addClass("ikls_show_tracks"),L.$els.captionsToggle.attr("aria-pressed",!0),L.$els.wrap.find(".ikls_track_option").attr("aria-pressed",!1),L.$els.wrap.find('.ikls_track_option[data-ikls-value="'+t+'"]').attr("aria-pressed",!0);else L.hideTrack(!1)},L.hideTrack=function(e){L.state.activeTrack=void 0,L.state.activeTrackLabel=void 0,L.$els.wrap.removeClass("ikls_show_tracks"),e&&D.setItem("_ikelos_track_option",null),void 0!==L.$els.trackWrap&&(L.$els.trackWrap.css("display","none"),L.$els.captionsToggle.attr("aria-pressed",!1),L.$els.wrap.find(".ikls_track_option").attr("aria-pressed",!1))},L.showTranscript=function(t){if(void 0!==t&&e.getHelpers().isSet(L.info.tracks[t]))if(void 0===L.info.tracks[t].transcript){_(t,function(){L.showTranscript(t)})}else L.$els.transcript.html(L.info.tracks[t].transcript),L.$els.wrap.addClass("ikls_show_transcript"),L.$els.wrap.find(".ikls_transcript_option").attr("aria-pressed",!1),L.$els.wrap.find('.ikls_transcript_option[data-ikls-value="'+t+'"]').attr("aria-pressed",!0);else L.hideTranscript()},L.hideTranscript=function(){L.$els.wrap.removeClass("ikls_show_transcript"),L.$els.transcript.html(""),L.$els.wrap.find(".ikls_transcript_option").attr("aria-pressed",!1)},L.setQuality=function(t,n){var i=L.$els.wrap.find('.ikls_quality_option[data-ikls-value="'+t+'"]');i.length<=0||(e.sourceGroups(t),L.$els.wrap.find(".ikls_quality_option").attr("aria-pressed",!1),i.attr("aria-pressed",!0),n&&D.setItem("_ikelos_quality_option",t))},L.moveScrubber=function(t,n){t=void 0===t?e.currentTime():t,n=void 0===n||n;var i=O(t);L.$els.progressBar.val(t).attr("aria-valuetext",o("PLAYBACK_AT","","REPLACE",i)).attr("max",L.info.duration),L.state.time=t,x(),L.setPoster(t<=.04&&L.state.poster),n&&e.currentTime(L.state.time)},L.toggleInteractive=function(e){this.options.interactive=e,e?this.$els.wrap.removeClass("ikls_disable_interaction"):this.$els.wrap.addClass("ikls_disable_interaction")},L.toggleInterface=function(e){this.options.interface=e,e?this.$els.wrap.removeClass("ikls_disable_interface"):this.$els.wrap.addClass("ikls_disable_interface")},L.canInteract=function(){return this.options.interactive},unbindIkelosEvents=function(){e.off("ikls_timeupdate.ui ikls_play.ui ikls_pause.ui ikls_ended.ui ikls_ended.ui ikls_fullscreenchange.ui ikls_loadstart.ui ikls_loadedmetadata.ui ikls_loadeddata.ui ikls_loadedalldata.ui ikls_canplay.ui ikls_canplaythrough.ui ikls_progress.ui ikls_durationchange.ui ikls_resize.ui"),P(e.emitter()).data("ui-events-bou
24nd",!1)},l=function(){e.on("ikls_timeupdate.ui",function(){d()}).on("ikls_play.ui",function(){L.$els.wrap.addClass("ikls_played"),h("playing"),L.options.hideAirplay||L.state.monitoringAirplayMode||setTimeout(function(){I[0].webkitCurrentPlaybackTargetIsWireless&&h("in-AirPlay")},300)}).on("ikls_pause.ui",function(){h("paused")}).on("ikls_ended.ui",function(){L.setVolume(void 0,!1),e.isPlaying()||h("ended"),S("ended")}).on("ikls_fullscreenchange.ui",function(t){e.inFullScreen()?L.$els.wrapInner.addClass("ikls_is-fullscreen"):(L.options.hasControls&&e.elements().find("track").remove(),L.$els.wrapInner.removeClass("ikls_is-fullscreen"))}).on("ikls_loadstart.ui",function(){L.$els.wrap.addClass("ikls_loadstart"),d()}).on("ikls_loadedmetadata.ui",function(){L.$els.wrap.addClass("ikls_loadedmetadata").removeClass("ikls_loadstart"),p(),d(),E()}).on("ikls_loadeddata.ui",function(){L.$els.wrap.addClass("ikls_loadeddata").removeClass("ikls_loadstart"),d()}).on("ikls_loadedalldata.ui",function(){L.$els.wrap.addClass("ikls_loadedalldata").removeClass("ikls_loadstart"),d()}).on("ikls_canplay.ui",function(){L.$els.wrap.addClass("ikls_canplay")}).on("ikls_canplaythrough.ui",function(){L.$els.wrap.addClass("ikls_canplaythrough")}).on("ikls_progress.ui",function(){v(e.bufferedPercent()),d()}).on("ikls_durationchange.ui",function(){d(),p()}).on("ikls_resize.ui",function(){}),P(e.emitter()).data("ui-events-bound",!0)},c=function(){"ikls_exit"!==S("bindUI_pre")&&(P("#ikls_wrap-"+e.id+" *").on("focus",function(e){L.$els.wrap.addClass("ikls_focused")}).on("blur",function(e){L.$els.wrap.removeClass("ikls_focused")}),L.$els.bigPlay.on("click",function(e){e.preventDefault(),e.stopPropagation(),L.togglePlayback()}),e.options().controls&&u(),S("bindUI"))},u=function(){"ikls_exit"!==S("bindControls_pre")&&(L.$els.wrap.on("mousemove keydown click touchstart touchmove touchend",function(e){w()}).on("focus click keypress","button, a, .ikls_btn",function(e){w()}).on("click",".ikls_big_play.ikls_play_pause",function(e){e.preventDefault(),e.stopPropagation(),L.togglePlayback()}).on("click touchstart",".ikls_vid_controls_wrap .ikls_play_pause",function(e){e.preventDefault(),e.stopPropagation(),L.togglePlayback()}).on("click touchstart",".ikls_fullscreen_toggle",function(e){e.preventDefault(),L.fullscreenToggle()}).on("click",".ikls_volume",function(e){e.preventDefault(),L.toggleVolume()}).on("change input",".ikls_volume_scrubber",function(e){L.setVolume(P(this).val())}).on("change input touchstart touchmove touchend",".ikls_scrubber",function(e){L.play(P(this).val(),!1)}).on("keydown",".ikls_scrubber",function(e){var t,n=e.keyCode||e.which;switch(!0){case n==k.spacebar||n==k.enter:L.togglePlayback();break;case e.shiftKey&&n==k.arrow_up:case e.shiftKey&&n==k.arrow_right:e.preventDefault(),t=L.state.time+1,L.moveScrubber(t>L.info.duration?L.info.duration:t,!0);break;case e.shiftKey&&n==k.arrow_down:case e.shiftKey&&n==k.arrow_left:e.preventDefault(),t=L.state.time-1,L.moveScrubber(t<0?0:t,!0)}}).on("click touchstart",".ikls_settings_toggle",function(e){e.preventDefault(),L.$els.wrap.addClass("ikls_show_settings"),void 0!==L.$els.wrap.find(".ikls_sectionhead")[0]&&L.$els.wrap.find(".ikls_sectionhead")[0].focus(),L.pause()}).on("click touchstart",".ikls_close_settings",function(e){e.preventDefault(),L.$els.wrap.removeClass("ikls_show_settings"),L.$els.settingsToggle.focus()}).on("click touchstart",".ikls_close_transcript",function(e){e.preventDefault(),L.hideTranscript()}).on("keydown",function(e){var t=e.keyCode||e.which;switch(!0){case t==k.esc&&L.$els.wrap.hasClass("ikls_show_settings"):L.$els.wrap.removeClass("ikls_show_settings"),L.$els.settingsToggle.focus();break;case t==k.esc&&L.$els.wrap.hasClass("ikls_is-fullscreen"):L.$els.wrap.removeClass("ikls_is-fullscreen"),S("fullscreenExit")}}).on("click touchstart",".ikls_captions_toggle",function(e){e.preventDefault(),L.$els.wrap.hasClass("ikls_show_tracks")?L.hideTrack(!0):L.showTrack()}).on("click touchstart",".ikls_track_option",function(e){e.preventDefault(),L.showTrack(P(this).data("ikls-value"))}).on("click touchstart",".ikls_transcript_option",function(e){e.preventDefault(),L.showTranscript(P(this).data("ikls-value"))}).on("click touchstart",".ikls_quality_option",function(e){e.preventDefault();var t=P(this).data("ikls-value");L.setQuality(t,!0)}).on("click touchstart",".ikls_airplay",function(e){e.preventDefault(),I[0].webkitShowPlaybackTargetPicker(),C()}),L.options.hideAirplay||I.on("webkitplaybacktargetavailabilitychanged",function(e){L.$els.wrap.hasClass("ikls_airplay_available")||"available"!==e.originalEvent.availability?L.$els.wrap.removeClass("ikls_airplay_available"):L.$els.wrap.addClass("ikls_airplay_available")}
24),S("bindControls"))},S=function(t,n){n=void 0!==n?n:{_vid:e,_inst:L};var i=!0;return"function"==typeof L.options.ui_callbacks[t]&&(i=L.options.ui_callbacks[t](n)),i},h=function(e){switch(e){case"playing":L.state.isPlaying=!0,L.state.isPaused=!1,L.state.isEnded=!1,L.$els.wrap.attr("data-playback-state","playing");break;case"paused":L.state.isPlaying=!1,L.state.isPaused=!0,L.state.isEnded=!1,L.$els.wrap.attr("data-playback-state","paused");break;case"ended":L.state.isPlaying=!1,L.state.isPaused=!1,L.state.isEnded=!0,L.$els.wrap.attr("data-playback-state","ended");break;case"in-AirPlay":L.state.inAirplay=!0,b(),L.$els.wrap.addClass("ikls_in_airplay").find(".ikls_airplay").addClass("ikls_active");break;case"not-AirPlay":L.state.inAirplay=!1,L.$els.wrap.removeClass("ikls_in_airplay").find(".ikls_airplay").removeClass("ikls_active"),I.find("track").remove()}},i=function(){if(L.info.trackCount=e.getHelpers().objSize(L.info.tracks),!(L.info.trackCount<=0||L.options.hideTracks)){var t="",i="",r=o("TRANSCRIPT"),s=o("TRACK_HEADER"),a=o("TRANSCRIPTS_HEADER");for(var l in L.info.tracks){var c=o(l,l),u=L.info.tracks[l].kind,d=o(u,u);t+=n(["CLASS","COPY","VALUE"],["ikls_track_option",c+'<span class="ikls_screen_reader_only">'+d+"</span>",l],"textButton")+" ",i+=n(["CLASS","COPY","VALUE"],["ikls_transcript_option",c+'<span class="ikls_screen_reader_only">'+r+"</span>",l],"textButton")+" "}L.info.trackCount>1&&L.$els.settings.append(n(["CLASS","SECTION_HEAD","SECTION_CONTENT"],["ikls_track_options_wrap",s,t],"settingsSection")),L.$els.settings.append(n(["CLASS","SECTION_HEAD","SECTION_CONTENT"],["ikls_transcript_options_wrap",a,i],"settingsSection"))}},s=function(){if(console.log("** [buildQualitySettings]",L.info),!(L.info.qualityOpts.length<=1||L.options.hideQuality)){for(var t="",i=o("VIDEO_QUALITY"),r=0;r<L.info.qualityOpts.length;r++){var s=L.info.qualityOpts[r];t+=n(["CLASS","COPY","VALUE"],["ikls_quality_option",s+'<span class="ikls_screen_reader_only">'+i+"</span>",s],"textButton")+" "}L.$els.settings.prepend(n(["CLASS","SECTION_HEAD","SECTION_CONTENT"],["ikls_quality_options_wrap",i,t],"settingsSection")),L.$els.wrap.find('.ikls_quality_option[data-ikls-value="'+e.selectedSourceGroup+'"]').attr("aria-pressed",!0)}},m=function(){M(),t.Touch&&L.$els.wrap.attr("data-hastouch","true"),"ikls_exit"!==S("addControls_pre")&&(L.$els.wrapInner.append(a.controls),L.$els.title=L.$els.wrapInner.find(".ikls_vid_controls_title"),L.options.title||L.$els.title.remove(),L.$els.controls=L.$els.wrapInner.find(".ikls_vid_controls_inner"),L.$els.controls.append(n(["VIDEO_ID","TZL8-PLAY_VIDEO"],[e.id,"play video"],"playButton")),L.$els.controls.append(n(["TZL8-BUFFERED","TZL8-PLAYBACK_SCRUBBER"],["buffered","playback scrubber"],"scrubber")).append(n(["TZL8-DURATION","TZL8-CURRENT_TIME"],["video duration","current time"],"time")).append(a.controlsRight),"phone"!=t.Venue&&"tablet"!=t.Venue&&L.$els.controls.append(n(["TZL8-MUTE","VIDEO_ID","TZL8-VOLUME_LEVEL"],["mute volume",e.id,"volume level scrubber"],"volume")),d(),L.$els.controlsRight=L.$els.wrapInner.find(".ikls_controls_right"),L.info.hasTracks&&!L.options.hideTracks&&(L.info.hasSettings=L.info.trackCount>0,L.$els.controlsRight.append(n(["VIDEO_ID","TZL8-TOGGLE_CC"],[e.id,"toggle text track"],"closedCaptionsButton")),L.$els.controls.before(n(["VIDEO_ID"],[e.id],"trackDisplayWrap")),L.$els.wrap.append(n(["VIDEO_ID","TZL8-CLOSE_TRANSCRIPT"],[e.id,"close transcript"],"transcriptWrap"))),L.info.qualityOpts.length>1&&!L.options.hideQuality&&(L.info.hasSettings=!0,L.info.hasQualityOpts=!0),L.options.hideDownload||void 0===L.options.downloads||L.$els.controlsRight.append(n(["VIDEO_ID","TZL8-DOWNLOAD","VIDEO_DOWNLOAD_URL","VIDEO_FILENAME"],[e.id,"download video",L.options.downloads[0][0].src,L.options.downloadFileName],"downloadLink")),!L.options.hideDownload&&(void 0!==L.options.downloads&&L.options.downloads.length>0||e.getHelpers().objSize(e.sourceGroups()))&&(L.info.hasSettings=!0),L.info.hasSettings&&!L.options.hideSettings&&(L.$els.controlsRight.append(n(["VIDEO_ID","TZL8-TOGGLE_SETTINGS"],[e.id,"toggle settings"],"settingsButton")),L.$els.wrapInner.append(n(["VIDEO_ID","TZL8-CLOSE_SETTINGS_PANEL"],[e.id,"close settings wrap"],"settingsWrap")),L.$els.settingsWrap=L.$els.wrapInner.find(".
24ikls_settings"),L.$els.settings=L.$els.wrapInner.find(".ikls_settings_content"),i(),s()),L.options.hideAirplay||L.$els.controlsRight.append(n(["TZL8-AIRPLAY"],["airplay"],"airplayButton")),E(),M(),S("addControls"))},E=function(){!L.options.hideFullscreen&&L.options.hasControls&&(L.canHas.fullscreen||I[0].webkitSupportsFullscreen)&&L.$els.wrap.find(".ikls_fullscreen_toggle").length<=0&&(L.info.hasFullscreen=!0,L.$els.controlsRight.append(n(["TZL8-TOGGLE_FULLSCREEN"],["toggle fullscreen"],"fullscreenButton")),M(),L.$els.wrap.addClass("ikls_has_fullscreen"))},f=function(){if("ikls_exit"!==S("addMarkup_pre")){if(L.$els.wrap=P(n("VIDEO_ID",e.id,"wrap")),L.$els.wrapInner=P(n("VIDEO_ID",e.id,"wrapInner")),L.$els.wrapInner.insertBefore(e.object()).append(e.elements()).append(n(["VIDEO_ID","TZL8-PLAY_VIDEO"],[e.id,"play video"],"bigPlay")).wrap(L.$els.wrap),M(),(e.options().controls&&!L.options.hideControls&&"phone"!=t.Venue||L.options.forceControls&&"phone"!=t.Venue)&&(L.options.hasControls=!0,y(),m()),M(),L.$els.wrap.attr("data-venue",t.Venue),void 0!==L.state.poster&&L.setPoster(L.state.poster),(null===e.videoWidth()||!e.videoWidth())&&void 0!==I.attr("width")&&0!==I.attr("width")&&L.$els.wrap.children("object").length>=1||L.options.jamAspectRatio){var i=void 0===$el.attr("width")||0===$el.attr("width")?100*L.info.aspectRatio:$el.attr("height")/$el.attr("width")*100;isNaN(aspect)||(L.$els.wrapInner.css("padding-top",i+"%"),L.$els.wrap.find("object").attr({width:"100%",height:"100%"}).css({position:"absolute",top:"0px",left:"0px"}),"relative"===I.css("position")&&I.css({position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%"}))}S("addMarkup")}},M=function(){L.$els.wrap=P("#ikls_wrap-"+e.id),L.$els.wrapInner=L.$els.wrap.find(".ikls_vid_uber_wrap_inner"),L.$els.bigPlay=L.$els.wrap.find(".ikls_big_play"),L.$els.bottomThird=L.$els.wrap.find(".ikls_bottom_third"),L.$els.controls=L.$els.wrap.find(".ikls_vid_controls_inner"),L.$els.playButton=L.$els.controls.find(".ikls_play_pause"),L.$els.muteToggle=L.$els.wrap.find(".ikls_volume"),L.$els.volume=L.$els.wrap.find(".ikls_volume_scrubber"),L.$els.bufferedBar=L.$els.wrap.find(".ikls_scrubber_buffered"),L.$els.progressBar=L.$els.wrap.find(".ikls_scrubber"),L.$els.currentTime=L.$els.wrap.find(".ikls_current_time"),L.$els.duration=L.$els.wrap.find(".ikls_video_duration"),L.$els.controlsRight=L.$els.wrap.find(".ikls_controls_right"),L.$els.captionsToggle=L.$els.wrap.find(".ikls_captions_toggle"),L.$els.settingsToggle=L.$els.wrap.find(".ikls_settings_toggle"),L.$els.fullscreenToggle=L.$els.wrap.find(".ikls_fullscreen_toggle"),L.$els.settingsWrap=L.$els.wrapInner.find(".ikls_settings"),L.$els.settings=L.$els.wrapInner.find(".ikls_settings_content"),L.$els.trackWrap=L.$els.wrap.find(".ikls_track_wrap_inner"),L.$els.transcript=L.$els.wrap.find(".ikls_transcript_wrap_inner")},v=function(e){L.$els.bufferedBar.val(e).attr("aria-label",Math.round(e)+" "+o("BUFFERED"))},w=function(){L.options.hideControlsAfter<=0||(clearTimeout(A),L.$els.wrap.removeClass("ikls_hide_controls").addClass("ikls_focused"),A=setTimeout(T,L.options.hideControlsAfter))},T=function(){L.$els.wrap.addClass("ikls_hide_controls").removeClass("ikls_focused")},g=function(){var t=L.state.volume;e.options().muted||(t=null!==D.getItem("_ikelos_ui_volume")?D.getItem("_ikelos_ui_volume"):t),L.setVolume(t,!0,!1);var n=D.getItem("_ikelos_track_option");null!==n&&L.showTrack(n,!1);var i=D.getItem("_ikelos_quality_option");null!==i&&L.setQuality(i,!1),L.options.lang=r},d=function(){if("ikls_exit"!==S("updateTime_pre")){L.state.time=e.currentTime();var t=isFinite(e.duration())?e.duration():0;if(t!==L.info.duration&&(L.info.duration=t,L.$els.wrap.attr({"data-ikls-duration":L.info.duration}),L.$els.wrap.find(".ikls_video_duration").text(O(L.info.duration))),isNaN(L.state.time))N++,L.state.time=e.currentTime(),L.info.duration=t,N<=100&&setTimeout(d(),50);else{var n=Math.round(100*L.state.time)/100,i=O(n);L.moveScrubber(n,!1),L.$els.currentTime.attr({"aria-valuenow":i,"aria-valuetext":"playback at "+i}).text(i),S("updateTime")}}},p=function(){L.info.aspectRatio=isNaN(e.videoWidth()/e.videoHeight())?L.settings.aspectRatio:e.videoWidth()/e.videoHeight(),L.state.time=isFinite(e.currentTime())?Math.round(e.currentTime()):0,L.info.duration=isFinite(e.duration())?e.duration():0},y=function(){var n=e.elements().find("track"),i=e.elements().find("track[default]").length>0;if(n.length<1)L.hideTrack(!1);else{var r=0,o={},s="msie"==t.Browser.Name?0:"hidden";L.info.captionCount=n.length,L.info.hasTracks=!0,L.originals.trackEls="",n.each(function(){var t={src:P(this).attr("src"),label:P(this).attr("label"),lang:P(this).attr("srclang"),kind:P(this).attr("kind"),default:void 0!==P(this).attr("default"),data:void 0,transcript:void 0};i||0!==r||(t.default=!0),t.default&&(L.info.defaultTrack=t.label),"vtt"==t.src.split(".").pop()&&(o[t.label]=t,void 0!==e.object.textTracks&&(e.object.textTracks[r].mode=s),r++),L.originals.trackEls+=P(this)[0].outerHTML}),n.remove(),L.info.tracks=o}},_=function(e,t){var n=L.info.tracks[e],i=n.src;P.get(i,function(e){var i=e.split("\n"),r=[],o="";P.each(i,function(e,t){var n=i[e],s=i[1*e+1];if(n.indexOf("--\x3e")>=0){var a=n.split(" --\x3e "),l=a[0].split(":"),c=a[1].split(":"),u={start:60*l[0]+1*l[1],end:60*c[0]+1*c[1],data:s};r.push(u),""!==u.data&&void 0!==u.data&&(o+="\n<p>"+u.data+"</p>")}}),n.data=r,""!==o&&(n.transcript=o),"function"==typeof t&&t()})},x=function(e){if(void 0===L.state.activeTrack)L.hideTrack();else{var t=L.state.activeTrack,n=void 0!==e?e:1*L.state.time,i=!1;for(var r in t)if(n>=t[r].start&&n<=t[r].end){var o=t[r].data;L.$els.trackWrap.text(o).css("display","block"),i=!0;break}i||void 0===L.$els.trackWrap||L.$els.trackWrap.css("display","none")}},b=function(){I.find("track").length<=0&&I.append(L.originals.trackEls),void 0!==L.state.activeTrackLabel&&(I.find("track[default]").removeAttr("default"),I.find('track[label="'+L.state.activeTrackLabel+'"]').attr("default",!0))},C=function(){if(!L.info.monitoringAirplayMode){L.info.monitoringAirplayMode=!0;R=setInterval(function(){I[0].webkitCurrentPlaybackTargetIsWireless?h("in-AirPlay"):h("not-AirPlay")},400)}},L.init(),L};e("plugin","ui",function(e,t){return{init:function(){return this.ui=new l(e),this.ui},toggleInteractive:function(e){this.ui.toggleInteractive(e)},toggleInterface:function(e){this.ui.toggleInterface(e)},destroy:function(){console.warn("oh, hello! plugin ui instance .destroy()"),console.log(this),console.log(this.ui),this.ui.destroy(),delete this.ui}}})}),define("radical/component/srcset",["jquery","radical/component/console","radical/component/global"],function(e,t,n){t.log("radical/component/srcset::loaded");return{chooseSrc:function(t,n,i){n=void 0!==n?1*n:0,i=void 0!==i?1*i:0,function(t){var n=t.data("srcsetparsed"),i=t.data("srcset"),r={},o=0;void 0!==i&&"object"!=typeof n&&"string"==typeof i&&(i=i.split(","),e.each(i,function(t,n){var i=1*(n=(n=e.trim(n)).split(" "))[1].replace("w","");r[i]=n[0],o=i>o?i:o}),t.data({srcsetparsed:r,biggestSrc:o}))}(t);var r,o,s=t.width(),a=t.height(),l=t.data("srcsetparsed"),c=void 0!==t.data("aspectPerc")?parseFloat(t.data("aspectPerc")):.5625,u=t.data("biggestSrc"),d=!0,h=s,p=n;if(void 0!==l)return a>s&&(d=!1,h=a,p=i),e.each(l,function(e,n){if((r=d?e:e*c)>=h&&r>=p)return o=n,t.data("chosensrcwidth",r),!1}),void 0!==o?o:l[u]},destroy:function(){t.log("radical/component/srcset::destroy")}}}),define("radical/component/lazyload",["jquery","ikelos/ui","ikelos","radical/component/console","radical/component/global","radical/component/module/registry","radical/component/srcset"],function(e,t,n,i,r,o,s){var a=[],l=0,c={};function u(t,n){var i=(l++,"lazy_"+(new Date).getTime()+"_"+l);e(t).data("assetref",i),n.data("assetref",i),c[i]={template:t,$asset:n}}function d(){for(var e=[],t=0;t<a.length;t++)h(a[t].element)?p(a[t].element,a[t].showLoader,a[t].callback):e.push(a[t]);e.length!=a.length&&(a=e)}function h(t){return e(t).is("noscript")&&(t=e(t).parent()),e(t).inView(800)}function p(t,r,a,l){function c(t,n){var i;clearTimeout(d),"append"==t?i=e(n):"insertBefore"==t&&(i=e(n).parent()),i.addClass("hideLoader")}l=void 0===l||l;var d,h,p,f,m="append",g="unknown",v={};if(void 0===t&&"function"==typeof a&&a(new Error("Lazyload received undefined element")),e(t).is("noscript")?(m="insertBefore",h=e(t)):h=e(t).children("noscript[data-type=template], noscript[type=holder]"),!h)return i.warn("Missing noscript tag in lazyload::load"),a(null,v),!1;if(p=h.text(),g=(f=e(p)).is("video")?"video":f.is("img")?"img":!(!f.hasClass("poster_cover")&&!f.hasClass("homepage_link"))&&"poster",v.type=g,v.$asset=f,!0!==e(t).data("template-loaded")){if(v.alreadyLoaded=!1,g||"function"==typeof a&&a(null,v),"img"==g&&f.on("load",function(){r&&c(m,t),"function"==typeof a&&a(null,v),f.removeClass("loading").addClass("loaded"),e(t).addClass("lazyloaded")}),f.addClass("loading"),"poster"==g&&"insertBefore"==m&&e(t).addClass("loading"),"append"==m?e(t).append(f):"insertBefore"==m?f.insertBefore(t):i.warn("lazyload - invalid mode: "+m),r&&(d=setTimeout(function(){var n;"append"==m?n=e(t):"insertBefore"==m&&(n=e(t).parent()),n.addClass("loader")},1e3)),e(t).data("template-loaded",!0),"video"==g){if(l){if(f.attr("data-srcset")){var y=s.chooseSrc(f,2*e(t).width());f.attr("poster",y)}v.player=n(e(t).children("video")),v.player.on("ikls_loadeddata",function(){r&&c(m,t),f.removeClass("loading").addClass("loaded")})}"function"==typeof a&&e(t).addClass("lazyloaded"),a(null,v)}"poster"==g&&(o.initModules(f),f.on("backgroundImageSrcAdded",function(){"insertBefore"==m&&e(t).removeClass("loading").addClass("loaded"),f.removeClass("loading").addClass("loaded"),"function"==typeof a&&a(null,v)}))}else v.alreadyLoaded=!0,"video"==g&&(v.player=n(e(t).find("video"))),"function"==typeof a&&a(null,v);return u(t,f),!0}return{init:function(){i.log("lazyload::init"),d(),e(window).on("scrollThrottled",d)},destroy:function(){e(window).off("scrollThrottled")},loadOnScroll:function(e,t,n){h(e)?p(e,t,n):a.push({element:e,showLoader:t,callback:n})},load:p,unload:function(t,r){return i.log("lazyload::unload"),!0!==e(t).data("template-loaded")?(i.warn(t,"no template loaded?",e(t).data("template-loaded"),e(t).data("assetref")),r(),!1):(function(t){var r=e(t).data("assetref"),o=c[r];if(i.log("UNLOADING!!!!!TEMPLATE!!!!!",t),o.$asset.is("video")){var s=n(o.$asset);i.log("player",s);var a=e("#ikls_wrap-"+s.id);i.log(a),s.unload(),a.remove()}o.$asset.remove(),e(t).data("assetref",null).data("template-loaded",!1).removeClass("lazyloaded"),delete c[r]}(t),r(),!0)},getAssetByRef:function(e){return void 0!==c[e]&&c[e]}}}),define("radical/component/inView",["jquery","radical/component/console","radical/component/global"],function(e,t,n){return t.log("radical/component/inView::loaded"),{init:function(){if(!jQuery().inView){var t=e(window),n=t.scrollTop(),i=t.height();e(window).on("scroll",function(){n=t.scrollTop()}).on("resize",function(){i=t.height()}),e.fn.inView=function(e){var t=!1;if(this.length>0){var r=null===this.offset()?0:this.offset().top,o=r+this.height();e=void 0===e?n:e,t=i>this.height()?n+i+e>=r&&n-e<=o:n+i+e>=r||n-e<=o}return t}}},destroy:function(){t.log("radical/component/inView::destroy",e.fn.jquery)}}}),define("radical/component/fancyLoadIn",["jquery","radical/component/console","radical/component/global"],function(e,t,n){function i(){var t=0;e(".fancy_fade_in:not('.loaded')").each(function(){e(this).inView(100)&&(e(this).addClass("loaded").css({"transition-delay":t+"s"}),t+=.15)})}return{fancyLoadIn:i,init:function(){e(document).ready(function(){i(),e(window).on("scrollThrottled.fancyLoadIn resizeStopped.fancyLoadIn",function(){i()})})},destroy:function(){e(window).off("scrollThrottled.fancyLoadIn resizeStopped.fancyLoadIn"),t.log("radical/component/FancyLoadIn::destroy")}}}),define("radical/component/flagWhenStuck",["radical/component/console","radical/component/global"],function(e,t){function n(e){null===(e=void 0!==e?e:document.querySelectorAll(".flagWhenStuck"))||e.length<=0||e.forEach(e
24=>{e.dataset.flagWhenStuckSetup||(e.dataset.flagWhenStuckSetup=!0,e.dataset.pinAt=parseInt(window.getComputedStyle(e,null).getPropertyValue("top").replace("px")),e.dataset.myOffsetTop=i(e),e.dataset.myOffsetHeight=e.offsetHeight,e.dataset.flagPastBottomMod=parseFloat(e.dataset.flagPastBottomMod||1))})}function i(e){var t=0;if(e.offsetParent)do{t+=e.offsetTop,e=e.offsetParent}while(e);return t<0?0:t}return e.log("radical/component/flagWhenStuck::loaded"),{setUpEls:n,flagEls:function(e){null===(e=void 0!==e?e:document.querySelectorAll(".flagWhenStuck"))||e.length<=0||(n(e),e.forEach(e=>{const t=e.getBoundingClientRect(),n=Math.round(t.top),r=n<=parseInt(e.dataset.pinAt)+2;let o=!1,s="true"===e.dataset.isPinned;if(r&&!s?(e.classList.add("is-pinned"),o=!0,e.dataset.isPinned=o,e.dataset.myOffsetTop=i(e),e.dataset.wasPinnedAt=n+window.scrollY):!r&&s&&(e.classList.remove("is-pinned"),e.classList.remove("is-pastbottom"),o=!1,e.dataset.isPinned=o,e.dataset.isPastBottom=!1),!r)return;void 0!==e.dataset.padPastBottom?parseInt(e.dataset.padPastBottom):window.innerHeight;let a=parseInt(e.dataset.myOffsetTop),l=parseFloat(e.dataset.flagPastBottomMod||1),c=a+Math.min(window.innerHeight,parseInt(e.dataset.myOffsetHeight)*l)<=window.scrollY,u="true"===e.dataset.isPastBottom;c&&!u?(e.classList.add("is-pastbottom"),e.dataset.isPastBottom=!0):!c&&u&&(e.classList.remove("is-pastbottom"),e.dataset.isPastBottom=!1)}))}}}),define("radical/component/spensiveRegistry",["radical/component/console"],function(e){return e.log("radical/component/spensiveRegistry::loaded"),function(e){if(void 0===e.event)return console.error("spensiveRegistry: missing event param",{opts:e}),!1;e.element||window;const t=e.event,n=e.runFirst,i=e.throttleSpeed||100,r=e.stoppedSpeed||25;let o;const s={},a={immediate:{},throttled:{},stopped:{}};function l(e,t){requestAnimationFrame(async()=>{if(!(void 0===e||Object.keys(e).length<=0))for(const[t,n]of Object.entries(e))n()})}const c=(u=async()=>{l(a.throttled)},d=i,h=Date.now(),function(){h+d-Date.now()<0&&(u(),h=Date.now())});var u,d,h;return window.addEventListener(t,()=>{"function"==typeof n&&n(),l(a.immediate),c(),clearTimeout(o),o=setTimeout(()=>{clearTimeout(o),l(a.stopped)},r)}),{addToRegistry:function(e,n,i){void 0!==a[e]?void 0===a[e][n]?"function"==typeof i?(a[e][n]=async()=>{i()},s[n]=e):console.error("registry:ERROR : this is not a valid callback : ",{registryKey:e,id:n,cb:i}):console.error(`${t}Registry:ERROR : id collision for : ${n} in ${e}`):console.error(`registry:ERROR : key does not exist (${e}) -- please use : ${Object.keys(a).join(", ")}`)},runRegistry:l,remove:function(e){if(void 0===s[e])return;const t=s[e];!function(e,t){void 0!==e[t]&&(delete e[t],delete s[t])}(a[t],e)}}}}),define("radical/component/throttle",[],function(){return function(e,t,n){var i,r,o,s=null,a=0;n||(n={});var l=function(){a=!1===n.leading?0:Date.now(),s=null,o=e.apply(i,r),s||(i=r=null)};return function(){var c=Date.now();a||!1!==n.leading||(a=c);var u=t-(c-a);return i=this,r=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),a=c,o=e.apply(i,r),s||(i=r=null)):s||!1===n.trailing||(s=setTimeout(l,u)),o}}}),define("radical/component/maffs",["radical/component/console"],function(e){return e.log("radical/component/maffs::loaded"),{roundToDec:function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n},roundTo2Dec:e=>roundTo(e,2),roundTo3Dec:e=>roundTo(e,3),roundTo4Dec:e=>roundTo(e,4),getRandomInt:(e,t)=>Math.floor(Math.random()*(t-e+1))+e}}),define("radical/component/resizeRegistry",["radical/component/spensiveRegistry","radical/component/throttle","radical/component/maffs","radical/component/console","radical/component/global"],function(e,t,n,i,r){i.log("radical/component/resizeRegistry::loaded");let o=n.roundToDec(window.innerHeight,2);const s={vH:o,vH_half:.5*o,vH_padded:1.5*o};const a=new e({event:"resize",runFirst:function(){o=n.roundToDec(window.innerHeight,2),s.vH=o,s.vH_half=n.roundToDec(.5*o,2),s.vH_padded=n.roundToDec(1.5*o,2)}});return{screenMetrics:s,getScreenMetrics:function(){return s},onResize:(e,t)=>
24{a.addToRegistry("immediate",e,t)},onResizeThrottled:(e,t)=>{a.addToRegistry("throttled",e,t)},onResizeStopped:(e,t)=>{a.addToRegistry("stopped",e,t)},remove:a.remove}}),define("radical/component/scrollRegistry",["radical/component/spensiveRegistry","radical/component/resizeRegistry","radical/component/throttle","radical/component/maffs","radical/component/console","radical/component/global"],function(e,t,n,i,r,o){r.log("radical/component/scrollRegistry::loaded");let s=!1,a=!1;const l=t.screenMetrics;let c=window.scrollY,u=c;const d={};async function h(){c=window.scrollY,d.docScrollTop=c,d.docScrollBottom=c+l.vH,d.docScrollMid=c+l.vH_half,d.isUp=c<u,d.isDown=!d.isUp,d.direction=d.isDown?"down":"up",u=c}h();const p=new e({event:"scroll",runFirst:h});return t.onResizeThrottled("updateScrollMetrics",()=>{h()}),{init:function(){s||(s=!0,a=o.getItem("prefersReducedMotion"),a=null!==a&&a)},scrollMetrics:d,onScroll:(e,t)=>{p.addToRegistry("immediate",e,t)},onScrollThrottled:(e,t)=>{p.addToRegistry("throttled",e,t)},onScrollStopped:(e,t)=>{p.addToRegistry("stopped",e,t)},remove:p.remove}}),define("radical/component/scrollProxy",["radical/component/console"],function(e){return e.log("radical/component/scrollProxy::loaded"),{scrollTo:function(t,n){e.log("radical/component/scrollInstance.scroller.scrollTo",t,n,"Warning - no scrollInertia module found, using proxy!"),window.scrollTo(0,t)},scrollToView:function(t,n=!1){e.log("radical/component/scrollInstance.scroller.scrollToView",t,n,"Warning - no scrollInertia module found, using proxy!"),t&&t.scrollIntoView?t.scrollIntoView({behavior:n?"auto":"smooth"}):e.warn("radical/component/scrollInstance.scroller.scrollToView - element is not scrollable",t)},scrollToPosition:function(t,n){e.log("radical/component/scrollInstance.scroller.scrollToPosition",t,n,"Warning - no scrollInertia module found, using proxy!"),window.scrollTo(t.x,t.y)},pause:function(){e.log("radical/component/scrollInstance.scroller.pause","Warning - no scrollInertia module found, using empty proxy!")},resume:function(){e.log("radical/component/scrollInstance.scroller.resume","Warning - no scrollInertia module found, using empty proxy!")},stop:function(){e.log("radical/component/scrollInstance.scroller.stop","Warning - no scrollInertia module found, using empty proxy!")},destroy:function(){e.log("radical/component/scrollInstance.scroller.destroy","Warning - no scrollInertia module found, using empty proxy!")}}}),define("radical/component/scrollInstance",["radical/component/console","radical/component/module/registry","radical/component/scrollProxy"],function(e,t,n){return e.log("radical/component/scrollInstance::loaded"),function(){let i=t.getModules("scrollInertia");return e.log("radical/component/scrollInstance() - loading scrollInertia mod instance",i&&i.length>0?i[0]:"none"),{hasScroller:i.length>=1,scroller:i.length>=1?i[0]:n}}}),define("radical/component/scrollJammer",["jquery","radical/component/console","radical/component/global","radical/component/scrollInstance"],function(e,t,n,i){t.log("radical/component/scrollJammer::loaded");var r,o=0;function s(n,r,s,a){t.log("radical/component/scrollJammer::scrollTo",n,r,s,a),r=void 0===r?o:r,s=void 0===s||s;var l=e(n),c=l.offset().top-r,u=navigator.appName.indexOf("Opera")>=0?"html":"html, body",d=function(){s&&(l.focus(),r>0&&window.scrollTo(0,c)),h.scroller.resume(),"function"==typeof a&&a(l)};let h=i();h.hasScroller?(t.log("radical/component/scrollJammer::scrollTo -> using scrollInertia scroller",n,c,r),h.scroller.pause(),window.scrollTo({left:0,top:c,behavior:"smooth"}),setTimeout(()=>{d(),h.scroller.resume()},600)):e(u).animate({scrollTop:c},600,d)}function a(e){return e.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")}return{init:function(){e(document).ready(function(){(r=n.getItem("edit_mode"))||function(t){const n=void 0===t?0:t;o=n;const i=a(location.pathname);e("body").on("click.scrolljammer touchstart.scrolljammer",'a[href^="#"]:not(".action_noscrollto")',function(t){const r=a(this.pathname)||i;if(i==r&&(location.hostname==this.hostname||!this.hostname)&&this.hash.replace(/#/,"")){const i=this.hash;let r=void 0!==e(this).data("scroll-offset")?e(this).data("offset"):n;r=e(this).hasClass("action_noscrolloffset")?0:r,i&&e(i).length>0&&(t.preventDefault(),s(i,r))}})}(e("#main_nav_wrap").height()+10)})},scrollTo:function(e,t,n,i){r||s(e,t,n,i)},destroy:function(){t.log("radical/component/scrollJammer::destroy")}}}),define("radical/component/oldBrowserWarning",["jquery","radical/component/console","radical/component/global"],function(e,t,n){return{init:function(){var t=n.getItem("UAjammer"),i=!1;switch(!0){case"chrome"==t.Browser.Name&&t.Browser.Version<48:case"safari"==t.Browser.Name&&t.Browser.Version<9:case"firefox"==t.Browser.Name&&t.Browser.Version<38:case"msie"==t.Browser.Name&&t.Browser.Version<11:i=!0}switch(i&&e("body").addClass("old_browser"),!0){case"msie"==t.Browser.Name:case"edge"==t.Browser.Name:e.getScript("/js/rad-svgxuse.min.js")}}}}),define("radical/component/cssload",[],function(){return function(e,t){$("head").append($('<link rel="stylesheet" type="text/css" />').attr("href",e)),"function"==typeof t&&t()}}),define("radical/component/inarray",[],function(){return function(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}}),define("radical/component/egg/loader",["radical/component/console","radical/component/global","radical/component/cssload","radical/component/inarray","jquery"],function(e,t,n,i,r){var o,s=[[38,38,40,40,37,39,37,39,66,65],[69,71,71,83]],a=!1,l=[];function c(t){!function(){try{clearTimeout(o)}catch(t){e.warn(t)}}(),l.push(t.keyCode),o=setTimeout(u,500)}function u(){for(var e=0;e<s.length&&!a;e++)a||l.join("")!==s[e].join("")||d();a&&r(document).trigger("egg.run",[l.join(""),r,require,define]),l=[]}function d(e){if(!a){var i=t.getItem("cssTs");n("/css/egg.css?ts="+i),require(["/js/egg.js?ts="+i],function(){a=!0,r(document).trigger("egg.init",[r,require,define]),"function"==typeof e&&e()})}}return r(function(){r(document).on("keyup",c)}),{getEggified:d}}),define("radical/component/keycodes",[],function(){var e={currentCode:void 0,keys:{tab:9,esc:27,escape:27,space:32,ent:13,enter:13,arrowup:38,arrowright:39,arrowdown:40,arrowleft:37,home:36,end:35},getKeyCode:function(e){return e=void 0!==e?e:window.event,this.currentCode=e.which||e.keyCode,this.currentCode},getKeyValue:function(t){return String.fromCharCode(e.getKeyCode(t))},isKey:function(e,t){return void 0!==e&&(t=void 0!==(t=void 0!==t?t:this.currentCode)?t:this.getKeyCode())===this.keys[e.toLowerCase()]}};return e}),define("radical/component/guid",[],function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}),define("radical/component/aria-helper",["jquery","radical/component/guid"],function(e,t){const n=["table","td","fieldset","svg a","a[href]","area[href]","input","select","textarea","button","iframe","object","embed","keygen","audio[controls]","video[controls]","summary","details","canvas",'[tabindex]:not
vendor: 22,545 bytes, lines 24-30
24([tabindex="-1"])',"[contenteditable]",'[role="button"]','[role*="menuitem"]',"[aria-controls]","[data-focusable]"],i=n.join(",");return{focusableSelectors:n,focusableSelector:i,focusableSelectorsString:i,dir:e("html").attr("dir")||"rtl",getFocusedElement:function(){return document.activeElement},getFocusableElements:function(e){return e.find(i).not('[disabled], [aria-hidden="true"]')}}}),define("radical/component/aria-popup",["jquery","radical/component/keycodes","radical/component/aria-helper","radical/component/guid"],function(e,t,n,i){function r(e,t,n,i){void 0!==e&&(e.attr("aria-hidden","true"),t.attr("aria-expanded","false"),n&&($proximalTrigger=void 0!==e.data("proximal-trigger")?e.data("proximal-trigger"):t.first(),void 0!==$proximalTrigger&&$proximalTrigger.focus()),"function"==typeof i&&i(e,t,i))}function o(e,t,n,i,o){let a;"true"===e.attr("aria-hidden")?(a=void 0!==o?o.onExpand:void 0,function(e,t,n,i,r){if(e.attr("aria-hidden","false"),t.attr("aria-expanded","true"),e.data("proximal-trigger",void 0!==i?i:t.first()),n){const t=s(e);t.first().length>=1&&setTimeout(()=>{t.first().focus()},100)}"function"==typeof r&&r(e,t,r)}(e,t,n,i,a)):(a=void 0!==o?o.onCollapse:void 0,r(e,t,n,a))}function s(e){return n.getFocusableElements(e)}return function(n,a){const l=e(n);void 0===l.attr("id")&&l.attr("id",i()),(a=a||{}).callbacks=a.callbacks||{},l.attr("aria-hidden");var c=l.attr("id"),u=e('[aria-controls*="'+c+'"], [role="menuitem"][aria-haspopup="true"] > #'+c),d=s(l),h=d.length>0,p=[],f=[],m="menu"==a.type||"menu"===l.attr("role"),g={onExpand:a.callbacks.onExpand||null,onCollapse:a.callbacks.onCollapse||null},v={collapse:function(e,t){r(l,u,e,t||g.onCollapse)},expand:function(e,t,n){o(l,u,e,t,n||g.onExpand)},toggle:function(e,t,n){o(l,u,e,t,n||g)}};h&&d.each(function(){const t=void 0!==e(this).attr("aria-label")?e(this).attr("aria-label"):e(this).text().trim(),n=t.length>0?t[0].toLowerCase():null;p.push(n)}),u.each(function(){f.push(e(this)[0])});let y=!1;return l.on("keydown",function(n){t.getKeyCode(n);let i=!1,r=!1,o=e(n.target).is("textarea, select, input"),s=t.getKeyValue(n).toLowerCase(),a=function(e){const t=new RegExp(/^[A-Za-z0-9]+$/);return!(null==e||e.length<=0)&&t.test(e)}(s),l=d.length-1,c=h?d.index(n.target):0,u=h?c+1>l?0:c+1:0,f=h?c-1<0?l:c-1:0;if(h&&m&&!o)if(i=!0,r=!0,t.isKey("esc"))v.collapse(!0,g.onCollapse);else if(t.isKey("arrowdown")||t.isKey("arrowright"))d.eq(u).focus();else if(t.isKey("arrowup")||t.isKey("arrowleft"))d.eq(f).focus();else if(t.isKey("home"))d.eq(0).focus();else if(t.isKey("end"))d.eq(l).focus();else if(a&&p.indexOf(s)>=0){let e=p.indexOf(s);e=c===e?Math.max(e,p.indexOf(s,c+1)):e,d.eq(e).focus()}else i=!1,r=!1;i&&n.stopPropagation(),r&&n.preventDefault()}),u.on("click",function(t){y||(v.toggle(!0,e(this),g),t.preventDefault(),t.stopPropagation())}).on("keypress",function(n){t.getKeyCode(n);(t.isKey("enter")||t.isKey("space"))&&(y=!0,v.toggle(!1,e(this),g),n.stopPropagation(),n.preventDefault(),setTimeout(()=>{y=!1},200))}),{expand:v.expand,collapse:v.collapse,toggle:v.toggle,destroy:function(){logger.log("radical/module/aria-popup::destroy")}}}}),define("radical/module/aria-popup",["jquery","radical/component/console","radical/component/aria-popup"],function(e,t,n){return function(i,r){t.log("radical/module/aria-popup::init",i,r),e(i);var o=n(i,r);return{expand:o.expand,collapse:o.collapse,toggle:o.toggle,destroy:function(){t.log("radical/module/aria-popup::destroy")}}}}),define("radical/module/image",["jquery","radical/component/console","radical/component/lazyload"],function(e,t,n){return function(e,i){if(t.log("radical/component/image::init"),"scroll"==i.loadOn){n.loadOnScroll(e,!0,function(e,t){if(e)throw e})}return{destroy:function(){t.log("radical/component/image::destroy")}}}}),define("radical/module/backgroundImage",["jquery","radical/component/console","radical/component/srcset"],function(e,t,n){return function(t,i){var r=e(t),o=void 0!==i.minWidth?1*i.minWidth:640,s="scrollThrottled."+("bgsrcinstid"+r.data("srcset").replace(/\W+/g,"")+Math.round(1e3*Math.random(0,1e3)));function a(t){if(t.inView(100)){var i=n.chooseSrc(t,o);if(void 0!==i){var r=new Image;r.onload=function(){t.css({"background-image":"url("+r.src+")"}).trigger("backgroundImageSrcAdded").data("backgroundImageAdded",!0).addClass("backgroundImageAdded")},r.src=i,e(window).off(s)}}}return e(window).on(s,function(){a(r)}),a(r),{destroy:function(){r.css({"background-image":"none"})}}}}), 25/** 26 * @license 27 * Copyright 2010-2022 Three.js Authors 28 * SPDX-License-Identifier: MIT 29 */ 30global=this,factory=function(e){"use strict";const t="138",n=100,i=101,r=102,o=200,s=201,a=202,l=203,c=204,u=205,d=206,h=207,p=208,f=209,m=210,g=300,v=301,y=302,_=303,x=304,b=306,w=307,T=1e3,S=1001,E=1002,M=1003,A=1004,R=1005,C=1006,L=1007,P=1008,I=1009,k=1012,D=1014,O=1015,N=1016,F=1020,U=1023,B=1026,H=1027,z=33776,G=33777,V=33778,W=33779,j=35840,q=35841,X=35842,$=35843,Y=37492,J=37496,Z=37808,K=37809,Q=37810,ee=37811,te=37812,ne=37813,ie=37814,re=37815,oe=37816,se=37817,ae=37818,le=37819,ce=37820,ue=37821,de=36492,he=2300,pe=2301,fe=2302,me=2400,ge=2401,ve=2402,ye=2500,_e=2501,xe=3e3,be=3001,we=7680,Te=35044,Se=35048,Ee="300 es",Me=1035;class Ae{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,i=n.length;t<i;t++)n[t].call(this,e);e.target=null}}}const Re=[];for(let e=0;e<256;e++)Re[e]=(e<16?"0":"")+e.toString(16);let Ce=1234567;const Le=Math.PI/180,Pe=180/Math.PI;function Ie(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(Re[255&e]+Re[e>>8&255]+Re[e>>16&255]+Re[e>>24&255]+"-"+Re[255&t]+Re[t>>8&255]+"-"+Re[t>>16&15|64]+Re[t>>24&255]+"-"+Re[63&n|128]+Re[n>>8&255]+"-"+Re[n>>16&255]+Re[n>>24&255]+Re[255&i]+Re[i>>8&255]+Re[i>>16&255]+Re[i>>24&255]).toUpperCase()}function ke(e,t,n){return Math.max(t,Math.min(n,e))}function De(e,t){return(e%t+t)%t}function Oe(e,t,n){return(1-n)*e+n*t}function Ne(e){return!(e&e-1)&&0!==e}function Fe(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Ue(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var Be=Object.freeze({__proto__:null,DEG2RAD:Le,RAD2DEG:Pe,generateUUID:Ie,clamp:ke,euclideanModulo:De,mapLinear:function(e,t,n,i,r){return i+(e-t)*(r-i)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:Oe,damp:function(e,t,n,i){return Oe(e,t,1-Math.exp(-n*i))},pingpong:function(e,t=1){return t-Math.abs(De(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){return void 0!==e&&(Ce=e%2147483647),Ce=16807*Ce%2147483647,(Ce-1)/2147483646},degToRad:function(e){return e*Le},radToDeg:function(e){return e*Pe},isPowerOfTwo:Ne,ceilPowerOfTwo:Fe,floorPowerOfTwo:Ue,setQuaternionFromProperEuler:function(e,t,n,i,r){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((t+i)/2),u=s((t+i)/2),d=o((t-i)/2),h=s((t-i)/2),p=o((i-t)/2),f=s((i-t)/2);switch(r){case"XYX":e.set(a*u,l*d,l*h,a*c);break;case"YZY":e.set(l*h,a*u,l*d,a*c);break;case"ZXZ":e.set(l*d,l*h,a*u,a*c);break;case"XZX":e.set(a*u,l*f,l*p,a*c);break;case"YXY":e.set(l*p,a*u,l*f,a*c);break;case"ZYZ":e.set(l*f,l*p,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}});class He{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=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}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*n-o*i+e.x,this.y=r*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}He.prototype.isVector2=!0;class ze{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,r,o,s,a,l){const c=this.elements;return c[0]=e,c[1]=i,c[2]=s,c[3]=t,c[4]=r,c[5]=a,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],s=n[3],a=n[6],l=n[1],c=n[4],u=n[7],d=n[2],h=n[5],p=n[8],f=i[0],m=i[3],g=i[6],v=i[1],y=i[4],_=i[7],x=i[2],b=i[5],w=i[8];return r[0]=o*f+s*v+a*x,r[3]=o*m+s*y+a*b,r[6]=o*g+s*_+a*w,r[1]=l*f+c*v+u*x,r[4]=l*m+c*y+u*b,r[7]=l*g+c*_+u*w,r[2]=d*f+h*v+p*x,r[5]=d*m+h*y+p*b,r[8]=d*g+h*_+p*w,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*o*c-t*s*l-n*r*c+n*s*a+i*r*l-i*o*a}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=c*o-s*l,d=s*a-c*r,h=l*r-o*a,p=t*u+n*d+i*h;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=u*f,e[1]=(i*l-c*n)*f,e[2]=(s*n-i*o)*f,e[3]=d*f,e[4]=(c*t-i*a)*f,e[5]=(i*r-s*t)*f,e[6]=h*f,e[7]=(n*a-l*t)*f,e[8]=(o*t-n*r)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,o,s){const a=Math.cos(r),l=Math.sin(r);return this.set(n*a,n*l,-n*(a*o+l*s)+o+e,-i*l,i*a,-i*(-l*o+a*s)+s+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),i=this.elements,r=i[0],o=i[3],s=i[6],a=i[1],l=i[4],c=i[7];return i[0]=t*r+n*a,i[3]=t*o+n*l,i[6]=t*s+n*c,i[1]=-n*r+t*a,i[4]=-n*o+t*l,i[7]=-n*s+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}function Ge(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}ze.prototype.isMatrix3=!0;const Ve={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function We(e,t){return new Ve[e](t)}function je(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Xe={h:0,s:0,l:0},$e={h:0,s:0,l:0};function Ye(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Je(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Ze(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Ke{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=De(e,1),t=ke(t,0,1),n=ke(n,0,1),0===t)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i;this.r=Ye(r,i,e+1/3),this.g=Ye(r,i,e),this.b=Ye(r,i,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const i=n[1],r=n[2];switch(i){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r)){const n=parseFloat(e[1])/360,i=parseInt(e[2],10)/100,r=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(n,i,r)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=n[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=qe[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Je(e.r),this.g=Je(e.g),this.b=Je(e.b),this}copyLinearToSRGB(e){return this.r=Ze(e.r),this.g=Ze(e.g),this.b=Ze(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,n=this.g,i=this.b,r=Math.max(t,n,i),o=Math.min(t,n,i);let s,a;const l=(o+r)/2;if(o===r)s=0,a=0;else{const e=r-o;switch(a=l<=.5?e/(r+o):e/(2-r-o),r){case t:s=(n-i)/e+(n<i?6:0);break;case n:s=(i-t)/e+2;break;case i:s=(t-n)/e+4}s/=6}return e.h=s,e.s=a,e.l=l,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(Xe),Xe.h+=e,Xe.s+=t,Xe.l+=n,this.setHSL(Xe.h,Xe.s,Xe.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Xe),e.getHSL($e);const n=Oe(Xe.h,$e.h,t),i=Oe(Xe.s,$e.s,t),r=Oe(Xe.l,$e.l,t);return this.setHSL(n,i,r),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}let Qe;
vendor: 5,470 bytes, line 30
30Ke.NAMES=qe,Ke.prototype.isColor=!0,Ke.prototype.r=1,Ke.prototype.g=1,Ke.prototype.b=1;class et{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Qe&&(Qe=je("canvas")),Qe.width=e.width,Qe.height=e.height;const n=Qe.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Qe}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=je("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let e=0;e<r.length;e++)r[e]=255*Je(r[e]/255);return n.putImageData(i,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Je(t[e]/255)):t[e]=Je(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}class tt{constructor(e=null){this.uuid=Ie(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(null!==i){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t<n;t++)i[t].isDataTexture?e.push(nt(i[t].image)):e.push(nt(i[t]))}else e=nt(i);n.url=e}return t||(e.images[this.uuid]=n),n}}function nt(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?et.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}tt.prototype.isSource=!0;let it=0;class rt extends Ae{constructor(e=rt.DEFAULT_IMAGE,t=rt.DEFAULT_MAPPING,n=1001,i=1001,r=1006,o=1008,s=1023,a=1009,l=1,c=3e3){super(),Object.defineProperty(this,"id",{value:it++}),this.uuid=Ie(),this.name="",this.source=new tt(e),this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=o,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=a,this.offset=new He(0,0),this.repeat=new He(1,1),this.center=new He(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==g)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case T:e.x=e.x-Math.floor(e.x);break;case S:e.x=e.x<0?0:1;break;case E:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case T:e.y=e.y-Math.floor(e.y);break;case S:e.y=e.y<0?0:1;break;case E:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}rt.DEFAULT_IMAGE=null,rt.DEFAULT_MAPPING=g,rt.prototype.isTexture=!0;
vendor: 4,188 bytes, line 30
30class ot{constructor(e=0,t=0,n=0,i=1){this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r;const o=.01,s=.1,a=e.elements,l=a[0],c=a[4],u=a[8],d=a[1],h=a[5],p=a[9],f=a[2],m=a[6],g=a[10];if(Math.abs(c-d)<o&&Math.abs(u-f)<o&&Math.abs(p-m)<o){if(Math.abs(c+d)<s&&Math.abs(u+f)<s&&Math.abs(p+m)<s&&Math.abs(l+h+g-3)<s)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,a=(h+1)/2,v=(g+1)/2,y=(c+d)/4,_=(u+f)/4,x=(p+m)/4;return e>a&&e>v?e<o?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(e),i=y/n,r=_/n):a>v?a<o?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(a),n=y/i,r=x/i):v<o?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(v),n=_/r,i=x/r),this.set(n,i,r,t),this}let v=Math.sqrt((m-p)*(m-p)+(u-f)*(u-f)+(d-c)*(d-c));return Math.abs(v)<.001&&(v=1),this.x=(m-p)/v,this.y=(u-f)/v,this.z=(d-c)/v,this.w=Math.acos((l+h+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}
vendor: 5,599 bytes, line 30
30roundToZero(){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.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}ot.prototype.isVector4=!0;class st extends Ae{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new ot(0,0,e,t),this.scissorTest=!1,this.viewport=new ot(0,0,e,t);const i={width:e,height:t,depth:1};this.texture=new rt(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:C,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=Object.assign({},e.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}st.prototype.isWebGLRenderTarget=!0;class at extends rt{constructor(e=null,t=1,n=1,i=1){super(null),this.image={data:e,width:t,height:n,depth:i},this.magFilter=M,this.minFilter=M,this.wrapR=S,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}at.prototype.isDataArrayTexture=!0;class lt extends st{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new at(null,e,t,n),this.texture.isRenderTargetTexture=!0}}lt.prototype.isWebGLArrayRenderTarget=!0;class ct extends rt{constructor(e=null,t=1,n=1,i=1){super(null),this.image={data:e,width:t,height:n,depth:i},this.magFilter=M,this.minFilter=M,this.wrapR=S,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}ct.prototype.isData3DTexture=!0;class ut extends st{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new ct(null,e,t,n),this.texture.isRenderTargetTexture=!0}}ut.prototype.isWebGL3DRenderTarget=!0;class dt extends st{constructor(e,t,n,i={}){super(e,t,i);const r=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=r.clone(),this.texture[e].isRenderTargetTexture=!0}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.texture.length;i<r;i++)this.texture[i].image.width=e,this.texture[i].image.height=t,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}dt.prototype.isWebGLMultipleRenderTargets=!0;class ht{constructor(e=0,t=0,n=0,i=1){this._x=e,this._y=t,this._z=n,this._w=i}static slerp(e,t,n,i){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,i)}static slerpFlat(e,t,n,i,r,o,s){let a=n[i+0],l=n[i+1],c=n[i+2],u=n[i+3];const d=r[o+0],h=r[o+1],p=r[o+2],f=r[o+3];if(0===s)return e[t+0]=a,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===s)return e[t+0]=d,e[t+1]=h,e[t+2]=p,void(e[t+3]=f);if(u!==f||a!==d||l!==h||c!==p){let e=1-s;const t=a*d+l*h+c*p+u*f,n=t>=0?1:-1,i=1-t*t;if(i>Number.EPSILON){const r=Math.sqrt(i),o=Math.atan2(r,t*n);e=Math.sin(e*o)/r,s=Math.sin(s*o)/r}const r=s*n;
vendor: 9,484 bytes, line 30
30if(a=a*e+d*r,l=l*e+h*r,c=c*e+p*r,u=u*e+f*r,e===1-s){const e=1/Math.sqrt(a*a+l*l+c*c+u*u);a*=e,l*=e,c*=e,u*=e}}e[t]=a,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,i,r,o){const s=n[i],a=n[i+1],l=n[i+2],c=n[i+3],u=r[o],d=r[o+1],h=r[o+2],p=r[o+3];return e[t]=s*p+c*u+a*h-l*d,e[t+1]=a*p+c*d+l*u-s*h,e[t+2]=l*p+c*h+s*d-a*u,e[t+3]=c*p-s*u-a*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,i=e._y,r=e._z,o=e._order,s=Math.cos,a=Math.sin,l=s(n/2),c=s(i/2),u=s(r/2),d=a(n/2),h=a(i/2),p=a(r/2);switch(o){case"XYZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"YXZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"ZXY":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"ZYX":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"YZX":this._x=d*c*u+l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u-d*h*p;break;case"XZY":this._x=d*c*u-l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u+d*h*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],o=t[1],s=t[5],a=t[9],l=t[2],c=t[6],u=t[10],d=n+s+u;if(d>0){const e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(c-a)*e,this._y=(r-l)*e,this._z=(o-i)*e}else if(n>s&&n>u){const e=2*Math.sqrt(1+n-s-u);this._w=(c-a)/e,this._x=.25*e,this._y=(i+o)/e,this._z=(r+l)/e}else if(s>u){const e=2*Math.sqrt(1+s-n-u);this._w=(r-l)/e,this._x=(i+o)/e,this._y=.25*e,this._z=(a+c)/e}else{const e=2*Math.sqrt(1+u-n-s);this._w=(o-i)/e,this._x=(r+l)/e,this._y=(a+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ke(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,o=e._w,s=t._x,a=t._y,l=t._z,c=t._w;return this._x=n*c+o*s+i*l-r*a,this._y=i*c+o*a+r*s-n*l,this._z=r*c+o*l+n*a-i*s,this._w=o*c-n*s-i*a-r*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,i=this._y,r=this._z,o=this._w;let s=o*e._w+n*e._x+i*e._y+r*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const a=1-s*s;if(a<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*i+t*this._y,this._z=e*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(a),c=Math.atan2(l,s),u=Math.sin((1-t)*c)/l,d=Math.sin(t*c)/l;return this._w=o*u+this._w*d,this._x=n*u+this._x*d,this._y=i*u+this._y*d,this._z=r*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(i),n*Math.sin(r),n*Math.cos(r),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}ht.prototype.isQuaternion=!0;class pt{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(mt.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(mt.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,o=e.y,s=e.z,a=e.w,l=a*t+o*i-s*n,c=a*n+s*t-r*i,u=a*i+r*n-o*t,d=-r*t-o*n-s*i;return this.x=l*a+d*-r+c*-s-u*-o,this.y=c*a+d*-o+u*-r-l*-s,this.z=u*a+d*-s+l*-o-c*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}
vendor: 5,415 bytes, line 30
30round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,o=t.x,s=t.y,a=t.z;return this.x=i*a-r*s,this.y=r*o-n*a,this.z=n*s-i*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ft.copy(this).projectOnVector(e),this.sub(ft)}reflect(e){return this.sub(ft.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ke(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}pt.prototype.isVector3=!0;const ft=new pt,mt=new ht;class gt{constructor(e=new pt(1/0,1/0,1/0),t=new pt(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,i=1/0,r=-1/0,o=-1/0,s=-1/0;for(let a=0,l=e.length;a<l;a+=3){const l=e[a],c=e[a+1],u=e[a+2];l<t&&(t=l),c<n&&(n=c),u<i&&(i=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(t,n,i),this.max.set(r,o,s),this}setFromBufferAttribute(e){let t=1/0,n=1/0,i=1/0,r=-1/0,o=-1/0,s=-1/0;for(let a=0,l=e.count;a<l;a++){const l=e.getX(a),c=e.getY(a),u=e.getZ(a);l<t&&(t=l),c<n&&(n=c),u<i&&(i=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(t,n,i),this.max.set(r,o,s),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=yt.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n)if(t&&null!=n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,i=t.count;n<i;n++)yt.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(yt)}else null===n.boundingBox&&n.computeBoundingBox(),_t.copy(n.boundingBox),_t.applyM
vendor: 4,426 bytes, line 30
30atrix4(e.matrixWorld),this.union(_t);const i=e.children;for(let e=0,n=i.length;e<n;e++)this.expandByObject(i[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,yt),yt.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Mt),At.subVectors(this.max,Mt),xt.subVectors(e.a,Mt),bt.subVectors(e.b,Mt),wt.subVectors(e.c,Mt),Tt.subVectors(bt,xt),St.subVectors(wt,bt),Et.subVectors(xt,wt);let t=[0,-Tt.z,Tt.y,0,-St.z,St.y,0,-Et.z,Et.y,Tt.z,0,-Tt.x,St.z,0,-St.x,Et.z,0,-Et.x,-Tt.y,Tt.x,0,-St.y,St.x,0,-Et.y,Et.x,0];return!!Lt(t,xt,bt,wt,At)&&(t=[1,0,0,0,1,0,0,0,1],!!Lt(t,xt,bt,wt,At)&&(Rt.crossVectors(Tt,St),t=[Rt.x,Rt.y,Rt.z],Lt(t,xt,bt,wt,At)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return yt.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(yt).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(vt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),vt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),vt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),vt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),vt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),vt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),vt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),vt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(vt)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}gt.prototype.isBox3=!0;const vt=[new pt,new pt,new pt,new pt,new pt,new pt,new pt,new pt],yt=new pt,_t=new gt,xt=new pt,bt=new pt,wt=new pt,Tt=new pt,St=new pt,Et=new pt,Mt=new pt,At=new pt,Rt=new pt,Ct=new pt;function Lt(e,t,n,i,r){for(let o=0,s=e.length-3;o<=s;o+=3){Ct.fromArray(e,o);const s=r.x*Math.abs(Ct.x)+r.y*Math.abs(Ct.y)+r.z*Math.abs(Ct.z),a=t.dot(Ct),l=n.dot(Ct),c=i.dot(Ct);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>s)return!1}return!0}const Pt=new gt,It=new pt,kt=new pt,Dt=new pt;class Ot{constructor(e=new pt,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Pt.setFromPoints(e).getCenter(n);let i=0;for(let t=0,r=e.length;t<r;t++)i=Math.max(i,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}
vendor: 6,784 bytes, line 30
30applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Dt.subVectors(e,this.center);const t=Dt.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Dt.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return!0===this.center.equals(e.center)?kt.set(0,0,1).multiplyScalar(e.radius):kt.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(It.copy(e.center).add(kt)),this.expandByPoint(It.copy(e.center).sub(kt)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Nt=new pt,Ft=new pt,Ut=new pt,Bt=new pt,Ht=new pt,zt=new pt,Gt=new pt;class Vt{constructor(e=new pt,t=new pt(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Nt)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Nt.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Nt.copy(this.direction).multiplyScalar(t).add(this.origin),Nt.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Ft.copy(e).add(t).multiplyScalar(.5),Ut.copy(t).sub(e).normalize(),Bt.copy(this.origin).sub(Ft);const r=.5*e.distanceTo(t),o=-this.direction.dot(Ut),s=Bt.dot(this.direction),a=-Bt.dot(Ut),l=Bt.lengthSq(),c=Math.abs(1-o*o);let u,d,h,p;if(c>0)if(u=o*a-s,d=o*s-a,p=r*c,u>=0)if(d>=-p)if(d<=p){const e=1/c;u*=e,d*=e,h=u*(u+o*d+2*s)+d*(o*u+d+2*a)+l}else d=r,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d=-r,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d<=-p?(u=Math.max(0,-(-o*r+s)),d=u>0?-r:Math.min(Math.max(-r,-a),r),h=-u*u+d*(d+2*a)+l):d<=p?(u=0,d=Math.min(Math.max(-r,-a),r),h=d*(d+2*a)+l):(u=Math.max(0,-(o*r+s)),d=u>0?r:Math.min(Math.max(-r,-a),r),h=-u*u+d*(d+2*a)+l);else d=o>0?-r:r,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),i&&i.copy(Ut).multiplyScalar(d).add(Ft),h}intersectSphere(e,t){Nt.subVectors(e.center,this.origin);const n=Nt.dot(this.direction),i=Nt.dot(Nt)-n*n,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),s=n-o,a=n+o;return s<0&&a<0?null:s<0?this.at(a,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,o,s,a;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,i=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,i=(e.min.x-d.x)*l),c>=0?(r=(e.min.y-d.y)*c,o=(e.max.y-d.y)*c):(r=(e.max.y-d.y)*c,o=(e.min.y-d.y)*c),n>o||r>i?null:((r>n||n!=n)&&(n=r),(o<i||i!=i)&&(i=o),u>=0?(s=(e.min.z-d.z)*u,a=(e.max.z-d.z)*u):(s=(e.max.z-d.z)*u,a=(e.min.z-d.z)*u),n>a||s>i?null:((s>n||n!=n)&&(n=s),(a<i||i!=i)&&(i=a),i<0?null:this.at(n>=0?n:i,t)))}intersectsBox(e){return null!==this.intersectBox(e,Nt)}intersectTriangle(e,t,n,i,r){Ht.subVectors(t,e),zt.subVectors(n,e),Gt.crossVectors(Ht,zt);let o,s=this.direction.dot(Gt);if(s>0){if(i)return null;o=1}else{if(!(s<0))return null;o=-1,s=-s}Bt.subVectors(this.origin,e);const a=o*this.direction.dot(zt.crossVectors(Bt,zt));if(a<0)return null;const l=o*this.direction.dot(Ht.cross(Bt));if(l<0)return null;if(a+l>s)return null;const c=-o*Bt.dot(Gt);return c<0?null:this.at(c/s,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Wt{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=i,g[1]=r,g[5]=o,g[9]=s,g[13]=a,g[2]=l,g[6]=c,g[10]=u,g[14]=d,g[3]=h,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Wt).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/jt.setFromMatrixColumn(e,0).length(),r=1/jt.setFromMatrixColumn(e,1).length(),o=1/jt.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,i=e.y,r=e.z,o=Math.cos(n),s=Math.sin(n),a=Math.cos(i),l=Math.sin(i),c=Math.cos(r),u=Math.sin(r);if("XYZ"===e.order){const e=o*c,n=o*u,i=s*c,r=s*u;t[0]=a*c,t[4]=-a*u,t[8]=l,t[1]=n+i*l,t[5]=e-r*l,t[9]=-s*a,t[2]=r-e*l,t[6]=i+n*l,t[10]=o*a}else if("YXZ"===e.order){const e=a*c,n=a*u,i=l*c,r=l*u;t[0]=e+r*s,t[4]=i*s-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-s,t[2]=n*s-i,t[6]=r+e*s,t[10]=o*a}else if("ZXY"===e.order){const e=a*c,n=a*u,i=l*c,r=l*u;t[0]=e-r*s,t[4]=-o*u,t[8]=i+n*s,t[1]=n+i*s,t[5]=o*c,t[9]=r-e*s,t[2]=-o*l,t[6]=s,t[10]=o*a}else if("ZYX"===e.order){const e=o*c,n=o*u,i=s*c,r=s*u;t[0]=a*c,t[4]=i*l-n,t[8]=e*l+r,t[1]=a*u,t[5]=r*l+e,t[9]=n*l-i,t[2]=-l,t[6]=s*a,t[10]=o*a}
vendor: 5,511 bytes, line 30
30else if("YZX"===e.order){const e=o*a,n=o*l,i=s*a,r=s*l;t[0]=a*c,t[4]=r-e*u,t[8]=i*u+n,t[1]=u,t[5]=o*c,t[9]=-s*c,t[2]=-l*c,t[6]=n*u+i,t[10]=e-r*u}else if("XZY"===e.order){const e=o*a,n=o*l,i=s*a,r=s*l;t[0]=a*c,t[4]=-u,t[8]=l*c,t[1]=e*u+r,t[5]=o*c,t[9]=n*u-i,t[2]=i*u-n,t[6]=s*c,t[10]=r*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Xt,e,$t)}lookAt(e,t,n){const i=this.elements;return Zt.subVectors(e,t),0===Zt.lengthSq()&&(Zt.z=1),Zt.normalize(),Yt.crossVectors(n,Zt),0===Yt.lengthSq()&&(1===Math.abs(n.z)?Zt.x+=1e-4:Zt.z+=1e-4,Zt.normalize(),Yt.crossVectors(n,Zt)),Yt.normalize(),Jt.crossVectors(Zt,Yt),i[0]=Yt.x,i[4]=Jt.x,i[8]=Zt.x,i[1]=Yt.y,i[5]=Jt.y,i[9]=Zt.y,i[2]=Yt.z,i[6]=Jt.z,i[10]=Zt.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],s=n[4],a=n[8],l=n[12],c=n[1],u=n[5],d=n[9],h=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],x=n[15],b=i[0],w=i[4],T=i[8],S=i[12],E=i[1],M=i[5],A=i[9],R=i[13],C=i[2],L=i[6],P=i[10],I=i[14],k=i[3],D=i[7],O=i[11],N=i[15];return r[0]=o*b+s*E+a*C+l*k,r[4]=o*w+s*M+a*L+l*D,r[8]=o*T+s*A+a*P+l*O,r[12]=o*S+s*R+a*I+l*N,r[1]=c*b+u*E+d*C+h*k,r[5]=c*w+u*M+d*L+h*D,r[9]=c*T+u*A+d*P+h*O,r[13]=c*S+u*R+d*I+h*N,r[2]=p*b+f*E+m*C+g*k,r[6]=p*w+f*M+m*L+g*D,r[10]=p*T+f*A+m*P+g*O,r[14]=p*S+f*R+m*I+g*N,r[3]=v*b+y*E+_*C+x*k,r[7]=v*w+y*M+_*L+x*D,r[11]=v*T+y*A+_*P+x*O,r[15]=v*S+y*R+_*I+x*N,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],o=e[1],s=e[5],a=e[9],l=e[13],c=e[2],u=e[6],d=e[10],h=e[14];return e[3]*(+r*a*u-i*l*u-r*s*d+n*l*d+i*s*h-n*a*h)+e[7]*(+t*a*h-t*l*d+r*o*d-i*o*h+i*l*c-r*a*c)+e[11]*(+t*l*u-t*s*h-r*o*u+n*o*h+r*s*c-n*l*c)+e[15]*(-i*s*c-t*a*u+t*s*d+i*o*u-n*o*d+n*a*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],p=e[12],f=e[13],m=e[14],g=e[15],v=u*m*l-f*d*l+f*a*h-s*m*h-u*a*g+s*d*g,y=p*d*l-c*m*l-p*a*h+o*m*h+c*a*g-o*d*g,_=c*f*l-p*u*l+p*s*h-o*f*h-c*s*g+o*u*g,x=p*u*a-c*f*a-p*s*d+o*f*d+c*s*m-o*u*m,b=t*v+n*y+i*_+r*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/b;return e[0]=v*w,e[1]=(f*d*r-u*m*r-f*i*h+n*m*h+u*i*g-n*d*g)*w,e[2]=(s*m*r-f*a*r+f*i*l-n*m*l-s*i*g+n*a*g)*w,e[3]=(u*a*r-s*d*r-u*i*l+n*d*l+s*i*h-n*a*h)*w,e[4]=y*w,e[5]=(c*m*r-p*d*r+p*i*h-t*m*h-c*i*g+t*d*g)*w,e[6]=(p*a*r-o*m*r-p*i*l+t*m*l+o*i*g-t*a*g)*w,e[7]=(o*d*r-c*a*r+c*i*l-t*d*l-o*i*h+t*a*h)*w,e[8]=_*w,e[9]=(p*u*r-c*f*r-p*n*h+t*f*h+c*n*g-t*u*g)*w,e[10]=(o*f*r-p*s*r+p*n*l-t*f*l-o*n*g+t*s*g)*w,e[11]=(c*s*r-o*u*r-c*n*l+t*u*l+o*n*h-t*s*h)*w,e[12]=x*w,e[13]=(c*f*i-p*u*i+p*n*d-t*f*d-c*n*m+t*u*m)*w,e[14]=(p*s*i-o*f*i-p*n*a+t*f*a+o*n*m-t*s*m)*w,e[15]=(o*u*i-c*s*i+c*n*a-t*u*a-o*n*d+t*s*d)*w,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,o=e.x,s=e.y,a=e.z,l=r*o,c=r*s;return this.set(l*o+n,l*s-i*a,l*a+i*s,0,l*s+i*a,c*s+n,c*a-i*o,0,l*a-i*s,c*a+i*o,r*a*a+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,o){return this.set(1,n,r,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,o=t._y,s=t._z,a=t._w,l=r+r,c=o+o,u=s+s,d=r*l,h=r*c,p=r*u,f=o*c,m=o*u,g=s*u,v=a*l,y=a*c,_=a*u,x=n.x,b=n.y,w=n.z;return i[0]=(1-(f+g))*x,i[1]=(h+_)*x,i[2]=(p-y)*x,i[3]=0,i[4]=(h-_)*b,i[5]=(1-(d+g))*b,i[6]=(m+v)*b,i[7]=0,i[8]=(p+y)*w,i[9]=(m-v)*w,i[10]=(1-(d+f))*w,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=jt.set(i[0],i[1],i[2]).length();const o=jt.set(i[4],i[5],i[6]).length(),s=jt.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],qt.copy(this);const a=1/r,l=1/o,c=1/s;return qt.elements[0]*=a,qt.elements[1]*=a,qt.elements[2]*=a,qt.elements[4]*=l,qt.elements[5]*=l,qt.elements[6]*=l,qt.elements[8]*=c,qt.elements[9]*=c,qt.elements[10]*=c,t.setFromRotationMatrix(qt),n.x=r,n.y=o,n.z=s,this}makePerspective(e,t,n,i,r,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a
30new signature. Please check the docs.");const s=this.elements,a=2*r/(t-e),l=2*r/(n-i),c=(t+e)/(t-e),u=(n+i)/(n-i),d=-(o+r)/(o-r),h=-2*o*r/(o-r);return s[0]=a,s[4]=0,s[8]=c,s[12]=0,s[1]=0,s[5]=l,s[9]=u,s[13]=0,s[2]=0,s[6]=0,s[10]=d,s[14]=h,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,i,r,o){const s=this.elements,a=1/(t-e),l=1/(n-i),c=1/(o-r),u=(t+e)*a,d=(n+i)*l,h=(o+r)*c;return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-u,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-d,s[2]=0,s[6]=0,s[10]=-2*c,s[14]=-h,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}Wt.prototype.isMatrix4=!0;const jt=new pt,qt=new Wt,Xt=new pt(0,0,0),$t=new pt(1,1,1),Yt=new pt,Jt=new pt,Zt=new pt,Kt=new Wt,Qt=new ht;class en{constructor(e=0,t=0,n=0,i=en.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,r=i[0],o=i[4],s=i[8],a=i[1],l=i[5],c=i[9],u=i[2],d=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(ke(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-ke(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,h),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-u,r),this._z=0);break;case"ZXY":this._x=Math.asin(ke(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(a,r));break;case"ZYX":this._y=Math.asin(-ke(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(ke(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(s,h));break;case"XZY":this._z=Math.asin(-ke(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,r)):(this._x=Math.atan2(-c,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Kt.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Kt,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Qt.setFromEuler(this),this.setFromQuaternion(Qt,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}en.prototype.isEuler=!0,en.DefaultOrder="XYZ",en.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class tn{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return 0!==(this.mask&e.mask)}isEnabled(e){return!!(this.mask&1<<e)}}let nn=0;const rn=new pt,on=new ht,sn=new Wt,an=new pt,ln=new pt,cn=new pt,un=new ht,dn=new pt(1,0,0),hn=new pt(0,1,0),pn=new pt(0,0,1),fn={type:"added"},mn={type:"removed"};class gn extends Ae{constructor(){super(),Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ie(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=gn.DefaultUp.clone();const e=new pt,t=new en,n=new ht,i=new pt(1,1,1);t._onChange(function(){n.setFromEuler(t,!1)}),n._onChange(function(){t.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Wt},normalMatrix:{value:new ze}}),this.matrix=new Wt,this.matrixWorld=new Wt,this.matrixAutoUpdate=gn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new tn,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}
vendor: 12,235 bytes, line 30
30setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return on.setFromAxisAngle(e,t),this.quaternion.multiply(on),this}rotateOnWorldAxis(e,t){return on.setFromAxisAngle(e,t),this.quaternion.premultiply(on),this}rotateX(e){return this.rotateOnAxis(dn,e)}rotateY(e){return this.rotateOnAxis(hn,e)}rotateZ(e){return this.rotateOnAxis(pn,e)}translateOnAxis(e,t){return rn.copy(e).applyQuaternion(this.quaternion),this.position.add(rn.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(dn,e)}translateY(e){return this.translateOnAxis(hn,e)}translateZ(e){return this.translateOnAxis(pn,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(sn.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?an.copy(e):an.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),ln.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sn.lookAt(ln,an,this.up):sn.lookAt(an,ln,this.up),this.quaternion.setFromRotationMatrix(sn),i&&(sn.extractRotation(i.matrixWorld),on.setFromRotationMatrix(sn),this.quaternion.premultiply(on.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(fn)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(mn)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(mn)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),sn.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),sn.multiply(e.parent.matrixWorld)),e.applyMatrix4(sn),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ln,e,cn),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ln,un,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const i={};function r(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,i=n.length;t<i;t++){const i=n[t];r(e.shapes,i)}else r(e.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,i=this.material.length;n<i;n++)t.push(r(e.materials,this.material[n]));i.material=t}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let t=0;t<this.children.length;t++)i.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];i.animations.push(r(e.animations,n))}}if(t){const t=o(e.geometries),i=o(e.materials),r=o(e.textures),s=o(e.images),a=o(e.shapes),l=o(e.skeletons),c=o(e.animations),u=o(e.nodes);t.length>0&&(n.geometries=t),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),s.length>0&&(n.images=s),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),u.length>0&&(n.nodes=u)}return n.object=i,n;function o(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}gn.DefaultUp=new pt(0,1,0),gn.DefaultMatrixAutoUpdate=!0,gn.prototype.isObject3D=!0;const vn=new pt,yn=new pt,_n=new pt,xn=new pt,bn=new pt,wn=new pt,Tn=new pt,Sn=new pt,En=new pt,Mn=new pt;class An{constructor(e=new pt,t=new pt,n=new pt){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),vn.subVectors(e,t),i.cross(vn);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){vn.subVectors(i,t),yn.subVectors(n,t),_n.subVectors(e,t);const o=vn.dot(vn),s=vn.dot(yn),a=vn.dot(_n),l=yn.dot(yn),c=yn.dot(_n),u=o*l-s*s;if(0===u)return r.set(-2,-1,-1);const d=1/u,h=(l*a-s*c)*d,p=(o*c-s*a)*d;return r.set(1-h-p,p,h)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,xn),xn.x>=0&&xn.y>=0&&xn.x+xn.y<=1}static getUV(e,t,n,i,r,o,s,a){return this.getBarycoord(e,t,n,i,xn),a.set(0,0),a.addScaledVector(r,xn.x),a.addScaledVector(o,xn.y),a.addScaledVector(s,xn.z),a}static isFrontFacing(e,t,n,i){return vn.subVectors(n,t),yn.subVectors(e,t),vn.cross(yn).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return vn.subVectors(this.c,this.b),yn.subVectors(this.a,this.b),.5*vn.cross(yn).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return An.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return An.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,i,r){return An.getUV(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return An.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return An.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let o,s;bn.subVectors(i,n),wn.subVectors(r,n),Sn.subVectors(e,n);const a=bn.dot(Sn),l=wn.dot(Sn);if(a<=0&&l<=0)return t.copy(n);En.subVectors(e,i);const c=bn.dot(En),u=wn.dot(En);if(c>=0&&u<=c)return t.copy(i);const d=a*u-c*l;if(d<=0&&a>=0&&c<=0)return o=a/(a-c),t.copy(n).addScaledVector(bn,o);Mn.subVectors(e,r);const h=bn.dot(Mn),p=wn.dot(Mn);if(p>=0&&h<=p)return t.copy(r);const f=h*l-a*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(wn,s);const m=c*p-h*u;if(m<=0&&u-c>=0&&h-p>=0)return Tn.subVectors(r,i),s=(u-c)/(u-c+(h-p)),t.copy(i).addScaledVector(Tn,s);const g=1/(m+f+d);return o=f*g,s=d*g,t.copy(n).addScaledVector(bn,o).addScaledVector(wn,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Rn=0;class Cn extends Ae{constructor(){super(),Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ie(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=n,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=we,this.stencilZFail=we,this.stencilZPass=we,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const i=this[t];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(e){const t=[];for(const n in e){const i=e[n];delete i.metadata,t.push(i)}return t}
vendor: 6,949 bytes, line 30
30if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=i(e.textures),r=i(e.images);t.length>0&&(n.textures=t),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let i=0;i!==e;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipSh
vendor: 8,517 bytes, line 30
30adows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}Cn.prototype.isMaterial=!0,Cn.fromType=function(){return null};class Ln extends Cn{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Ke(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}Ln.prototype.isMeshBasicMaterial=!0;const Pn=new pt,In=new He;class kn{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=Te,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let i=0,r=e.length;i<r;i++){let r=e[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),r=new Ke),t[n++]=r.r,t[n++]=r.g,t[n++]=r.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let i=0,r=e.length;i<r;i++){let r=e[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),r=new He),t[n++]=r.x,t[n++]=r.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let i=0,r=e.length;i<r;i++){let r=e[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),r=new pt),t[n++]=r.x,t[n++]=r.y,t[n++]=r.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let i=0,r=e.length;i<r;i++){let r=e[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),r=new ot),t[n++]=r.x,t[n++]=r.y,t[n++]=r.z,t[n++]=r.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)In.fromBufferAttribute(this,t),In.applyMatrix3(e),this.setXY(t,In.x,In.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Pn.fromBufferAttribute(this,t),Pn.applyMatrix3(e),this.setXYZ(t,Pn.x,Pn.y,Pn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Pn.x=this.getX(t),Pn.y=this.getY(t),Pn.z=this.getZ(t),Pn.applyMatrix4(e),this.setXYZ(t,Pn.x,Pn.y,Pn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Pn.x=this.getX(t),Pn.y=this.getY(t),Pn.z=this.getZ(t),Pn.applyNormalMatrix(e),this.setXYZ(t,Pn.x,Pn.y,Pn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Pn.x=this.getX(t),Pn.y=this.getY(t),Pn.z=this.getZ(t),Pn.transformDirection(e),this.setXYZ(t,Pn.x,Pn.y,Pn.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==Te&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}kn.prototype.isBufferAttribute=!0;class Dn extends kn{constructor(e,t,n){super(new Int8Array(e),t,n)}}class On extends kn{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class Nn extends kn{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Fn extends kn{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Un extends kn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Bn extends kn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Hn extends kn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class zn extends kn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}zn.prototype.isFloat16BufferAttribute=!0;class Gn extends kn{constructor(e,t,n){super(new Float32Array(e),t,n)}}class Vn extends kn{constructor(e,t,n){super(new Float64Array(e),t,n)}}let Wn=0;const jn=new Wt,qn=new gn,Xn=new pt,$n=new gt,Yn=new gt,Jn=new pt;class Zn extends Ae{constructor(){super(),Object.defineProperty(this,"id",{value:Wn++}),this.uuid=Ie(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(Ge(e)?Hn:Un)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new ze).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return jn.makeRotationFromQuaternion(e),this.applyMatrix4(jn),this}rotateX(e){return jn.makeRotationX(e),this.applyMatrix4(jn),this}rotateY(e){return jn.makeRotationY(e),this.applyMatrix4(jn),this}rotateZ(e){return jn.makeRotationZ(e),this.applyMatrix4(jn),this}translate(e,t,n){return jn.makeTranslation(e,t,n),this.applyMatrix4(jn),this}scale(e,t,n){return jn.makeScale(e,t,n),this.applyMatrix4(jn),this}lookAt(e){return qn.lookAt(e),qn.updateMatrix(),this.applyMatrix4(qn.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Xn).negate(),this.translate(Xn.x,Xn.y,Xn.z),this}setFromPoints(e){const t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new Gn(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new gt);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "fal
30se".',this),void this.boundingBox.set(new pt(-1/0,-1/0,-1/0),new pt(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];$n.setFromBufferAttribute(n),this.morphTargetsRelative?(Jn.addVectors(this.boundingBox.min,$n.min),this.boundingBox.expandByPoint(Jn),Jn.addVectors(this.boundingBox.max,$n.max),this.boundingBox.expandByPoint(Jn)):(this.boundingBox.expandByPoint($n.min),this.boundingBox.expandByPoint($n.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Ot);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "fal
30se".',this),void this.boundingSphere.set(new pt,1/0);if(e){const n=this.boundingSphere.center;if($n.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Yn.setFromBufferAttribute(n),this.morphTargetsRelative?(Jn.addVectors($n.min,Yn.min),$n.expandByPoint(Jn),Jn.addVectors($n.max,Yn.max),$n.expandByPoint(Jn)):($n.expandByPoint(Yn.min),$n.expandByPoint(Yn.max))}$n.getCenter(n);let i=0;for(let t=0,r=e.count;t<r;t++)Jn.fromBufferAttribute(e,t),i=Math.max(i,n.distanceToSquared(Jn));if(t)for(let r=0,o=t.length;r<o;r++){const o=t[r],s=this.morphTargetsRelative;for(let t=0,r=o.count;t<r;t++)Jn.fromBufferAttribute(o,t),s&&(Xn.fromBufferAttribute(e,t),Jn.add(Xn)),i=Math.max(i,n.distanceToSquared(Jn))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,i=t.position.array,r=t.normal.array,o=t.uv.array,s=i.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new kn(new Float32Array(4*s),4));const a=this.getAttribute("tangent").array,l=[],c=[];for(let e=0;e<s;e++)l[e]=new pt,c[e]=new pt;const u=new pt,d=new pt,h=new pt,p=new He,f=new He,m=new He,g=new pt,v=new pt;function y(e,t,n){u.fromArray(i,3*e),d.fromArray(i,3*t),h.fromArray(i,3*n),p.fromArray(o,2*e),f.fromArray(o,2*t),m.fromArray(o,2*n),d.sub(u),h.sub(u),f.sub(p),m.sub(p);const r=1/(f.x*m.y-m.x*f.y);isFinite(r)&&(g.copy(d).multiplyScalar(m.y).addScaledVector(h,-f.y).multiplyScalar(r),v.copy(h).multiplyScalar(f.x).addScaledVector(d,-m.x).multiplyScalar(r),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let _=this.groups;0===_.length&&(_=[{start:0,count:n.length}]);for(let e=0,t=_.length;e<t;++e){const t=_[e],i=t.start;for(let e=i,r=i+t.count;e<r;e+=3)y(n[e+0],n[e+1],n[e+2])}const x=new pt,b=new pt,w=new pt,T=new pt;function S(e){w.fromArray(r,3*e),T.copy(w);const t=l[e];x.copy(t),x.sub(w.multiplyScalar(w.dot(t))).normalize(),b.crossVectors(T,t);const n=b.dot(c[e])<0?-1:1;a[4*e]=x.x,a[4*e+1]=x.y,a[4*e+2]=x.z,a[4*e+3]=n}for(let e=0,t=_.length;e<t;++e){const t=_[e],i=t.start;for(let e=i,r=i+t.count;e<r;e+=3)S(n[e+0]),S(n[e+1]),S(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new kn(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const i=new pt,r=new pt,o=new pt,s=new pt,a=new pt,l=new pt,c=new pt,u=new pt;if(e)for(let d=0,h=e.count;d<h;d+=3){const h=e.getX(d+0),p=e.getX(d+1),f=e.getX(d+2);i.fromBufferAttribute(t,h),r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,f),c.subVectors(o,r),u.subVectors(i,r),c.cross(u),s.fromBufferAttribute(n,h),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(c),a.add(c),l.add(c),n.setXYZ(h,s.x,s.y,s.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)i.fromBufferAttribute(t,e+0),r.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,r),u.subVectors(i,r),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const i in n){if(void 0===e.attributes[i])continue;const r=n[i].array,o=e.attributes[i],s=o.array,a=o.itemSize*t,l=Math.min(s.length,r.length-a);for(let e=0,t=a;e<l;e++,t++)r[t]=s[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Jn.fromBufferAttribute(e,t),Jn.normalize(),e.setXYZ(t,Jn.x,Jn.y,Jn.z)}toNonIndexed(){function e(e,t){const n=e.array,i=e.itemSize,r=e.normalized,o=new n.constructor(t.length*i);let s=0,a=0;for(let r=0,l=t.length;r<l;r++){s=e.isInterleavedBufferAttribute?t[r]*e.data.stride+e.offset:t[r]*i;for(let e=0;e<i;e++)o[a++]=n[s++]}return new kn(o,i,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Zn,n=this.index.array,i=this.attributes;for(const r in i){const o=e(i[r],n);t.setAttribute(r,o)}const r=this.morphAttributes;for(const i in r){const o=[],s=r[i];for(let t=0,i=s.length;t<i;t++){const i=e(s[t],n);o.push(i)}t.morphAttributes[i]=o}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let e=0,n=o.length;e<n;e++){const n=o[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 20,313 bytes, line 30
30if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const i=n[t];e.data.attributes[t]=i.toJSON(e.data)}const i={};let r=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],o=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];o.push(i.toJSON(e.data))}o.length>0&&(i[t]=o,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const i=e.attributes;for(const e in i){const n=i[e];this.setAttribute(e,n.clone(t))}const r=e.morphAttributes;for(const e in r){const n=[],i=r[e];for(let e=0,r=i.length;e<r;e++)n.push(i[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let e=0,t=o.length;e<t;e++){const t=o[e];this.addGroup(t.start,t.count,t.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const a=e.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}Zn.prototype.isBufferGeometry=!0;const Kn=new Wt,Qn=new Vt,ei=new Ot,ti=new pt,ni=new pt,ii=new pt,ri=new pt,oi=new pt,si=new pt,ai=new pt,li=new pt,ci=new pt,ui=new He,di=new He,hi=new He,pi=new pt,fi=new pt;class mi extends gn{constructor(e=new Zn,t=new Ln){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0===i)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),ei.copy(n.boundingSphere),ei.applyMatrix4(r),!1===e.ray.intersectsSphere(ei))return;if(Kn.copy(r).invert(),Qn.copy(e.ray).applyMatrix4(Kn),null!==n.boundingBox&&!1===Qn.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const r=n.index,s=n.attributes.position,a=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,d=n.groups,h=n.drawRange;if(null!==r)if(Array.isArray(i))for(let n=0,p=d.length;n<p;n++){const p=d[n],f=i[p.materialIndex];for(let n=Math.max(p.start,h.start),i=Math.min(r.count,Math.min(p.start+p.count,h.start+h.count));n<i;n+=3){const i=r.getX(n),d=r.getX(n+1),h=r.getX(n+2);o=gi(this,f,e,Qn,s,a,l,c,u,i,d,h),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=p.materialIndex,t.push(o))}}else for(let n=Math.max(0,h.start),d=Math.min(r.count,h.start+h.count);n<d;n+=3){const d=r.getX(n),h=r.getX(n+1),p=r.getX(n+2);o=gi(this,i,e,Qn,s,a,l,c,u,d,h,p),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}else if(void 0!==s)if(Array.isArray(i))for(let n=0,r=d.length;n<r;n++){const r=d[n],p=i[r.materialIndex];for(let n=Math.max(r.start,h.start),i=Math.min(s.count,Math.min(r.start+r.count,h.start+h.count));n<i;n+=3)o=gi(this,p,e,Qn,s,a,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=r.materialIndex,t.push(o))}else for(let n=Math.max(0,h.start),r=Math.min(s.count,h.start+h.count);n<r;n+=3)o=gi(this,i,e,Qn,s,a,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function gi(e,t,n,i,r,o,s,a,l,c,u,d){ti.fromBufferAttribute(r,c),ni.fromBufferAttribute(r,u),ii.fromBufferAttribute(r,d);const h=e.morphTargetInfluences;if(o&&h){ai.set(0,0,0),li.set(0,0,0),ci.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=h[e],n=o[e];0!==t&&(ri.fromBufferAttribute(n,c),oi.fromBufferAttribute(n,u),si.fromBufferAttribute(n,d),s?(ai.addScaledVector(ri,t),li.addScaledVector(oi,t),ci.addScaledVector(si,t)):(ai.addScaledVector(ri.sub(ti),t),li.addScaledVector(oi.sub(ni),t),ci.addScaledVector(si.sub(ii),t)))}ti.add(ai),ni.add(li),ii.add(ci)}e.isSkinnedMesh&&(e.boneTransform(c,ti),e.boneTransform(u,ni),e.boneTransform(d,ii));const p=function(e,t,n,i,r,o,s,a){let l;if(l=1===t.side?i.intersectTriangle(s,o,r,!0,a):i.intersectTriangle(r,o,s,2!==t.side,a),null===l)return null;fi.copy(a),fi.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(fi);return c<n.near||c>n.far?null:{distance:c,point:fi.clone(),object:e}}(e,t,n,i,ti,ni,ii,pi);if(p){a&&(ui.fromBufferAttribute(a,c),di.fromBufferAttribute(a,u),hi.fromBufferAttribute(a,d),p.uv=An.getUV(pi,ti,ni,ii,ui,di,hi,new He)),l&&(ui.fromBufferAttribute(l,c),di.fromBufferAttribute(l,u),hi.fromBufferAttribute(l,d),p.uv2=An.getUV(pi,ti,ni,ii,ui,di,hi,new He));const e={a:c,b:u,c:d,normal:new pt,materialIndex:0};An.getNormal(ti,ni,ii,e.normal),p.face=e}return p}mi.prototype.isMesh=!0;class vi extends Zn{constructor(e=1,t=1,n=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:o};const s=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const a=[],l=[],c=[],u=[];let d=0,h=0;function p(e,t,n,i,r,o,p,f,m,g,v){const y=o/m,_=p/g,x=o/2,b=p/2,w=f/2,T=m+1,S=g+1;let E=0,M=0;const A=new pt;for(let o=0;o<S;o++){const s=o*_-b;for(let a=0;a<T;a++){const d=a*y-x;A[e]=d*i,A[t]=s*r,A[n]=w,l.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[n]=f>0?1:-1,c.push(A.x,A.y,A.z),u.push(a/m),u.push(1-o/g),E+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){const n=d+t+T*e,i=d+t+T*(e+1),r=d+(t+1)+T*(e+1),o=d+(t+1)+T*e;a.push(n,i,o),a.push(i,r,o),M+=6}s.addGroup(h,M,v),h+=M,d+=E}p("z","y","x",-1,-1,n,t,e,o,r,0),p("z","y","x",1,-1,n,t,-e,o,r,1),p("x","z","y",1,1,e,n,t,i,o,2),p("x","z","y",1,-1,e,n,-t,i,o,3),p("x","y","z",1,-1,e,t,n,i,r,4),p("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(a),this.setAttribute("position",new Gn(l,3)),this.setAttribute("normal",new Gn(c,3)),this.setAttribute("uv",new Gn(u,2))}static fromJSON(e){return new vi(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function yi(e){const t={};for(const n in e){t[n]={};for(const i in e[n]){const r=e[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?t[n][i]=r.clone():Array.isArray(r)?t[n][i]=r.slice():t[n][i]=r}}return t}function _i(e){const t={};for(let n=0;n<e.length;n++){const i=yi(e[n]);for(const e in i)t[e]=i[e]}return t}const xi={clone:yi,merge:_i};class bi extends Cn{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=yi(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?t.uniforms[n]={type:"t",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?t.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?t.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?t.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[n]={type:"m4",value:i.toArray()}:t.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}bi.prototype.isShaderMaterial=!0;class wi extends gn{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Wt,this.projectionMatrix=new Wt,this.projectionMatrixInverse=new Wt}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}wi.prototype.isCamera=!0;class Ti extends wi{constructor(e=50,t=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Pe*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Le*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Pe*Math.atan(Math.tan(.5*Le*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,i,r,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Le*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,s=o.fullHeight;r+=o.offsetX*i/e,t-=o.offsetY*n/s,i*=o.width/e,n*=o.height/s}const s=this.filmOffset;0!==s&&(r+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}Ti.prototype.isPerspectiveCamera=!0;const Si=90;class Ei extends gn{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const i=new Ti(Si,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new pt(1,0,0)),this.add(i);const r=new Ti(Si,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new pt(-1,0,0)),this.add(r);const o=new Ti(Si,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new pt(0,1,0)),this.add(o);const s=new Ti(Si,1,e,t);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(new pt(0,-1,0)),this.add(s);const a=new Ti(Si,1,e,t);a.layers=this.layers,a.up.set(0,-1,0),a.lookAt(new pt(0,0,1)),this.add(a);const l=new Ti(Si,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new pt(0,0,-1)),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[i,r,o,s,a,l]=this.children,c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,i),e.setRenderTarget(n,1),e.render(t,r),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,s),e.setRenderTarget(n,4),e.render(t,a),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c,n.texture.needsPMREMUpdate=!0}}class Mi extends rt{constructor(e,t,n,i,r,o,s,a,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:v,n,i,r,o,s,a,l,c),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}Mi.prototype.isCubeTexture=!0;class Ai extends st{constructor(e,t={}){super(e,e,t);const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new Mi(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:C}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=U,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new vi(5,5,5),r=new bi({name:"CubemapFromEquirect",uniforms:yi(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=t;const o=new mi(i,r),s=t.minFilter;return t.minFilter===P&&(t.minFilter=C),new Ei(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,i){const r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,n,i);e.setRenderTarget(r)}}Ai.prototype.isWebGLCubeRenderTarget=!0;const Ri=new pt,Ci=new pt,Li=new ze;class Pi{constructor(e=new pt(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=Ri.subVectors(n,t).cross(Ci.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(Ri),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(n).multiplyScalar(r).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||Li.getNormalMatrix(e),i=this.coplanarPoint(Ri).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}Pi.prototype.isPlane=!0;const Ii=new Ot,ki=new pt;class Di{constructor(e=new Pi,t=new Pi,n=new Pi,i=new Pi,r=new Pi,o=new Pi){this.planes=[e,t,n,i,r,o]}set(e,t,n,i,r,o){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(i),s[4].copy(r),s[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,i=n[0],r=n[1],o=n[2],s=n[3],a=n[4],l=n[5],c=n[6],u=n[7],d=n[8],h=n[9],p=n[10],f=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(s-i,u-a,f-d,y-m).normalize(),t[1].setComponents(s+i,u+a,f+d,y+m).normalize(),t[2].setComponents(s+r,u+l,f+h,y+g).normalize(),t[3].setComponents(s-r,u-l,f-h,y-g).normalize(),t[4].setComponents(s-o,u-c,f-p,y-v).normalize(),t[5].setComponents(s+o,u+c,f+p,y+v).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Ii.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Ii)}intersectsSprite(e){return Ii.center.set(0,0,0),Ii.radius=.7071067811865476,Ii.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ii)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if(ki.x=i.normal.x>0?e.max.x:e.min.x,ki.y=i.normal.y>0?e.max.y:e.min.y,ki.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(ki)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Oi(){let e=null,t=!1,n=null,i=null;function r(t,o){n(t,o),i=e.requestAnimationFrame(r)}return{start:function(){!0!==t&&null!==n&&(i=e.requestAnimationFrame(r),t=!0)},stop:function(){e.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Ni(e,t){const n=t.isWebGL2,i=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),i.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=i.get(t);n&&(e.deleteBuffer(n.buffer),i.delete(t))},update:function(t,r){if(t.isGLBufferAttribute){const e=i.get(t);
vendor: 4,186 bytes, line 30
30return void((!e||e.version<t.version)&&i.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=i.get(t);void 0===o?i.set(t,function(t,i){const r=t.array,o=t.usage,s=e.createBuffer();let a;if(e.bindBuffer(i,s),e.bufferData(i,r,o),t.onUploadCallback(),r instanceof Float32Array)a=e.FLOAT;else if(r instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");a=e.HALF_FLOAT}else a=e.UNSIGNED_SHORT;else if(r instanceof Int16Array)a=e.SHORT;else if(r instanceof Uint32Array)a=e.UNSIGNED_INT;else if(r instanceof Int32Array)a=e.INT;else if(r instanceof Int8Array)a=e.BYTE;else if(r instanceof Uint8Array)a=e.UNSIGNED_BYTE;else{if(!(r instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);a=e.UNSIGNED_BYTE}return{buffer:s,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}(t,r)):o.version<t.version&&(function(t,i,r){const o=i.array,s=i.updateRange;e.bindBuffer(r,t),-1===s.count?e.bufferSubData(r,0,o):(n?e.bufferSubData(r,s.offset*o.BYTES_PER_ELEMENT,o,s.offset,s.count):e.bufferSubData(r,s.offset*o.BYTES_PER_ELEMENT,o.subarray(s.offset,s.offset+s.count)),s.count=-1)}(o.buffer,t,r),o.version=t.version)}}}class Fi extends Zn{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,o=t/2,s=Math.floor(n),a=Math.floor(i),l=s+1,c=a+1,u=e/s,d=t/a,h=[],p=[],f=[],m=[];for(let e=0;e<c;e++){const t=e*d-o;for(let n=0;n<l;n++){const i=n*u-r;p.push(i,-t,0),f.push(0,0,1),m.push(n/s),m.push(1-e/a)}}for(let e=0;e<a;e++)for(let t=0;t<s;t++){const n=t+l*e,i=t+l*(e+1),r=t+1+l*(e+1),o=t+1+l*e;h.push(n,i,o),h.push(i,r,o)}this.setIndex(h),this.setAttribute("position",new Gn(p,3)),this.setAttribute("normal",new Gn(f,3)),this.setAttribute("uv",new Gn(m,2))}static fromJSON(e){return new Fi(e.width,e.height,e.widthSegments,e.heightSegments)}}const Ui={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );
30\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x >
30 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + dis
30placementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t}
30 else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}
30\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;
30\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {\
30n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(\t\t0, 1,\t\t0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
30\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform vec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tfloat texelIndex = float( vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset );\n\t\t\tfloat y = floor( texelIndex / morphTargetsTextureSize.x );\n\t\t\tfloat x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tvec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );\n\t\t\treturn texture( morphTargetsTexture, morphUV );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
vendor: 26,159 bytes, line 30
30\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(\t1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,\t1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,\t1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(
30const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <co
30lor_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;
30\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;
30\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},Bi={common:{diffuse:{value:new Ke(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new ze},uv2Transform:{value:new ze},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new He(1,1)}}
vendor: 5,218 bytes, line 30
30,displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ke(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ke(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ze}},sprite:{diffuse:{value:new Ke(16777215)},opacity:{value:1},center:{value:new He(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ze}}},Hi={basic:{uniforms:_i([Bi.common,Bi.specularmap,Bi.envmap,Bi.aomap,Bi.lightmap,Bi.fog]),vertexShader:Ui.meshbasic_vert,fragmentShader:Ui.meshbasic_frag},lambert:{uniforms:_i([Bi.common,Bi.specularmap,Bi.envmap,Bi.aomap,Bi.lightmap,Bi.emissivemap,Bi.fog,Bi.lights,{emissive:{value:new Ke(0)}}]),vertexShader:Ui.meshlambert_vert,fragmentShader:Ui.meshlambert_frag},phong:{uniforms:_i([Bi.common,Bi.specularmap,Bi.envmap,Bi.aomap,Bi.lightmap,Bi.emissivemap,Bi.bumpmap,Bi.normalmap,Bi.displacementmap,Bi.fog,Bi.lights,{emissive:{value:new Ke(0)},specular:{value:new Ke(1118481)},shininess:{value:30}}]),vertexShader:Ui.meshphong_vert,fragmentShader:Ui.meshphong_frag},standard:{uniforms:_i([Bi.common,Bi.envmap,Bi.aomap,Bi.lightmap,Bi.emissivemap,Bi.bumpmap,Bi.normalmap,Bi.displacementmap,Bi.roughnessmap,Bi.metalnessmap,Bi.fog,Bi.lights,{emissive:{value:new Ke(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ui.meshphysical_vert,fragmentShader:Ui.meshphysical_frag},toon:{uniforms:_i([Bi.common,Bi.aomap,Bi.lightmap,Bi.emissivemap,Bi.bumpmap,Bi.normalmap,Bi.displacementmap,Bi.gradientmap,Bi.fog,Bi.lights,{emissive:{value:new Ke(0)}}]),vertexShader:Ui.meshtoon_vert,fragmentShader:Ui.meshtoon_frag},matcap:{uniforms:_i([Bi.common,Bi.bumpmap,Bi.normalmap,Bi.displacementmap,Bi.fog,{matcap:{value:null}}]),vertexShader:Ui.meshmatcap_vert,fragmentShader:Ui.meshmatcap_frag},points:{uniforms:_i([Bi.points,Bi.fog]),vertexShader:Ui.points_vert,fragmentShader:Ui.points_frag},dashed:{uniforms:_i([Bi.common,Bi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ui.linedashed_vert,fragmentShader:Ui.linedashed_frag},depth:{uniforms:_i([Bi.common,Bi.displacementmap]),vertexShader:Ui.depth_vert,fragmentShader:Ui.depth_frag},normal:{uniforms:_i([Bi.common,Bi.bumpmap,Bi.normalmap,Bi.displacementmap,{opacity:{value:1}}]),vertexShader:Ui.meshnormal_vert,fragmentShader:Ui.meshnormal_frag},sprite:{uniforms:_i([Bi.sprite,Bi.fog]),vertexShader:Ui.sprite_vert,fragmentShader:Ui.sprite_frag},background:{uniforms:{uvTransform:{value:new ze},t2D:{value:null}},vertexShader:Ui.background_vert,fragmentShader:Ui.background_frag},cube:{uniforms:_i([Bi.envmap,{opacity:{value:1}}]),vertexShader:Ui.cube_vert,fragmentShader:Ui.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ui.equirect_vert,fragmentShader:Ui.equirect_frag},distanceRGBA:{uniforms:_i([Bi.common,Bi.displacementmap,{referencePosition:{value:new pt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ui.distanceRGBA_vert,fragmentShader:Ui.distanceRGBA_frag},shadow:{uniforms:_i([Bi.lights,Bi.fog,{color:{value:new Ke(0)},opacity:{value:1}}]),vertexShader:Ui.shadow_vert,fragmentShader:Ui.shadow_frag}};function zi(e,t,n,i,r,o){const s=new Ke(0);let a,l,c=!0===r?0:1,u=null,d=0,h=null;function p(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,o)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),c=t,p(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,p(s,c)},render:function(n,r){let o=!1,f=!0===r.isScene?r.background:null;f&&f.isTexture&&(f=t.get(f));const m=e.xr,g=m.getSession&&m.getSession();g&&"additive"===g.environmentBlendMode&&(f=null),null===f?p(s,c):f&&f.isColor&&(p(f,1),o=!0),(e.autoClear||o)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),f&&(f.isCubeTexture||f.mapping===b)?(void 0===l&&(l=new mi(new vi(1,1,1),new bi({name:"Backgroun
30dCubeMaterial",uniforms:yi(Hi.cube.uniforms),vertexShader:Hi.cube.vertexShader,fragmentShader:Hi.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),l.material.uniforms.envMap.value=f,l.material.uniforms.flipEnvMap.value=f.isCubeTexture&&!1===f.isRenderTargetTexture?-1:1,u===f&&d===f.version&&h===e.toneMapping||(l.material.needsUpdate=!0,u=f,d=f.version,h=e.toneMapping),n.unshift(l,l.geometry,l.material,0,0,null)):f&&f.isTexture&&(void 0===a&&(a=new mi(new Fi(2,2),new bi({name:"BackgroundMaterial",uniforms:yi(Hi.background.uniforms),vertexShader:Hi.background.vertexShader,fragmentShader:Hi.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(a)),a.material.uniforms.t2D.value=f,!0===f.matrixAutoUpdate&&f.updateMatrix(),a.material.uniforms.uvTransform.value.copy(f.matrix),u===f&&d===f.version&&h===e.toneMapping||(a.material.needsUpdate=!0,u=f,d=f.version,h=e.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null))}}}function Gi(e,t,n,i){const r=e.getParameter(e.MAX_VERTEX_ATTRIBS),o=i.isWebGL2?null:t.get("OES_vertex_array_object"),s=i.isWebGL2||null!==o,a={},l=h(null);let c=l;function u(t){return i.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function d(t){return i.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function h(e){const t=[],n=[],i=[];for(let e=0;e<r;e++)t[e]=0,n[e]=0,i[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:i,object:e,attributes:{},index:null}}function p(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function f(e){m(e,0)}function m(n,r){const o=c.newAttributes,s=c.enabledAttributes,a=c.attributeDivisors;o[n]=1,0===s[n]&&(e.enableVertexAttribArray(n),s[n]=1),a[n]!==r&&((i.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),a[n]=r)}function g(){const t=c.newAttributes,n=c.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==t[i]&&(e.disableVertexAttribArray(i),n[i]=0)}function v(t,n,r,o,s,a){!0!==i.isWebGL2||r!==e.INT&&r!==e.UNSIGNED_INT?e.vertexAttribPointer(t,n,r,o,s,a):e.vertexAttribIPointer(t,n,r,s,a)}function y(){_(),c!==l&&(c=l,u(c.object))}function _(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(r,l,d,y,_){let x=!1;if(s){const t=function(t,n,r){const s=!0===r.wireframe;let l=a[t.id];void 0===l&&(l={},a[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[s];return void 0===u&&(u=h(i.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[s]=u),u}(y,d,l);c!==t&&(c=t,u(c.object)),x=function(e,t){const n=c.attributes,i=e.attributes;let r=0;for(const e in i){const t=n[e],o=i[e];if(void 0===t)return!0;if(t.attribute!==o)return!0;if(t.data!==o.data)return!0;r++}return c.attributesNum!==r||c.index!==t}(y,_),x&&function(e,t){const n={},i=e.attributes;let r=0;for(const e in i){const t=i[e],o={};o.attribute=t,t.data&&(o.data=t.data),n[e]=o,r++}c.attributes=n,c.attributesNum=r,c.index=t}(y,_)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===e||(c.geometry=y.id,c.program=d.id,c.wireframe=e,x=!0)}!0===r.isInstancedMesh&&(x=!0),null!==_&&n.update(_,e.ELEMENT_ARRAY_BUFFER),x&&(function(r,o,s,a){if(!1===i.isWebGL2&&(r.isInstancedMesh||a.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;p();const l=a.attributes,c=s.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const i=c[t];if(i.location>=0){let o=l[t];if(void 0===o&&("instanceMatrix"===t&&r.instanceMatrix&&(o=r.instanceMatrix),"instanceColor"===t&&r.instanceColor&&(o=r.instanceColor)),void 0!==o){const t=o.normalized,s=o.itemSize,l=n.get(o);if(void 0===l)continue;const c=l.buffer,u=l.type,d=l.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,l=n.stride,h=o.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<i.locationSize;e++)m(i.location+e,n.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<i.locationSize;e++)f(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,c);for(let e=0;e<i.locationSize;e++)v(i.location+e,s/i.locationSize,u,t,l*d,(h+s/i.locationSize*e)*d)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<i.locationSize;e++)m(i.location+e,o.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=o.meshPerAttribute*o.count)}
vendor: 1,101 bytes, line 30
30else for(let e=0;e<i.locationSize;e++)f(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,c);for(let e=0;e<i.locationSize;e++)v(i.location+e,s/i.locationSize,u,t,s*d,s/i.locationSize*e*d)}}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(i.location,n);break;case 3:e.vertexAttrib3fv(i.location,n);break;case 4:e.vertexAttrib4fv(i.location,n);break;default:e.vertexAttrib1fv(i.location,n)}}}}g()}(r,l,d,y),null!==_&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.get(_).buffer))},reset:y,resetDefaultState:_,dispose:function(){y();for(const e in a){const t=a[e];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete a[e]}},releaseStatesOfGeometry:function(e){if(void 0===a[e.id])return;const t=a[e.id];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete a[e.id]},releaseStatesOfProgram:function(e){for(const t in a){const n=a[t];if(void 0===n[e.id])continue;const i=n[e.id];for(const e in i)d(i[e].object),delete i[e];delete n[e.id]}},initAttributes:p,enableAttribute:f,disableUnusedAttributes:g}}
vendor: 4,894 bytes, line 30
30function Vi(e,t,n,i){const r=i.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,i){e.drawArrays(o,t,i),n.update(i,o,1)},this.renderInstances=function(i,s,a){if(0===a)return;let l,c;if(r)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,i,s,a),n.update(s,o,a)}}function Wi(e,t,n){let i;function r(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let s=void 0!==n.precision?n.precision:"highp";const a=r(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),y=d>0,_=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:r,precision:s,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:d,maxTextureSize:h,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:_,floatVertexTextures:y&&_,maxSamples:o?e.getParameter(e.MAX_SAMPLES):0}}function ji(e){const t=this;let n=null,i=0,r=!1,o=!1;const s=new Pi,a=new ze,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function u(e,n,i,r){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==r||null===c){const t=i+4*o,r=n.matrixWorldInverse;a.getNormalMatrix(r),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=i;t!==o;++t,n+=4)s.copy(e[t]).applyMatrix4(r,a),s.normal.toArray(c,n),c[n+3]=s.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const s=0!==e.length||t||0!==i||r;return r=t,n=u(e,o,0),i=e.length,s},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,s,a){const d=t.clippingPlanes,h=t.clipIntersection,p=t.clipShadows,f=e.get(t);if(!r||null===d||0===d.length||o&&!p)o?u(null):c();else{const e=o?0:i,t=4*e;let r=f.clippingState||null;l.value=r,r=u(d,s,t,a);for(let e=0;e!==t;++e)r[e]=n[e];f.clippingState=r,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function qi(e){let t=new WeakMap;function n(e,t){return t===_?e.mapping=v:t===x&&(e.mapping=y),e}function i(e){const n=e.target;n.removeEventListener("dispose",i);const r=t.get(n);void 0!==r&&(t.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture&&!1===r.isRenderTargetTexture){const o=r.mapping;if(o===_||o===x){if(t.has(r))return n(t.get(r).texture,r.mapping);{const o=r.image;if(o&&o.height>0){const s=new Ai(o.height/2);return s.fromEquirectangularTexture(e,r),t.set(r,s),r.addEventListener("dispose",i),n(s.texture,r.mapping)}return null}}}return r},dispose:function(){t=new WeakMap}}}Hi.physical={uniforms:_i([Hi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new He(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new Ke(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new He},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ke(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Ke(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Ui.meshphysical_vert,fragmentShader:Ui.meshphysical_frag};class Xi extends wi{constructor(e=-1,t=1,n=1,i=-1,r=.1,o=2e3){super(),this.type="Orthogra
30phicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,o=n+e,s=i+t,a=i-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,o=r+e*this.view.width,s-=t*this.view.offsetY,a=s-t*this.view.height}this.projectionMatrix.makeOrthographic(r,o,s,a,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}Xi.prototype.isOrthographicCamera=!0;const $i=[.125,.215,.35,.446,.526,.582],Yi=20,Ji=new Xi,Zi=new Ke;let Ki=null;const Qi=(1+Math.sqrt(5))/2,er=1/Qi,tr=[new pt(1,1,1),new pt(-1,1,1),new pt(1,1,-1),new pt(-1,1,-1),new pt(0,Qi,er),new pt(0,Qi,-er),new pt(er,0,Qi),new pt(-er,0,Qi),new pt(Qi,er,0),new pt(-Qi,er,0)];class nr{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100){Ki=this._renderer.getRenderTarget(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,n,i,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=sr(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=or(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Ki),e.scissorTest=!1,rr(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===v||e.mapping===y?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Ki=this._renderer.getRenderTarget();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize-32,n={magFilter:C,minFilter:C,generateMipmaps:!1,type:N,format:U,encoding:xe,depthBuffer:!1},i=ir(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=ir(e,t,n);const{_lodMax:i}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],i=[];let r=e;const o=e-4+1+$i.length;for(let s=0;s<o;s++){const o=Math.pow(2,r);n.push(o);let a=1/o;s>e-4?a=$i[s-e+4-1]:0===s&&(a=0),i.push(a);const l=1/(o-1),c=-l/2,u=1+l/2,d=[c,c,u,c,u,u,c,c,u,u,c,u],h=6,p=6,f=3,m=2,g=1,v=new Float32Array(f*p*h),y=new Float32Array(m*p*h),_=new Float32Array(g*p*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,i=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];v.set(i,f*p*e),y.set(d,m*p*e);const r=[e,e,e,e,e,e];_.set(r,g*p*e)}const x=new Zn;x.setAttribute("position",new kn(v,f)),x.setAttribute("uv",new kn(y,m)),x.setAttribute("faceIndex",new kn(_,g)),t.push(x),r>4&&r--}return{lodPlanes:t,sizeLods:n,sigmas:i}}(i)),this._blurMaterial=function(e,t,n){const i=new Float32Array(Yi),r=new pt(0,1,0),o=new bi({name:"SphericalGaussianBlur",defines:{n:Yi,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return o}(i,e,t)}return i}_compileMaterial(e){const t=new mi(this._lodPlanes[0],e);this._renderer.compile(t,Ji)}_sceneToCubeUV(e,t,n,i){const r=new Ti(90,1,t,n),o=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,c=a.toneMapping;a.getClearColor(Zi),a.toneMapping=0,a.autoClear=!1;
vendor: 4,100 bytes, line 30
30const u=new Ln({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),d=new mi(new vi,u);let h=!1;const p=e.background;p?p.isColor&&(u.color.copy(p),e.background=null,h=!0):(u.color.copy(Zi),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(r.up.set(0,o[t],0),r.lookAt(s[t],0,0)):1===n?(r.up.set(0,0,o[t]),r.lookAt(0,s[t],0)):(r.up.set(0,o[t],0),r.lookAt(0,0,s[t]));const l=this._cubeSize;rr(i,n*l,t>2?l:0,l,l),a.setRenderTarget(i),h&&a.render(d,r),a.render(e,r)}d.geometry.dispose(),d.material.dispose(),a.toneMapping=c,a.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===v||e.mapping===y;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=sr()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=or());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new mi(this._lodPlanes[0],r);r.uniforms.envMap.value=e;const s=this._cubeSize;rr(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(o,Ji)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),i=tr[(t-1)%tr.length];this._blur(e,t-1,t,n,i)}t.autoClear=n}_blur(e,t,n,i,r){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",r),this._halfBlur(o,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,o,s){const a=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new mi(this._lodPlanes[i],l),u=l.uniforms,d=this._sizeLods[n]-1,h=isFinite(r)?Math.PI/(2*d):2*Math.PI/39,p=r/h,f=isFinite(r)?1+Math.floor(3*p):Yi;f>Yi&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<Yi;++e){const t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<f&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=m,u.latitudinal.value="latitudinal"===o,s&&(u.poleAxis.value=s);const{_lodMax:v}=this;u.dTheta.value=h,u.mipInt.value=v-n;const y=this._sizeLods[i];rr(t,3*y*(i>v-4?i-v+4:0),4*(this._cubeSize-y),3*y,2*y),a.setRenderTarget(t),a.render(c,Ji)}}function ir(e,t,n){const i=new st(e,t,n);return i.texture.mapping=b,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function rr(e,t,n,i,r){e.viewport.set(t,n,i,r),e.scissor.set(t,n,i,r)}function or(){return new bi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );
30\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function sr(){return new bi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function ar(e){let t=new WeakMap,n=null;function i(e){const n=e.target;n.removeEventListener("dispose",i);const r=t.get(n);void 0!==r&&(t.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const o=r.mapping,s=o===_||o===x,a=o===v||o===y;if(s||a){if(r.isRenderTargetTexture&&!0===r.needsPMREMUpdate){r.needsPMREMUpdate=!1;let i=t.get(r);return null===n&&(n=new nr(e)),i=s?n.fromEquirectangular(r,i):n.fromCubemap(r,i),t.set(r,i),i.texture}if(t.has(r))return t.get(r).texture;{const o=r.image;if(s&&o&&o.height>0||a&&o&&function(e){let t=0;const n=6;for(let i=0;i<n;i++)void 0!==e[i]&&t++;return t===n}(o)){null===n&&(n=new nr(e));const o=s?n.fromEquirectangular(r):n.fromCubemap(r);return t.set(r,o),r.addEventListener("dispose",i),o.texture}return null}}}return r},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function lr(e){const t={};
vendor: 11,557 bytes, line 30
30function n(n){if(void 0!==t[n])return t[n];let i;switch(n){case"WEBGL_depth_texture":i=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=e.getExtension(n)}return t[n]=i,i}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function cr(e,t,n,i){const r={},o=new WeakMap;function s(e){const a=e.target;null!==a.index&&t.remove(a.index);for(const e in a.attributes)t.remove(a.attributes[e]);a.removeEventListener("dispose",s),delete r[a.id];const l=o.get(a);l&&(t.remove(l),o.delete(a)),i.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(e){const n=[],i=e.index,r=e.attributes.position;let s=0;if(null!==i){const e=i.array;s=i.version;for(let t=0,i=e.length;t<i;t+=3){const i=e[t+0],r=e[t+1],o=e[t+2];n.push(i,r,r,o,o,i)}}else{const e=r.array;s=r.version;for(let t=0,i=e.length/3-1;t<i;t+=3){const e=t+0,i=t+1,r=t+2;n.push(e,i,i,r,r,e)}}const a=new(Ge(n)?Hn:Un)(n,1);a.version=s;const l=o.get(e);l&&t.remove(l),o.set(e,a)}return{get:function(e,t){return!0===r[t.id]||(t.addEventListener("dispose",s),r[t.id]=!0,n.memory.geometries++),t},update:function(n){const i=n.attributes;for(const n in i)t.update(i[n],e.ARRAY_BUFFER);const r=n.morphAttributes;for(const n in r){const i=r[n];for(let n=0,r=i.length;n<r;n++)t.update(i[n],e.ARRAY_BUFFER)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&a(e)}else a(e);return o.get(e)}}}function ur(e,t,n,i){const r=i.isWebGL2;let o,s,a;this.setMode=function(e){o=e},this.setIndex=function(e){s=e.type,a=e.bytesPerElement},this.render=function(t,i){e.drawElements(o,i,s,t*a),n.update(i,o,1)},this.renderInstances=function(i,l,c){if(0===c)return;let u,d;if(r)u=e,d="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[d](o,l,s,i*a,c),n.update(l,o,c)}}function dr(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(n,i,r){switch(t.calls++,i){case e.TRIANGLES:t.triangles+=r*(n/3);break;case e.LINES:t.lines+=r*(n/2);break;case e.LINE_STRIP:t.lines+=r*(n-1);break;case e.LINE_LOOP:t.lines+=r*n;break;case e.POINTS:t.points+=r*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",i)}}}}function hr(e,t){return e[0]-t[0]}function pr(e,t){return Math.abs(t[1])-Math.abs(e[1])}function fr(e,t){let n=1;const i=t.isInterleavedBufferAttribute?t.data.array:t.array;i instanceof Int8Array?n=127:i instanceof Int16Array?n=32767:i instanceof Int32Array?n=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",i),e.divideScalar(n)}function mr(e,t,n){const i={},r=new Float32Array(8),o=new WeakMap,s=new ot,a=[];for(let e=0;e<8;e++)a[e]=[e,0];return{update:function(l,c,u,d){const h=l.morphTargetInfluences;if(!0===t.isWebGL2){const p=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,f=void 0!==p?p.length:0;let m=o.get(c);if(void 0===m||m.count!==f){void 0!==m&&m.texture.dispose();const y=void 0!==c.morphAttributes.position,_=void 0!==c.morphAttributes.normal,x=void 0!==c.morphAttributes.color,b=c.morphAttributes.position||[],w=c.morphAttributes.normal||[],T=c.morphAttributes.color||[];let S=0;!0===y&&(S=1),!0===_&&(S=2),!0===x&&(S=3);let E=c.attributes.position.count*S,M=1;E>t.maxTextureSize&&(M=Math.ceil(E/t.maxTextureSize),E=t.maxTextureSize);const A=new Float32Array(E*M*4*f),R=new at(A,E,M,f);R.format=U,R.type=O,R.needsUpdate=!0;const C=4*S;for(let P=0;P<f;P++){const I=b[P],k=w[P],D=T[P],N=E*M*4*P;for(let F=0;F<I.count;F++){const B=F*C;!0===y&&(s.fromBufferAttribute(I,F),!0===I.normalized&&fr(s,I),A[N+B+0]=s.x,A[N+B+1]=s.y,A[N+B+2]=s.z,A[N+B+3]=0),!0===_&&(s.fromBufferAttribute(k,F),!0===k.normalized&&fr(s,k),A[N+B+4]=s.x,A[N+B+5]=s.y,A[N+B+6]=s.z,A[N+B+7]=0),!0===x&&(s.fromBufferAttribute(D,F),!0===D.normalized&&fr(s,k),A[N+B+8]=s.x,A[N+B+9]=s.y,A[N+B+10]=s.z,A[N+B+11]=4===D.itemSize?s.w:1)}}function L(){R.dispose(),o.delete(c),c.removeEventListener("dispose",L)}m={count:f,texture:R,size:new He(E,M)},o.set(c,m),c.addEventListener("dispose",L)}let g=0;for(let H=0;H<h.length;H++)g+=h[H];const v=c.morphTargetsRelative?1:1-g;d.getUniforms().setValue(e,"morphTargetBaseInfluence",v),d.getUniforms().setValue(e,"morphTargetInfluences",h),d.getUniforms().setValue(e,"morphTargetsTexture",m.texture,n),d.getUniforms().setValue(e,"morphTargetsTextureSize",m.size)}else{const z=void 0===h?0:h.length;let G=i[c.id];if(void 0===G||G.length!==z){G=[];for(let X=0;X<z;X++)G[X]=[X,0];i[c.id]=G}for(let $=0;$<z;$++){const Y=G[$];Y[0]=$,Y[1]=h[$]}G.sort(pr);for(let J=0;J<8;J++)J<z&&G[J][1]?(a[J][0]=G[J][0],a[J][1]=G[J][1]):(a[J][0]=Number.MAX_SAFE_INTEGER,a[J][1]=0);a.sort(hr);const V=c.morphAttributes.position,W=c.morphAttributes.normal;let j=0;for(let Z=0;Z<8;Z++){const K=a[Z],Q=K[0],ee=K[1];Q!==Number.MAX_SAFE_INTEGER&&ee?(V&&c.getAttribute("morphTarget"+Z)!==V[Q]&&c.setAttribute("morphTarget"+Z,V[Q]),W&&c.getAttribute("morphNormal"+Z)!==W[Q]&&c.setAttribute("morphNormal"+Z,W[Q]),r[Z]=ee,j+=ee):(V&&!0===c.hasAttribute("morphTarget"+Z)&&c.deleteAttribute("morphTarget"+Z),W&&!0===c.hasAttribute("morphNormal"+Z)&&c.deleteAttribute("morphNormal"+Z),r[Z]=0)}const q=c.morphTargetsRelative?1:1-j;d.getUniforms().setValue(e,"morphTargetBaseInfluence",q),d.getUniforms().setValue(e,"morphTargetInfluences",r)}}}}function gr(e,t,n,i){let r=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(s){const a=i.render.frame,l=s.geometry,c=t.get(s,l);return r.get(c)!==a&&(t.update(c),r.set(c,a)),s.isInstancedMesh&&(!1===s.hasEventListener("dispose",o)&&s.addEventListener("dispose",o),n.update(s.instanceMatrix,e.ARRAY_BUFFER),null!==s.instanceColor&&n.update(s.instanceColor,e.ARRAY_BUFFER)),c},dispose:function(){r=new WeakMap}}}const vr=new rt,yr=new at,_r=new ct,xr=new Mi,br=[],wr=[],Tr=new Float32Array(16),Sr=new Float32Array(9),Er=new Float32Array(4);function Mr(e,t,n){const i=e[0];if(i<=0||i>0)return e;const r=t*n;let o=br[r];if(void 0===o&&(o=new Float32Array(r),br[r]=o),0!==t){i.toArray(o,0);for(let i=1,r=0;i!==t;++i)r+=n,e[i].toArray(o,r)}return o}function Ar(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Rr(e,t){for(let n=0,i=t.length;n<i;n++)e[n]=t[n]}function Cr(e,t){let n=wr[t];void 0===n&&(n=new Int32Array(t),wr[t]=n);for(let i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function Lr(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Pr(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Ar(n,t))return;e.uniform2fv(this.addr,t),Rr(n,t)}}function Ir(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(Ar(n,t))return;e.uniform3fv(this.addr,t),Rr(n,t)}}function kr(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Ar(n,t))return;e.uniform4fv(this.addr,t),Rr(n,t)}}function Dr(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(Ar(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Rr(n,t)}else{if(Ar(n,i))return;Er.set(i),e.uniformMatrix2fv(this.addr,!1,Er),Rr(n,i)}}function Or(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(Ar(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Rr(n,t)}else{if(Ar(n,i))return;Sr.set(i),e.uniformMatrix3fv(this.addr,!1,Sr),Rr(n,i)}}function Nr(e,t){const n=this.cache,i=t.elements;if(void 0===i){if(Ar(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Rr(n,t)}else{if(Ar(n,i))return;Tr.set(i),e.uniformMatrix4fv(this.addr,!1,Tr),Rr(n,i)}}function Fr(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Ur(e,t){const n=this.cache;Ar(n,t)||(e.uniform2iv(this.addr,t),Rr(n,t))}function Br(e,t){const n=this.cache;Ar(n,t)||(e.uniform3iv(this.addr,t),Rr(n,t))}function Hr(e,t){const n=this.cache;Ar(n,t)||(e.uniform4iv(this.addr,t),Rr(n,t))}function zr(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Gr(e,t){const n=this.cache;Ar(n,t)||(e.uniform2uiv(this.addr,t),Rr(n,t))}function Vr(e,t){const n=this.cache;Ar(n,t)||(e.uniform3uiv(this.addr,t),Rr(n,t))}function Wr(e,t){const n=this.cache;Ar(n,t)||(e.uniform4uiv(this.addr,t),Rr(n,t))}function jr(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2D(t||vr,r)}function qr(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(t||_r,r)}function Xr(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(t||xr,r)}function $r(e,t,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(t||yr,r)}function Yr(e,t){e.uniform1fv(this.addr,t)}function Jr(e,t){const n=Mr(t,this.size,2);e.uniform2fv(this.addr,n)}function Zr(e,t){const n=Mr(t,this.size,3);e.uniform3fv(this.addr,n)}function Kr(e,t){const n=Mr(t,this.size,4);e.uniform4fv(this.addr,n)}function Qr(e,t){const n=Mr(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function eo(e,t){const n=Mr(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function to(e,t){const n=Mr(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function no(e,t){e.uniform1iv(this.addr,t)}function io(e,t){e.uniform2iv(this.addr,t)}function ro(e,t){e.uniform3iv(this.addr,t)}function oo(e,t){e.uniform4iv(this.addr,t)}function so(e,t){e.uniform1uiv(this.addr,t)}function ao(e,t){e.uniform2uiv(this.addr,t)}function lo(e,t){e.uniform3uiv(this.addr,t)}function co(e,t){e.uniform4uiv(this.addr,t)}function uo(e,t,n){const i=t.length,r=Cr(n,i);e.uniform1iv(this.addr,r);for(let e=0;e!==i;++e)n.setTexture2D(t[e]||vr,r[e])}
vendor: 8,856 bytes, line 30
30function ho(e,t,n){const i=t.length,r=Cr(n,i);e.uniform1iv(this.addr,r);for(let e=0;e!==i;++e)n.setTexture3D(t[e]||_r,r[e])}function po(e,t,n){const i=t.length,r=Cr(n,i);e.uniform1iv(this.addr,r);for(let e=0;e!==i;++e)n.setTextureCube(t[e]||xr,r[e])}function fo(e,t,n){const i=t.length,r=Cr(n,i);e.uniform1iv(this.addr,r);for(let e=0;e!==i;++e)n.setTexture2DArray(t[e]||yr,r[e])}function mo(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Lr;case 35664:return Pr;case 35665:return Ir;case 35666:return kr;case 35674:return Dr;case 35675:return Or;case 35676:return Nr;case 5124:case 35670:return Fr;case 35667:case 35671:return Ur;case 35668:case 35672:return Br;case 35669:case 35673:return Hr;case 5125:return zr;case 36294:return Gr;case 36295:return Vr;case 36296:return Wr;case 35678:case 36198:case 36298:case 36306:case 35682:return jr;case 35679:case 36299:case 36307:return qr;case 35680:case 36300:case 36308:case 36293:return Xr;case 36289:case 36303:case 36311:case 36292:return $r}}(t.type)}function go(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Yr;case 35664:return Jr;case 35665:return Zr;case 35666:return Kr;case 35674:return Qr;case 35675:return eo;case 35676:return to;case 5124:case 35670:return no;case 35667:case 35671:return io;case 35668:case 35672:return ro;case 35669:case 35673:return oo;case 5125:return so;case 36294:return ao;case 36295:return lo;case 36296:return co;case 35678:case 36198:case 36298:case 36306:case 35682:return uo;case 35679:case 36299:case 36307:return ho;case 35680:case 36300:case 36308:case 36293:return po;case 36289:case 36303:case 36311:case 36292:return fo}}(t.type)}function vo(e){this.id=e,this.seq=[],this.map={}}go.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Rr(t,e)},vo.prototype.setValue=function(e,t,n){const i=this.seq;for(let r=0,o=i.length;r!==o;++r){const o=i[r];o.setValue(e,t[o.id],n)}};const yo=/(\w+)(\])?(\[|\.)?/g;function _o(e,t){e.seq.push(t),e.map[t.id]=t}function xo(e,t,n){const i=e.name,r=i.length;for(yo.lastIndex=0;;){const o=yo.exec(i),s=yo.lastIndex;let a=o[1];const l="]"===o[2],c=o[3];if(l&&(a|=0),void 0===c||"["===c&&s+2===r){_o(n,void 0===c?new mo(a,e,t):new go(a,e,t));break}{let e=n.map[a];void 0===e&&(e=new vo(a),_o(n,e)),n=e}}}function bo(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const n=e.getActiveUniform(t,i);xo(n,e.getUniformLocation(t,n.name),this)}}function wo(e,t,n){const i=e.createShader(t);return e.shaderSource(i,n),e.compileShader(i),i}bo.prototype.setValue=function(e,t,n,i){const r=this.map[t];void 0!==r&&r.setValue(e,n,i)},bo.prototype.setOptional=function(e,t,n){const i=t[n];void 0!==i&&this.setValue(e,n,i)},bo.upload=function(e,t,n,i){for(let r=0,o=t.length;r!==o;++r){const o=t[r],s=n[o.id];!1!==s.needsUpdate&&o.setValue(e,s.value,i)}},bo.seqWithValue=function(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const r=e[i];r.id in t&&n.push(r)}return n};let To=0;function So(e,t,n){const i=e.getShaderParameter(t,e.COMPILE_STATUS),r=e.getShaderInfoLog(t).trim();return i&&""===r?"":n.toUpperCase()+"\n\n"+r+"\n\n"+function(e){const t=e.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}(e.getShaderSource(t))}function Eo(e,t){const n=function(e){switch(e){case xe:return["Linear","( value )"];case be:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Mo(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Ao(e){return""!==e}function Ro(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Co(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Lo=/^[ \t]*#include +<([\w\d./]+)>/gm;function Po(e){return e.replace(Lo,Io)}function Io(e,t){const n=Ui[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Po(n)}const ko=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Do=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Oo(e){return e.replace(Do,Fo).replace(ko,No)}function No(e,t,n,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Fo(0,t,n,i)}function Fo(e,t,n,i){let r="";for(let e=parseInt(t);e<parseInt(n);e++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return r}function Uo(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Bo(e,t,n,i){const r=e.getContext(),o=n.defines;let s=n.vertexShader,a=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case v:case y:t="ENVMAP_TYPE_CUBE";break;case b:case w:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case y:case w:t="ENVMAP_MODE_REFRACTION"}return t}(n),d=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),h=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t/32+1)+3,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}}(n),p=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ao).join("\n")}(n),f=function(e){const t=[];for(const n in e){const i=e[n];!1!==i&&t.push("#define "+n+" "+i)}return t.join("\n")}(o),m=r.createProgram();let g,_,x=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[f].filter(Ao).join("\n"),g.length>0&&(g+="\n"),_=[p,f].filter(Ao).join("\n"),_.length>0&&(_+="\n")):(g=[Uo(n),"#define SHADER_NAME "+n.shaderName,f,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alph
vendor: 21,320 bytes, line 30
30aMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Ao).join("\n"),_=[p,Uo(n),"#define SHADER_NAME "+n.shaderName,f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?Ui.tonemapping_pars_fragment:"",0!==n.toneMapping?Mo("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ui.encodings_pars_fragment,Eo("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Ao).join("\n")),s=Po(s),s=Ro(s,n),s=Co(s,n),a=Po(a),a=Ro(a,n),a=Co(a,n),s=Oo(s),a=Oo(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(x="#version 300 es\n",g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,_=["#define varying in",n.glslVersion===Ee?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Ee?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+_);const T=x+g+s,S=x+_+a,E=wo(r,r.VERTEX_SHADER,T),M=wo(r,r.FRAGMENT_SHADER,S);if(r.attachShader(m,E),r.attachShader(m,M),void 0!==n.index0AttributeName?r.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),e.debug.checkShaderErrors){const e=r.getProgramInfoLog(m).trim(),t=r.getShaderInfoLog(E).trim(),n=r.getShaderInfoLog(M).trim();let i=!0,o=!0;if(!1===r.getProgramParameter(m,r.LINK_STATUS)){i=!1;const t=So(r,E,"vertex"),n=So(r,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,r.VALIDATE_STATUS)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+n)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:i,programLog:e,vertexShader:{log:t,prefix:g},fragmentShader:{log:n,prefix:_}})}let A,R;return r.deleteShader(E),r.deleteShader(M),this.getUniforms=function(){return void 0===A&&(A=new bo(r,m)),A},this.getAttributes=function(){return void 0===R&&(R=function(e,t){const n={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const i=e.getActiveAttrib(t,r),o=i.name;let s=1;i.type===e.FLOAT_MAT2&&(s=2),i.type===e.FLOAT_MAT3&&(s=3),i.type===e.FLOAT_MAT4&&(s=4),n[o]={type:i.type,location:e.getAttribLocation(t,o),locationSize:s}}return n}(r,m)),R},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=To++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=E,this.fragmentShader=M,this}let Ho=0;class zo{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return!1===o.has(i)&&(o.add(i),i.usedTimes++),!1===o.has(r)&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;return!1===t.has(e)&&t.set(e,new Set),t.get(e)}_getShaderStage(e){const t=this.shaderCache;if(!1===t.has(e)){const n=new Go;t.set(e,n)}return t.get(e)}}class Go{constructor(){this.id=Ho++,this.usedTimes=0}}function Vo(e,t,n,i,r,o,s){const a=new tn,l=new zo,c=[],u=r.isWebGL2,d=r.logarithmicDepthBuffer,h=r.floatVertexTextures,p=r.maxVertexUniforms,f=r.vertexTextures;let m=r.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(o,a,c,v,y){const _=v.fog,x=y.geometry,T=o.isMeshStandardMaterial?v.environment:null,S=(o.isMeshStandardMaterial?n:t).get(o.envMap||T),E=!S||S.mapping!==b&&S.mapping!==w?null:S.image.height,M=g[o.type],A=y.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(h)return 1024;{const e=p,n=Math.floor((e-20)/4),i=Math.min(n,t.length);return i<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+i+"."),0):i}}(y):0;null!==o.precision&&(m=r.getMaxPrecision(o.precision),m!==o.precision&&console.warn("THREE.WebGLProgram.getParameters:",o.precision,"not supported, using",m,"instead."));const R=x.morphAttributes.position||x.morphAttributes.normal||x.morphAttributes.color,C=void 0!==R?R.length:0;let L,P,I,k,D=0;if(void 0!==x.morphAttributes.position&&(D=1),void 0!==x.morphAttributes.normal&&(D=2),void 0!==x.morphAttributes.color&&(D=3),M){const e=Hi[M];L=e.vertexShader,P=e.fragmentShader}else L=o.vertexShader,P=o.fragmentShader,l.update(o),I=l.getVertexShaderID(o),k=l.getFragmentShaderID(o);const O=e.getRenderTarget(),N=o.alphaTest>0,F=o.clearcoat>0;return{isWebGL2:u,shaderID:M,shaderName:o.type,vertexShader:L,fragmentShader:P,defines:o.defines,customVertexShaderID:I,customFragmentShaderID:k,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:m,instancing:!0===y.isInstancedMesh,instancingColor:!0===y.isInstancedMesh&&null!==y.instanceColor,supportsVertexTextures:f,outputEncoding:null===O?e.outputEncoding:!0===O.isXRRenderTarget?O.texture.encoding:xe,map:!!o.map,matcap:!!o.matcap,envMap:!!S,envMapMode:S&&S.mapping,envMapCubeUVHeight:E,lightMap:!!o.lightMap,aoMap:!!o.aoMap,emissiveMap:!!o.emissiveMap,bumpMap:!!o.bumpMap,normalMap:!!o.normalMap,objectSpaceNormalMap:1===o.normalMapType,tangentSpaceNormalMap:0===o.normalMapType,decodeVideoTexture:!!o.map&&!0===o.map.isVideoTexture&&o.map.encoding===be,clearcoat:F,clearcoatMap:F&&!!o.clearcoatMap,clearcoatRoughnessMap:F&&!!o.clearcoatRoughnessMap,clearcoatNormalMap:F&&!!o.clearcoatNormalMap,displacementMap:!!o.displacementMap,roughnessMap:!!o.roughnessMap,metalnessMap:!!o.metalnessMap,specularMap:!!o.specularMap,specularIntensityMap:!!o.specularIntensityMap,specularColorMap:!!o.specularColorMap,opaque:!1===o.transparent&&1===o.blending,alphaMap:!!o.alphaMap,alphaTest:N,gradientMap:!!o.gradientMap,sheen:o.sheen>0,sheenColorMap:!!o.sheenColorMap,sheenRoughnessMap:!!o.sheenRoughnessMap,transmission:o.transmission>0,transmissionMap:!!o.transmissionMap,thicknessMap:!!o.thicknessMap,combine:o.combine,vertexTangents:!!o.normalMap&&!!x.attributes.tangent,vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!x.attributes.color&&4===x.attributes.color.itemSize,vertexUvs:!!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatMap||o.clearcoatRoughnessMap||o.clearcoatNormalMap||o.displacementMap||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheenColorMap||o.sheenRoughnessMap),uvsVertexOnly:!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatNormalMap||o.transmission>0||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheen>0||o.sheenColorMap||o.sheenRoughnessMap||!o.displacementMap),fog:!!_,useFog:o.fog,fogExp2:_&&_.isFogExp2,flatShading:!!o.flatShading,sizeAttenuation:o.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===y.isSkinnedMesh&&A>0,maxBones:A,useVertexTexture:h,morphTargets:void 0!==x.morphAttributes.position,morphNormals:void 0!==x.morphAttributes.normal,morphColors:void 0!==x.morphAttributes.color,morphTargetsCount:C,morphTextureStride:D,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:o.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:o.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:o.premultipliedAlpha,doubleSided:2===o.side,flipSided:1===o.side,depthPacking:void 0!==o.depthPacking&&o.depthPacking,index0AttributeName:o.index0AttributeName,extensionDerivatives:o.extensions&&o.extensions.derivatives,extensionFragDepth:o.extensions&&o.extensions.fragDepth,extensionDrawBuffers:o.extensions&&o.extensions.drawBuffers,extensionShaderTextureLOD:o.extensions&&o.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:o.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.maxBones),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection)}(n,t),function(e,t){a.disableAll(),t.isWebGL2&&a.enable(0),t.supportsVertexTextures&&a.enable(1),t.instancing&&a.enable(2),t.instancingColor&&a.enable(3),t.map&&a.enable(4),t.matcap&&a.enable(5),t.envMap&&a.enable(6),t.lightMap&&a.enable(7),t.aoMap&&a.enable(8),t.emissiveMap&&a.enable(9),t.bumpMap&&a.enable(10),t.normalMap&&a.enable(11),t.objectSpaceNormalMap&&a.enable(12),t.tangentSpaceNormalMap&&a.enable(13),t.clearcoat&&a.enable(14),t.clearcoatMap&&a.enable(15),t.clearcoatRoughnessMap&&a.enable(16),t.clearcoatNormalMap&&a.enable(17),t.displacementMap&&a.enable(18),t.specularMap&&a.enable(19),t.roughnessMap&&a.enable(20),t.metalnessMap&&a.enable(21),t.gradientMap&&a.enable(22),t.alphaMap&&a.enable(23),t.alphaTest&&a.enable(24),t.vertexColors&&a.enable(25),t.vertexAlphas&&a.enable(26),t.vertexUvs&&a.enable(27),t.vertexTangents&&a.enable(28),t.uvsVertexOnly&&a.enable(29),t.fog&&a.enable(30),e.push(a.mask),a.disableAll(),t.useFog&&a.enable(0),t.flatShading&&a.enable(1),t.logarithmicDepthBuffer&&a.enable(2),t.skinning&&a.enable(3),t.useVertexTexture&&a.enable(4),t.morphTargets&&a.enable(5),t.morphNormals&&a.enable(6),t.morphColors&&a.enable(7),t.premultipliedAlpha&&a.enable(8),t.shadowMapEnabled&&a.enable(9),t.physicallyCorrectLights&&a.enable(10),t.doubleSided&&a.enable(11),t.flipSided&&a.enable(12),t.depthPacking&&a.enable(13),t.dithering&&a.enable(14),t.specularIntensityMap&&a.enable(15),t.specularColorMap&&a.enable(16),t.transmission&&a.enable(17),t.transmissionMap&&a.enable(18),t.thicknessMap&&a.enable(19),t.sheen&&a.enable(20),t.sheenColorMap&&a.enable(21),t.sheenRoughnessMap&&a.enable(22),t.decodeVideoTexture&&a.enable(23),t.opaque&&a.enable(24),e.push(a.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=g[e.type];let n;if(t){const e=Hi[t];n=xi.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let i;for(let e=0,t=c.length;e<t;e++){const t=c[e];if(t.cacheKey===n){i=t,++i.usedTimes;break}}return void 0===i&&(i=new Bo(e,n,t,o),c.push(i)),i},releaseProgram:function(e){if(0===--e.usedTimes){const t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:c,dispose:function(){l.dispose()}}}function Wo(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,i){e.get(t)[n]=i},dispose:function(){e=new WeakMap}}}function jo(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function qo(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Xo(){const e=[];let t=0;const n=[],i=[],r=[];function o(n,i,r,o,s,a){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:i,material:r,groupOrder:o,renderOrder:n.renderOrder,z:s,group:a},e[t]=l):(l.id=n.id,l.object=n,l.geometry=i,l.material=r,l.groupOrder=o,l.renderOrder=n.renderOrder,l.z=s,l.group=a),t++,l}return{opaque:n,transmissive:i,transparent:r,init:function(){t=0,n.length=0,i.length=0,r.length=0},push:function(e,t,s,a,l,c){const u=o(e,t,s,a,l,c);s.transmission>0?i.push(u):!0===s.transparent?r.push(u):n.push(u)},unshift:function(e,t,s,a,l,c){const u=o(e,t,s,a,l,c);s.transmission>0?i.unshift(u):!0===s.transparent?r.unshift(u):n.unshift(u)},finish:function(){for(let n=t,i=e.length;n<i;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||jo),i.length>1&&i.sort(t||qo),r.length>1&&r.sort(t||qo)}}}function $o(){let e=new WeakMap;return{get:function(t,n){let i;return!1===e.has(t)?(i=new Xo,e.set(t,[i])):n>=e.get(t).length?(i=new Xo,e.get(t).push(i)):i=e.get(t)[n],i},dispose:function(){e=new WeakMap}}}function Yo(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new pt,color:new Ke};break;case"SpotLight":n={position:new pt,direction:new pt,color:new Ke,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new pt,color:new Ke,distance:0,decay:0};break;case"HemisphereLight":n={direction:new pt,skyColor:new Ke,groundColor:new Ke};break;case"RectAreaLight":n={color:new Ke,position:new pt,halfWidth:new pt,halfHeight:new pt}}return e[t.id]=n,n}}}let Jo=0;function Zo(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Ko(e,t){const n=new Yo,i=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new He,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let e=0;e<9;e++)r.probe.push(new pt);const o=new pt,s=new Wt,a=new Wt;return{setup:function(o,s){let a=0,l=0,c=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let u=0,d=0,h=0,p=0,f=0,m=0,g=0,v=0;o.sort(Zo);const y=!0!==s?Math.PI:1;for(let e=0,t=o.length;e<t;e++){const t=o[e],s=t.color,_=t.intensity,x=t.distance,b=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=s.r*_*y,l+=s.g*_*y,c+=s.b*_*y;else if(t.isLightProbe)for(let e=0;e<9;e++)r.probe[e].addScaledVector(t.sh.coefficients[e],_);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*y),t.castShadow){const e=t.shadow,n=i.get(t);
vendor: 9,949 bytes, line 30
30n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,r.directionalShadow[u]=n,r.directionalShadowMap[u]=b,r.directionalShadowMatrix[u]=t.shadow.matrix,m++}r.directional[u]=e,u++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(s).multiplyScalar(_*y),e.distance=x,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=i.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,r.spotShadow[h]=n,r.spotShadowMap[h]=b,r.spotShadowMatrix[h]=t.shadow.matrix,v++}r.spot[h]=e,h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(s).multiplyScalar(_),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),r.rectArea[p]=e,p++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*y),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=i.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,r.pointShadow[d]=n,r.pointShadowMap[d]=b,r.pointShadowMatrix[d]=t.shadow.matrix,g++}r.point[d]=e,d++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(_*y),e.groundColor.copy(t.groundColor).multiplyScalar(_*y),r.hemi[f]=e,f++}}p>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=Bi.LTC_FLOAT_1,r.rectAreaLTC2=Bi.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Bi.LTC_HALF_1,r.rectAreaLTC2=Bi.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=a,r.ambient[1]=l,r.ambient[2]=c;const _=r.hash;_.directionalLength===u&&_.pointLength===d&&_.spotLength===h&&_.rectAreaLength===p&&_.hemiLength===f&&_.numDirectionalShadows===m&&_.numPointShadows===g&&_.numSpotShadows===v||(r.directional.length=u,r.spot.length=h,r.rectArea.length=p,r.point.length=d,r.hemi.length=f,r.directionalShadow.length=m,r.directionalShadowMap.length=m,r.pointShadow.length=g,r.pointShadowMap.length=g,r.spotShadow.length=v,r.spotShadowMap.length=v,r.directionalShadowMatrix.length=m,r.pointShadowMatrix.length=g,r.spotShadowMatrix.length=v,_.directionalLength=u,_.pointLength=d,_.spotLength=h,_.rectAreaLength=p,_.hemiLength=f,_.numDirectionalShadows=m,_.numPointShadows=g,_.numSpotShadows=v,r.version=Jo++)},setupView:function(e,t){let n=0,i=0,l=0,c=0,u=0;const d=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){const h=e[t];if(h.isDirectionalLight){const e=r.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),n++}else if(h.isSpotLight){const e=r.spot[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),l++}else if(h.isRectAreaLight){const e=r.rectArea[c];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),a.identity(),s.copy(h.matrixWorld),s.premultiply(d),a.extractRotation(s),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(a),e.halfHeight.applyMatrix4(a),c++}else if(h.isPointLight){const e=r.point[i];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),i++}else if(h.isHemisphereLight){const e=r.hemi[u];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(d),e.direction.normalize(),u++}}},state:r}}function Qo(e,t){const n=new Ko(e,t),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:function(e){n.setup(i,e)},setupLightsView:function(e){n.setupView(i,e)},pushLight:function(e){i.push(e)},pushShadow:function(e){r.push(e)}}}function es(e,t){let n=new WeakMap;return{get:function(i,r=0){let o;return!1===n.has(i)?(o=new Qo(e,t),n.set(i,[o])):r>=n.get(i).length?(o=new Qo(e,t),n.get(i).push(o)):o=n.get(i)[r],o},dispose:function(){n=new WeakMap}}}class ts extends Cn{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}ts.prototype.isMeshDepthMaterial=!0;class ns extends Cn{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new pt,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function is(e,t,n){let i=new Di;const r=new He,o=new He,s=new ot,a=new ts({depthPacking:3201}),l=new ns,c={},u=n.maxTextureSize,d={0:1,1:0,2:2},h=new bi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new He},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=h.clone();p.defines.HORIZONTAL_PASS=1;const f=new Zn;f.setAttribute("position",new kn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new mi(f,h),g=this;function v(n,i){const r=t.update(m);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,p.needsUpdate=!0),h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(i,null,r,h,m,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(i,null,r,p,m,null)}function y(t,n,i,r,o,s){let u=null;const h=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(u=void 0!==h?h:!0===i.isPointLight?l:a,e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0){const e=u.uuid,t=n.uuid;let i=c[e];void 0===i&&(i={},c[e]=i);let r=i[t];void 0===r&&(r=u.clone(),i[t]=r),u=r}return u.visible=n.visible,u.wireframe=n.wireframe,u.side=3===s?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:d[n.side],u.alphaMap=n.alphaMap,u.alphaTest=n.alphaTest,u.clipShadows=n.clipShadows,u.clippingPlanes=n.clippingPlanes,u.clipIntersection=n.clipIntersection,u.displacementMap=n.displacementMap,u.displacementScale=n.displacementScale,u.displacementBias=n.displacementBias,u.wireframeLinewidth=n.wireframeLinewidth,u.linewidth=n.linewidth,!0===i.isPointLight&&!0===u.isMeshDistanceMaterial&&(u.referencePosition.setFromMatrixPosition(i.matrixWorld),u.nearDistance=r,u.farDistance=o),u}function _(n,r,o,s,a){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===a)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const i=t.update(n),r=n.material;if(Array.isArray(r)){const t=i.groups;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=r[c.materialIndex];if(u&&u.visible){const t=y(n,u,s,o.near,o.far,a);e.renderBufferDirect(o,null,i,t,n,c)}}}else if(r.visible){const t=y(n,r,s,o.near,o.far,a);e.renderBufferDirect(o,null,i,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)_(l[e],r,o,s,a)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,a){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),h=e.state;h.setBlending(0),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);for(let l=0,c=t.length;l<c;l++){const c=t[l],d=c.shadow;if(void 0===d){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===d.autoUpdate&&!1===d.needsUpdate)continue;r.copy(d.mapSize);const p=d.getFrameExtents();
vendor: 6,535 bytes, line 30
30if(r.multiply(p),o.copy(d.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(o.x=Math.floor(u/p.x),r.x=o.x*p.x,d.mapSize.x=o.x),r.y>u&&(o.y=Math.floor(u/p.y),r.y=o.y*p.y,d.mapSize.y=o.y)),null===d.map&&!d.isPointLightShadow&&3===this.type){const e={minFilter:C,magFilter:C,format:U};d.map=new st(r.x,r.y,e),d.map.texture.name=c.name+".shadowMap",d.mapPass=new st(r.x,r.y,e),d.camera.updateProjectionMatrix()}if(null===d.map){const e={minFilter:M,magFilter:M,format:U};d.map=new st(r.x,r.y,e),d.map.texture.name=c.name+".shadowMap",d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();const f=d.getViewportCount();for(let e=0;e<f;e++){const t=d.getViewport(e);s.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),h.viewport(s),d.updateMatrices(c,e),i=d.getFrustum(),_(n,a,d.camera,c,this.type)}d.isPointLightShadow||3!==this.type||v(d,a),d.needsUpdate=!1}g.needsUpdate=!1,e.setRenderTarget(l,c,d)}}function rs(e,t,g){const v=g.isWebGL2,y=new function(){let t=!1;const n=new ot;let i=null;const r=new ot(0,0,0,0);return{setMask:function(n){i===n||t||(e.colorMask(n,n,n,n),i=n)},setLocked:function(e){t=e},setClear:function(t,i,o,s,a){!0===a&&(t*=s,i*=s,o*=s),n.set(t,i,o,s),!1===r.equals(n)&&(e.clearColor(t,i,o,s),r.copy(n))},reset:function(){t=!1,i=null,r.set(-1,0,0,0)}}},_=new function(){let t=!1,n=null,i=null,r=null;return{setTest:function(t){t?K(e.DEPTH_TEST):Q(e.DEPTH_TEST)},setMask:function(i){n===i||t||(e.depthMask(i),n=i)},setFunc:function(t){if(i!==t){if(t)switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:default:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL)}else e.depthFunc(e.LEQUAL);i=t}},setLocked:function(e){t=e},setClear:function(t){r!==t&&(e.clearDepth(t),r=t)},reset:function(){t=!1,n=null,i=null,r=null}}},x=new function(){let t=!1,n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null;return{setTest:function(n){t||(n?K(e.STENCIL_TEST):Q(e.STENCIL_TEST))},setMask:function(i){n===i||t||(e.stencilMask(i),n=i)},setFunc:function(t,n,s){i===t&&r===n&&o===s||(e.stencilFunc(t,n,s),i=t,r=n,o=s)},setOp:function(t,n,i){s===t&&a===n&&l===i||(e.stencilOp(t,n,i),s=t,a=n,l=i)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null}}};let b={},w={},T=new WeakMap,S=[],E=null,M=!1,A=null,R=null,C=null,L=null,P=null,I=null,k=null,D=!1,O=null,N=null,F=null,U=null,B=null;const H=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let z=!1,G=0;const V=e.getParameter(e.VERSION);-1!==V.indexOf("WebGL")?(G=parseFloat(/^WebGL (\d)/.exec(V)[1]),z=G>=1):-1!==V.indexOf("OpenGL ES")&&(G=parseFloat(/^OpenGL ES (\d)/.exec(V)[1]),z=G>=2);let W=null,j={};const q=e.getParameter(e.SCISSOR_BOX),X=e.getParameter(e.VIEWPORT),$=(new ot).fromArray(q),Y=(new ot).fromArray(X);function J(t,n,i){const r=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let t=0;t<i;t++)e.texImage2D(n+t,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,r);return o}const Z={};function K(t){!0!==b[t]&&(e.enable(t),b[t]=!0)}function Q(t){!1!==b[t]&&(e.disable(t),b[t]=!1)}Z[e.TEXTURE_2D]=J(e.TEXTURE_2D,e.TEXTURE_2D,1),Z[e.TEXTURE_CUBE_MAP]=J(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),y.setClear(0,0,0,1),_.setClear(1),x.setClear(0),K(e.DEPTH_TEST),_.setFunc(3),ie(!1),re(1),K(e.CULL_FACE),ne(0);const ee={[n]:e.FUNC_ADD,[i]:e.FUNC_SUBTRACT,[r]:e.FUNC_REVERSE_SUBTRACT};if(v)ee[103]=e.MIN,ee[104]=e.MAX;else{const e=t.get("EXT_blend_minmax");null!==e&&(ee[103]=e.MIN_EXT,ee[104]=e.MAX_EXT)}const te={[o]:e.ZERO,[s]:e.ONE,[a]:e.SRC_COLOR,[c]:e.SRC_ALPHA,[m]:e.SRC_ALPHA_SATURATE,[p]:e.DST_COLOR,[d]:e.DST_ALPHA,[l]:e.ONE_MINUS_SRC_COLOR,[u]:e.ONE_MINUS_SRC_ALPHA,[f]:e.ONE_MINUS_DST_COLOR,[h]:e.ONE_MINUS_DST_ALPHA};function ne(t,i,r,o,s,a,l,c){if(0!==t){if(!1===M&&(K(e.BLEND),M=!0),5===t)s=s||i,a=a||r,l=l||o,i===R&&s===P||(e.blendEquationSeparate(ee[i],ee[s]),R=i,P=s),r===C&&o===L&&a===I&&l===k||(e.blendFuncSeparate(te[r],te[o],te[a],te[l]),C=r,L=o,I=a,k=l),A=t,D=null;else if(t!==A||c!==D){if(R===n&&P===n||(e.blendEquation(e.FUNC_ADD),R=n,P=n),c)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.SRC_ALPHA,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFunc(e.ZERO,e.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}C=null,L=null,I=null,k=null,A=t,D=c}}else!0===M&&(Q(e.BLEND),M=!1)}function ie(t){O!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),O=t)}function re(t){0!==t?(K(e.CULL_FACE),t!==N&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):Q(e.CULL_FACE),N=t}function oe(t,n,i){t?(K(e.POLYGON_OFFSET_FILL),U===n&&B===i||(e.polygonOffset(n,i),U=n,B=i)):Q(e.POLYGON_OFFSET_FILL)}function se(t){void 0===t&&(t=e.TEXTURE0+H-1),W!==t&&(e.activeTexture(t),W=t)}return{buffers:{color:y,depth:_,stencil:x},enable:K,disable:Q,bindFramebuffer:function(t,n){return w[t]!==n&&(e.bindFramebuffer(t,n),w[t]=n,v&&(t===e.DRAW_FRAMEBUFFER&&(w[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(w[e.DRAW_FRAMEBUFFER]=n)),!0)},drawBuffers:function(n,i){let r=S,o=!1;if(n)if(r=T.get(i),void 0===r&&(r=[],T.set(i,r)),n.isWebGLMultipleRenderTargets){const t=n.texture;if(r.length!==t.length||r[0]!==e.COLOR_ATTACHMENT0){for(let n=0,i=t.length;n<i;n++)r[n]=e.COLOR_ATTACHMENT0+n;r.length=t.length,o=!0}}else r[0]!==e.COLOR_ATTACHMENT0&&(r[0]=e.COLOR_ATTACHMENT0,o=!0);else r[0]!==e.BACK&&(r[0]=e.BACK,o=!0);o&&(g.isWebGL2?e.drawBuffers(r):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(r))},useProgram:function(t){return E!==t&&(e.useProgram(t),E=t,!0)},setBlending:ne,setMaterial:function(t,n){2===t.side?Q(e.CULL_FACE):K(e.CULL_FACE);let i=1===t.side;n&&(i=!i),ie(i),1===t.blending&&!1===t.transparent?ne(0):ne(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha),_.setFu
vendor: 4,107 bytes, line 30
30nc(t.depthFunc),_.setTest(t.depthTest),_.setMask(t.depthWrite),y.setMask(t.colorWrite);const r=t.stencilWrite;x.setTest(r),r&&(x.setMask(t.stencilWriteMask),x.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),x.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),oe(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?K(e.SAMPLE_ALPHA_TO_COVERAGE):Q(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:ie,setCullFace:re,setLineWidth:function(t){t!==F&&(z&&e.lineWidth(t),F=t)},setPolygonOffset:oe,setScissorTest:function(t){t?K(e.SCISSOR_TEST):Q(e.SCISSOR_TEST)},activeTexture:se,bindTexture:function(t,n){null===W&&se();let i=j[W];void 0===i&&(i={type:void 0,texture:void 0},j[W]=i),i.type===t&&i.texture===n||(e.bindTexture(t,n||Z[t]),i.type=t,i.texture=n)},unbindTexture:function(){const t=j[W];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===$.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),$.copy(t))},viewport:function(t){!1===Y.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),Y.copy(t))},reset:function(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),!0===v&&(e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),b={},W=null,j={},w={},T=new WeakMap,S=[],E=null,M=!1,A=null,R=null,C=null,L=null,P=null,I=null,k=null,D=!1,O=null,N=null,F=null,U=null,B=null,$.set(0,0,e.canvas.width,e.canvas.height),Y.set(0,0,e.canvas.width,e.canvas.height),y.reset(),_.reset(),x.reset()}}}function os(e,t,n,i,r,o,s){const a=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,u=r.maxTextureSize,d=r.maxSamples,h=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,p=new WeakMap;let f;const m=new WeakMap;let g=!1;try{g="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function v(e,t){return g?new OffscreenCanvas(e,t):je("canvas")}function y(e,t,n,i){let r=1;if((e.width>i||e.height>i)&&(r=i/Math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const i=t?Ue:Math.floor,o=i(r*e.width),s=i(r*e.height);void 0===f&&(f=v(o,s));const a=n?v(o,s):f;return a.width=o,a.height=s,a.getContext("2d").drawImage(e,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+
30o+"x"+s+")."),a}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function _(e){return Ne(e.width)&&Ne(e.height)}function x(e,t){return e.generateMipmaps&&t&&e.minFilter!==M&&e.minFilter!==C}function b(t){e.generateMipmap(t)}function w(n,i,r,o,s=!1){if(!1===a)return i;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=i;return i===e.RED&&(r===e.FLOAT&&(l=e.R32F),r===e.HALF_FLOAT&&(l=e.R16F),r===e.UNSIGNED_BYTE&&(l=e.R8)),i===e.RG&&(r===e.FLOAT&&(l=e.RG32F),r===e.HALF_FLOAT&&(l=e.RG16F),r===e.UNSIGNED_BYTE&&(l=e.RG8)),i===e.RGBA&&(r===e.FLOAT&&(l=e.RGBA32F),r===e.HALF_FLOAT&&(l=e.RGBA16F),r===e.UNSIGNED_BYTE&&(l=o===be&&!1===s?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT_4_4_4_4&&(l=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(l=e.RGB5_A1)),l!==e.R16F&&l!==e.R32F&&l!==e.RG16F&&l!==e.RG32F&&l!==e.RGBA16F&&l!==e.RGBA32F||t.get("EXT_color_buffer_float"),l}function z(e,t,n){return!0===x(e,n)||e.isFramebufferTexture&&e.minFilter!==M&&e.minFilter!==C?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function G(t){return t===M||t===A||t===R?e.NEAREST:e.LINEAR}function V(e){const t=e.target;t.removeEventListener("dispose",V),function(e){const t=i.get(e);if(void 0===t.__webglInit)return;const n=e.source,r=m.get(n);if(r){const i=r[t.__cacheKey];i.usedTimes--,0===i.usedTimes&&j(e),0===Object.keys(r).length&&m.delete(n)}i.remove(e)}(t),t.isVideoTexture&&p.delete(t)}function W(t){const n=t.target;n.removeEventListener("dispose",W),function(t){const n=t.texture,r=i.get(t),o=i.get(n);if(void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),s.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(r.__webglFramebuffer[t]),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[t]);else e.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer&&e.deleteRenderbuffer(r.__webglColorRenderbuffer),r.__webglDepthRenderbuffer&&e.deleteRenderbuffer(r.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let t=0,r=n.length;t<r;t++){const r=i.get(n[t]);r.__webglTexture&&(e.deleteTexture(r.__webglTexture),s.memory.textures--),i.remove(n[t])}i.remove(n),i.remove(t)}(n)}function j(t){const n=i.get(t);e.deleteTexture(n.__webglTexture);const r=t.source;delete m.get(r)[n.__cacheKey],s.memory.textures--}let q=0;function X(t,r){const o=i.get(t);if(t.isVideoTexture&&function(e){const t=s.render.frame;p.get(e)!==t&&(p.set(e,t),e.update())}(t),!1===t.isRenderTargetTexture&&t.version>0&&o.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void K(o,t,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(e.TEXTURE0+r),n.bindTexture(e.TEXTURE_2D,o.__webglTexture)}const $={[T]:e.REPEAT,[S]:e.CLAMP_TO_EDGE,[E]:e.MIRRORED_REPEAT},Y={[M]:e.NEAREST,[A]:e.NEAREST_MIPMAP_NEAREST,[R]:e.NEAREST_MIPMAP_LINEAR,[C]:e.LINEAR,[L]:e.LINEAR_MIPMAP_NEAREST,[P]:e.LINEAR_MIPMAP_LINEAR};
30function J(n,o,s){if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,$[o.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,$[o.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,$[o.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,Y[o.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,Y[o.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),o.wrapS===S&&o.wrapT===S||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,G(o.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,G(o.minFilter)),o.minFilter!==M&&o.minFilter!==C&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const s=t.get("EXT_texture_filter_anisotropic");if(o.type===O&&!1===t.has("OES_texture_float_linear"))return;if(!1===a&&o.type===N&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||i.get(o).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,r.getMaxAnisotropy())),i.get(o).__currentAnisotropy=o.anisotropy)}}function Z(t,n){let i=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",V));const r=n.source;let o=m.get(r);void 0===o&&(o={},m.set(r,o));const a=function(e){const t=[];
30return t.push(e.wrapS),t.push(e.wrapT),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(a!==t.__cacheKey){void 0===o[a]&&(o[a]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,i=!0),o[a].usedTimes++;const r=o[t.__cacheKey];void 0!==r&&(o[t.__cacheKey].usedTimes--,0===r.usedTimes&&j(n)),t.__cacheKey=a,t.__webglTexture=o[a].texture}return i}function K(t,i,r){let s=e.TEXTURE_2D;i.isDataArrayTexture&&(s=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(s=e.TEXTURE_3D);const l=Z(t,i),c=i.source;if(n.activeTexture(e.TEXTURE0+r),n.bindTexture(s,t.__webglTexture),c.version!==c.__currentVersion||!0===l){e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const r=function(e){return!a&&(e.wrapS!==S||e.wrapT!==S||e.minFilter!==M&&e.minFilter!==C)}(i)&&!1===_(i.image);let l=y(i.image,r,!1,u);l=re(i,l);const d=_(l)||a,h=o.convert(i.format,i.encoding);let p,f=o.convert(i.type),m=w(i.internalFormat,h,f,i.encoding,i.isVideoTexture);J(s,i,d);const g=i.mipmaps,v=a&&!0!==i.isVideoTexture,T=void 0===t.__version,E=z(i,l,d);if(i.isDepthTexture)m=e.DEPTH_COMPONENT,a?m=i.type===O?e.DEPTH_COMPONENT32F:i.type===D?e.DEPTH_COMPONENT24:i.type===F?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:i.type===O&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===B&&m===e.DEPTH_COMPONENT&&i.type!==k&&i.type!==D&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=k,f=o.convert(i.type)),i.format===H&&m===e.DEPTH_COMPONENT&&(m=e.DEPTH_STENCIL,i.type!==F&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=F,f=o.convert(i.type))),v&&T?n.texStorage2D(e.TEXTURE_2D,1,m,l.width,l.height):n.texImage2D(e.TEXTURE_2D,0,m,l.width,l.height,0,h,f,null);else if(i.isDataTexture)if(g.length>0&&d){v&&T&&n.texStorage2D(e.TEXTURE_2D,E,m,g[0].width,g[0].height);for(let t=0,i=g.length;t<i;t++)p=g[t],v?n.texSubImage2D(e.TEXTURE_2D,t,0,0,p.width,p.height,h,f,p.data):n.texImage2D(e.TEXTURE_2D,t,m,p.width,p.height,0,h,f,p.data);i.generateMipmaps=!1}else v?(T&&n.texStorage2D(e.TEXTURE_2D,E,m,l.width,l.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,l.width,l.height,h,f,l.data)):n.texImage2D(e.TEXTURE_2D,0,m,l.width,l.height,0,h,f,l.data);else if(i.isCompressedTexture){v&&T&&n.texStorage2D(e.TEXTURE_2D,E,m,g[0].width,g[0].height);for(let t=0,r=g.length;t<r;t++)p=g[t],i.format!==U?null!==h?v?n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,p.width,p.height,h,p.data):n.compressedTexImage2D(e.TEXTURE_2D,t,m,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):v?n.texSubImage2D(e.TEXTURE_2D,t,0,0,p.width,p.height,h,f,p.data):n.texImage2D(e.TEXTURE_2D,t,m,p.width,p.height,0,h,f,p.data)}else if(i.isDataArrayTexture)v?(T&&n.texStorage3D(e.TEXTURE_2D_ARRAY,E,m,l.width,l.height,l.depth),n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,l.width,l.height,l.depth,h,f,l.data)):n.texImage3D(e.TEXTURE_2D_ARRAY,0,m,l.width,l.height,l.depth,0,h,f,l.data);else if(i.isData3DTexture)v?(T&&n.texStorage3D(e.TEXTURE_3D,E,m,l.width,l.height,l.depth),n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,l.width,l.height,l.depth,h,f,l.data)):n.texImage3D(e.TEXTURE_3D,0,m,l.width,l.height,l.depth,0,h,f,l.data);else if(i.isFramebufferTexture)v&&T?n.texStorage2D(e.TEXTURE_2D,E,m,l.width,l.height):n.texImage2D(e.TEXTURE_2D,0,m,l.width,l.height,0,h,f,null);else if(g.length>0&&d){v&&T&&n.texStorage2D(e.TEXTURE_2D,E,m,g[0].width,g[0].height);for(let t=0,i=g.length;t<i;t++)p=g[t],v?n.texSubImage2D(e.TEXTURE_2D,t,0,0,h,f,p):n.texImage2D(e.TEXTURE_2D,t,m,h,f,p);i.generateMipmaps=!1}else v?(T&&n.texStorage2D(e.TEXTURE_2D,E,m,l.width,l.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,h,f,l)):n.texImage2D(e.TEXTURE_2D,0,m,h,f,l);
30x(i,d)&&b(s),c.__currentVersion=c.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}function Q(t,r,s,a,l){const c=o.convert(s.format,s.encoding),u=o.convert(s.type),d=w(s.internalFormat,c,u,s.encoding);i.get(r).__hasExternalTextures||(l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,0,d,r.width,r.height,r.depth,0,c,u,null):n.texImage2D(l,0,d,r.width,r.height,0,c,u,null)),n.bindFramebuffer(e.FRAMEBUFFER,t),ie(r)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,a,l,i.get(s).__webglTexture,0,ne(r)):e.framebufferTexture2D(e.FRAMEBUFFER,a,l,i.get(s).__webglTexture,0),n.bindFramebuffer(e.FRAMEBUFFER,null)}function ee(t,n,i){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let r=e.DEPTH_COMPONENT16;if(i||ie(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===O?r=e.DEPTH_COMPONENT32F:t.type===D&&(r=e.DEPTH_COMPONENT24));const i=ne(n);ie(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,r,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,i,r,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,r,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const r=ne(n);i&&!1===ie(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,n.width,n.height):ie(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,r=o.convert(t.format,t.encoding),s=o.convert(t.type),a=w(t.internalFormat,r,s,t.encoding),l=ne(n);i&&!1===ie(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,l,a,n.width,n.height):ie(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,l,a,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,a,n.width,n.height)}e.bindRenderbuffer(e.RENDERBUFFER,null)}function te(t){const r=i.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!r.__autoAllocateDepthBuffer){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,r){if(r&&r.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(e.FRAMEBUFFER,t),!r.depthTexture||!r.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(r.depthTexture).__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),X(r.depthTexture,0);const o=i.get(r.depthTexture).__webglTexture,s=ne(r);if(r.depthTexture.format===B)ie(r)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,o,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,o,0);else{if(r.depthTexture.format!==H)throw new Error("Unknown depthTexture format");ie(r)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,o,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,o,0)}}(r.__webglFramebuffer,t)}else if(o){r.__webglDepthbuffer=[];for(let i=0;i<6;i++)n.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer[i]),r.__webglDepthbuffer[i]=e.createRenderbuffer(),ee(r.__webglDepthbuffer[i],t,!1)}else n.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer),r.__webglDepthbuffer=e.createRenderbuffer(),ee(r.__webglDepthbuffer,t,!1);n.bindFramebuffer(e.FRAMEBUFFER,null)}function ne(e){return Math.min(d,e.samples)}function ie(e){const n=i.get(e);return a&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function re(e,n){const i=e.encoding,r=e.format,o=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===Me||i!==xe&&(i===be?!1===a?!0===t.has("EXT_sRGB")&&r===U?(e.format=Me,e.minFilter=C,e.generateMipmaps=!1):n=et.sRGBToLinear(n):r===U&&o===I||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",i)),n}this.allocateTextureUnit=function(){const e=q;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),q+=1,e},this.resetTextureUnits=function(){q=0},this.setTexture2D=X,this.setTexture2DArray=function(t,r){const o=i.get(t);t.version>0&&o.__version!==t.version?K(o,t,r):(n.activeTexture(e.TEXTURE0+r),n.bindTexture(e.TEXTURE_2D_ARRAY,o.__webglTexture))},this.setTexture3D=function(t,r){const o=i.get(t);t.version>0&&o.__version!==t.version?K(o,t,r):(n.activeTexture(e.TEXTURE0+r),n.bindTexture(e.TEXTURE_3D,o.__webglTexture))},this.setTextureCube=function(t,r){const s=i.get(t);t.version>0&&s.__version!==t.version?function(t,i,r){if(6!==i.image.length)return;const s=Z(t,i),l=i.source;if(n.activeTexture(e.TEXTURE0+r),n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture),l.version!==l.__currentVersion||!0===s){e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const r=i.isCompressedTexture||i.image[0].isCompressedTexture,s=i.image[0]&&i.image[0].isDataTexture,u=[];for(let e=0;e<6;e++)u[e]=r||s?s?i.image[e].image:i.image[e]:y(i.image[e],!1,!0,c),u[e]=re(i,u[e]);const d=u[0],h=_(d)||a,p=o.convert(i.format,i.encoding),f=o.convert(i.type),m=w(i.internalFormat,p,f,i.encoding),g=a&&!0!==i.isVideoTexture,v=void 0===t.__version;let T,S=z(i,d,h);if(J(e.TEXTURE_CUBE_MAP,i,h),r){g&&v&&n.texStorage2D(e.TEXTURE_CUBE_MAP,S,m,d.width,d.height);for(let t=0;t<6;t++){T=u[t].mipmaps;for(let r=0;r<T.length;r++){const o=T[r];i.format!==U?null!==p?g?n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,o.width,o.height,p,o.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,m,o.width,o.height,0,o.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):g?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,o.width,o.height,p,f,o.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,m,o.width,o.height,0,p,f,o.data)}}}else{T=i.mipmaps,g&&v&&(T.length>0&&S++,n.texStorage2D(e.TEXTURE_CUBE_MAP,S,m,u[0].width,u[0].height));for(let t=0;t<6;t++)if(s){g?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,u[t].width,u[t].height,p,f,u[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,m,u[t].width,u[t].height,0,p,f,u[t].data);for(let i=0;i<T.length;i++){const r=T[i].image[t].image;g?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,0,0,r.width,r.height,p,f,r.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,m,r.width,r.height,0,p,f,r.data)}}else{g?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,p,f,u[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,m,p,f,u[t]);for(let i=0;i<T.length;i++){const r=T[i];g?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,0,0,p,f,r.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,i+1,m,p,f,r.image[t])}}}x(i,h)&&b(e.TEXTURE_CUBE_MAP),l.__currentVersion=l.version,i.onUp
30date&&i.onUpdate(i)}t.__version=i.version}(s,t,r):(n.activeTexture(e.TEXTURE0+r),n.bindTexture(e.TEXTURE_CUBE_MAP,s.__webglTexture))},this.rebindTextures=function(t,n,r){const o=i.get(t);void 0!==n&&Q(o.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D),void 0!==r&&te(t)},this.setupRenderTarget=function(t){const l=t.texture,c=i.get(t),u=i.get(l);t.addEventListener("dispose",W),!0!==t.isWebGLMultipleRenderTargets&&(void 0===u.__webglTexture&&(u.__webglTexture=e.createTexture()),u.__version=l.version,s.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultipleRenderTargets,p=_(t)||a;if(d){c.__webglFramebuffer=[];for(let t=0;t<6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else if(c.__webglFramebuffer=e.createFramebuffer(),h)if(r.drawBuffers){const n=t.texture;for(let t=0,r=n.length;t<r;t++){const r=i.get(n[t]);void 0===r.__webglTexture&&(r.__webglTexture=e.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(a&&t.samples>0&&!1===ie(t)){c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,c.__webglColorRenderbuffer);const i=o.convert(l.format,l.encoding),r=o.convert(l.type),s=w(l.internalFormat,i,r,l.encoding),a=ne(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,a,s,t.width,t.height),n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,c.__webglColorRenderbuffer),e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),ee(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}if(d){n.bindTexture(e.TEXTURE_CUBE_MAP,u.__webglTexture),J(e.TEXTURE_CUBE_MAP,l,p);for(let n=0;n<6;n++)Q(c.__webglFramebuffer[n],t,l,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n);x(l,p)&&b(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(h){const r=t.texture;for(let o=0,s=r.length;o<s;o++){const s=r[o],a=i.get(s);n.bindTexture(e.TEXTURE_2D,a.__webglTexture),J(e.TEXTURE_2D,s,p),Q(c.__webglFramebuffer,t,s,e.COLOR_ATTACHMENT0+o,e.TEXTURE_2D),x(s,p)&&b(e.TEXTURE_2D)}n.unbindTexture()}else{let i=e.TEXTURE_2D;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(a?i=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(i,u.__webglTexture),J(i,l,p),Q(c.__webglFramebuffer,t,l,e.COLOR_ATTACHMENT0,i),x(l,p)&&b(i),n.unbindTexture()}t.depthBuffer&&te(t)},this.updateRenderTargetMipmap=function(t){const r=_(t)||a,o=!0===t.isWebGLMultipleRenderTargets?t.texture:[t.texture];for(let s=0,a=o.length;s<a;s++){const a=o[s];if(x(a,r)){const r=t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,o=i.get(a).__webglTexture;n.bindTexture(r,o),b(r),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(a&&t.samples>0&&!1===ie(t)){const r=t.width,o=t.height;let s=e.COLOR_BUFFER_BIT;const a=[e.COLOR_ATTACHMENT0],l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;t.depthBuffer&&a.push(l);const c=i.get(t),u=void 0!==c.__ignoreDepthValues&&c.__ignoreDepthValues;!1===u&&(t.depthBuffer&&(s|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&(s|=e.STENCIL_BUFFER_BIT)),n.bindFramebuffer(e.READ_FRAMEBUFFER,c.__webglMultisampledFramebuffer),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer),!0===u&&(e.invalidateFramebuffer(e.READ_FRAMEBUFFER,[l]),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[l])),e.blitFramebuffer(0,0,r,o,0,0,r,o,s,e.NEAREST),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,a),n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=te,this.setupFrameBufferTexture=Q,this.useMultisampledRTT=ie}function ss(e,t,n){const i=n.isWebGL2;return{convert:function(n,r=null){let o;if(n===I)return e.UNSIGNED_BYTE;if(1017===n)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return e.UNSIGNED_SHORT_5_5_5_1;if(1010===n)return e.BYTE;if(1011===n)return e.SHORT;if(n===k)return e.UNSIGNED_SHORT;if(1013===n)return e.INT;if(n===D)return e.UNSIGNED_INT;if(n===O)return e.FLOAT;if(n===N)return i?e.HALF_FLOAT:(o=t.get("OES_texture_half_float"),null!==o?o.HALF_FLOAT_OES:null);if(1021===n)return e.ALPHA;if(n===U)return e.RGBA;if(1024===n)return e.LUMINANCE;if(1025===n)return e.LUMINANCE_ALPHA;if(n===B)return e.DEPTH_COMPONENT;if(n===H)return e.DEPTH_STENCIL;if(1028===n)return e.RED;if(1022===n)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),e.RGBA;if(n===Me)return o=t.get("EXT_sRGB"),null!==o?o.SRGB_ALPHA_EXT:null;if(1029===n)return e.RED_INTEGER;if(1030===n)return e.RG;if(1031===n)return e.RG_INTEGER;if(1033===n)return e.RGBA_INTEGER;if(n===z||n===G||n===V||n===W)if(r===be){if(o=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===o)return null;if(n===z)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===G)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===V)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===W)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(o=t.get("WEBGL_compressed_texture_s3tc"),null===o)return null;if(n===z)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===G)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===V)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===W)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===j||n===q||n===X||n===$){if(o=t.get("WEBGL_compressed_texture_pvrtc"),null===o)return null;if(n===j)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===q)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===X)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===$)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===n)return o=t.get("WEBGL_compressed_texture_etc1"),null!==o?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===Y||n===J){if(o=t.get("WEBGL_compressed_texture_etc"),null===o)return null;if(n===Y)return r===be?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(n===J)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}if(n===Z||n===K||n===Q||n===ee||n===te||n===ne||n===ie||n===re||n===oe||n===se||n===ae||n===le||n===ce||n===ue){if(o=t.get("WEBGL_compressed_texture_astc"),null===o)return null;if(n===Z)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===K)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Q)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ee)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===te)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===ne)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ie)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===re)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===oe)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===se)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===ae)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===le)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===ce)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===ue)return r===be?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===de){if(o=t.get("EXT_texture_compression_bptc"),null===o)return null;if(n===de)return r===be?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT}return n===F?i?e.UNSIGNED_INT_24_8:(o=t.get("WEBGL_depth_texture"),null!==o?o.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}ns.prototype.isMeshDistanceMaterial=!0;class as extends Ti{constructor(e=[]){super(),this.cameras=e}}as.prototype.isArrayCamera=!0;class ls extends gn{constructor(){super(),this.type="Group"}}ls.prototype.isGroup=!0;const cs={type:"move"};class us{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new ls,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new ls,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new pt,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new pt),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new ls,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new pt,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new pt),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,o=null;const s=this._targetRay,a=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==s&&(i=t.getPose(e.targetRaySpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(cs))),l&&e.hand){o=!0;for(const i of e.hand.values()){const e=t.getJointPose(i,n);if(void 0===l.joints[i.jointName]){const e=new ls;e.matrixAutoUpdate=!1,e.visible=!1,l.joints[i.jointName]=e,l.add(e)}const r=l.joints[i.jointName];null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=e.radius),r.visible=null!==e}const i=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],s=i.position.distanceTo(r.position),a=.02,c=.005;l.inputState.pinching&&s>a+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=a-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1));return null!==s&&(s.visible=null!==i),null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==o),this}}class ds extends rt{constructor(e,t,n,i,r,o,s,a,l,c){if((c=void 0!==c?c:B)!==B&&c!==H)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===B&&(n=k),void 0===n&&c===H&&(n=F),super(null,i,r,o,s,a,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==s?s:M,this.minFilter=void 0!==a?a:M,this.flipY=!1,this.generateMipmaps=!1}}ds.prototype.isDepthTexture=!0;class hs extends Ae{constructor(e,t){super();const n=this;let i=null,r=1,o=null,s="local-floor",a=null,l=null,c=null,u=null,d=null;const h=t.getContextAttributes();let p=null,f=null;const m=[],g=new Map,v=new Ti;v.layers.enable(1),v.viewport=new ot;const y=new Ti;y.layers.enable(2),y.viewport=new ot;const _=[v,y],x=new as;x.layers.enable(1),x.layers.enable(2);let b=null,w=null;function T(e){const t=g.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function S(){g.forEach(function(e,t){e.disconnect(t)}),g.clear(),b=null,w=null,e.setRenderTarget(p),u=null,c=null,l=null,i=null,f=null,L.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function E(e){const t=i.inputSources;for(let e=0;e<m.length;e++)g.set(t[e],m[e]);for(let t=0;t<e.removed.length;t++){const n=e.removed[t],i=g.get(n);i&&(i.dispatchEvent({type:"disconnected",data:n}),g.delete(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t],i=g.get(n);i&&i.dispatchEvent({type:"connected",data:n})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=m[e];return void 0===t&&(t=new us,m[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=m[e];return void 0===t&&(t=new us,m[e]=t),t.getGripSpace()},this.getHand=function(e){let t=m[e];return void 0===t&&(t=new us,m[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){r=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return o},this.getBaseLayer=function(){return null!==c?c:u},this.getBinding=function(){return l},this.getFrame=function(){return d}
vendor: 4,171 bytes, line 30
30,this.getSession=function(){return i},this.setSession=async function(a){if(i=a,null!==i){if(p=e.getRenderTarget(),i.addEventListener("select",T),i.addEventListener("selectstart",T),i.addEventListener("selectend",T),i.addEventListener("squeeze",T),i.addEventListener("squeezestart",T),i.addEventListener("squeezeend",T),i.addEventListener("end",S),i.addEventListener("inputsourceschange",E),!0!==h.xrCompatible&&await t.makeXRCompatible(),void 0===i.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==i.renderState.layers||h.antialias,alpha:h.alpha,depth:h.depth,stencil:h.stencil,framebufferScaleFactor:r};u=new XRWebGLLayer(i,t,n),i.updateRenderState({baseLayer:u}),f=new st(u.framebufferWidth,u.framebufferHeight,{format:U,type:I,encoding:e.outputEncoding})}else{let n=null,o=null,s=null;h.depth&&(s=h.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=h.stencil?H:B,o=h.stencil?F:k);const a={colorFormat:e.outputEncoding===be?t.SRGB8_ALPHA8:t.RGBA8,depthFormat:s,scaleFactor:r};l=new XRWebGLBinding(i,t),c=l.createProjectionLayer(a),i.updateRenderState({layers:[c]}),f=new st(c.textureWidth,c.textureHeight,{format:U,type:I,depthTexture:new ds(c.textureWidth,c.textureHeight,o,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:h.stencil,encoding:e.outputEncoding,samples:h.antialias?4:0}),e.properties.get(f).__ignoreDepthValues=c.ignoreDepthValues}f.isXRRenderTarget=!0,this.setFoveation(1),o=await i.requestReferenceSpace(s),L.setContext(i),L.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const M=new pt,A=new pt;function R(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===i)return;x.near=y.near=v.near=e.near,x.far=y.far=v.far=e.far,b===x.near&&w===x.far||(i.updateRenderState({depthNear:x.near,depthFar:x.far}),b=x.near,w=x.far);const t=e.parent,n=x.cameras;R(x,t);for(let e=0;e<n.length;e++)R(n[e],t);x.matrixWorld.decompose(x.position,x.quaternion,x.scale),e.position.copy(x.position),e.quaternion.copy(x.quaternion),e.scale.copy(x.scale),e.matrix.copy(x.matrix),e.matrixWorld.copy(x.matrixWorld);const r=e.children;for(let e=0,t=r.length;e<t;e++)r[e].updateMatrixWorld(!0);2===n.length?function(e,t,n){M.setFromMatrixPosition(t.matrixWorld),A.setFromMatrixPosition(n.matrixWorld);const i=M.distanceTo(A),r=t.projectionMatrix.elements,o=n.projectionMatrix.elements,s=r[14]/(r[10]-1),a=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],u=(r[8]-1)/r[0],d=(o[8]+1)/o[0],h=s*u,p=s*d,f=i/(-u+d),m=f*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=s+f,v=a+f,y=h-m,_=p+(i-m),x=l*a/v*g,b=c*a/v*g;e.projectionMatrix.makePerspective(y,_,x,b,g,v)}(x,v,y):x.projectionMatrix.copy(v.projectionMatrix)},this.getCamera=function(){return x},this.getFoveation=function(){return null!==c?c.fixedFoveation:null!==u?u.fixedFoveation:void 0},this.setFoveation=function(e){null!==c&&(c.fixedFoveation=e),null!==u&&void 0!==u.fixedFoveation&&(u.fixedFoveation=e)};let C=null;const L=new Oi;L.setAnimationLoop(function(t,n){if(a=n.getViewerPose(o),d=n,null!==a){const t=a.views;null!==u&&(e.setRenderTargetFramebuffer(f,u.framebuffer),e.setRenderTarget(f));let n=!1;t.length!==x.cameras.length&&(x.cameras.length=0,n=!0);for(let i=0;i<t.length;i++){const r=t[i];let o=null;if(null!==u)o=u.getViewport(r);else{const t=l.getViewSubImage(c,r);o=t.viewport,0===i&&(e.setRenderTargetTextures(f,t.colorTexture,c.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(f))}const s=_[i];s.matrix.fromArray(r.transform.matrix),s.projectionMatrix.fromArray(r.projectionMatrix),s.viewport.set(o.x,o.y,o.width,o.height),0===i&&x.matrix.copy(s.matrix),!0===n&&x.cameras.push(s)}}const r=i.inputSources;for(let e=0;e<m.length;e++){const t=m[e],i=r[e];t.update(i,n,o)}C&&C(t,n),d=null}),this.setAnimationLoop=function(e){C=e},this.dispose=function(){}}}function ps(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.
vendor: 5,060 bytes, line 30
30color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap),n.alphaTest>0&&(t.alphaTest.value=n.alphaTest);const i=e.get(n).envMap;let r,o;i&&(t.envMap.value=i,t.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,t.reflectivity.value=n.reflectivity,t.ior.value=n.ior,t.refractionRatio.value=n.refractionRatio),n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?r=n.map:n.specularMap?r=n.specularMap:n.displacementMap?r=n.displacementMap:n.normalMap?r=n.normalMap:n.bumpMap?r=n.bumpMap:n.roughnessMap?r=n.roughnessMap:n.metalnessMap?r=n.metalnessMap:n.alphaMap?r=n.alphaMap:n.emissiveMap?r=n.emissiveMap:n.clearcoatMap?r=n.clearcoatMap:n.clearcoatNormalMap?r=n.clearcoatNormalMap:n.clearcoatRoughnessMap?r=n.clearcoatRoughnessMap:n.specularIntensityMap?r=n.specularIntensityMap:n.specularColorMap?r=n.specularColorMap:n.transmissionMap?r=n.transmissionMap:n.thicknessMap?r=n.thicknessMap:n.sheenColorMap?r=n.sheenColorMap:n.sheenRoughnessMap&&(r=n.sheenRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),t.uv2Transform.value.copy(o.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,1===n.side&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),1===n.side&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias),e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,i,r,o,s){i.isMeshBasicMaterial?t(e,i):i.isMeshLambertMaterial?(t(e,i),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,i)):i.isMeshToonMaterial?(t(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,i)):i.isMeshPhongMaterial?(t(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,i)):i.isMeshStandardMaterial?(t(e,i),i.isMeshPhysicalMaterial?function(e,t,i){n(e,t),e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap)),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,1===t.side&&e.clearcoatNormalScale.value.negate())),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=i.texture,e.transmissionSamplerSize.value.set(i.width,i.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}
vendor: 14,853 bytes, line 30
30(e,i,s):n(e,i)):i.isMeshMatcapMaterial?(t(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,i)):i.isMeshDepthMaterial?(t(e,i),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,i)):i.isMeshDistanceMaterial?(t(e,i),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,i)):i.isMeshNormalMaterial?(t(e,i),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,i)):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,n,i){let r;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*i,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?r=t.map:t.alphaMap&&(r=t.alphaMap),void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix))}(e,i,r,o):i.isSpriteMaterial?function(e,t){let n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function fs(e={}){const n=void 0!==e.canvas?e.canvas:function(){const e=je("canvas");return e.style.display="block",e}(),i=void 0!==e.context?e.context:null,r=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,a=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let d;d=void 0!==e.context?i.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;let h=null,p=null;const f=[],m=[];this.domElement=n,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=xe,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const g=this;let v=!1,y=0,_=0,x=null,b=-1,w=null;const T=new ot,S=new ot;let E=null,M=n.width,A=n.height,R=1,C=null,L=null;const k=new ot(0,0,M,A),D=new ot(0,0,M,A);let F=!1;const B=new Di;let H=!1,z=!1,G=null;const V=new Wt,W=new He,j=new pt,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function X(){return null===x?R:1}let $,Y,J,Z,K,Q,ee,te,ne,ie,re,oe,se,ae,le,ce,ue,de,he,pe,fe,me,ge,ve=i;function ye(e,t){for(let i=0;i<e.length;i++){const r=e[i],o=n.getContext(r,t);if(null!==o)return o}return null}try{const e={alpha:!0,depth:r,stencil:o,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${t}`),n.addEventListener("webglcontextlost",we,!1),n.addEventListener("webglcontextrestored",Te,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===g.isWebGL1Renderer&&t.shift(),ve=ye(t,e),null===ve)throw ye(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function _e(){$=new lr(ve),Y=new Wi(ve,$,e),$.init(Y),me=new ss(ve,$,Y),J=new rs(ve,$,Y),Z=new dr(ve),K=new Wo,Q=new os(ve,$,J,K,Y,me,Z),ee=new qi(g),te=new ar(g),ne=new Ni(ve,Y),ge=new Gi(ve,$,ne,Y),ie=new cr(ve,ne,Z,ge),re=new gr(ve,ie,ne,Z),he=new mr(ve,Y,Q),ce=new ji(K),oe=new Vo(g,ee,te,$,Y,ge,ce),se=new ps(K),ae=new $o,le=new es($,Y),de=new zi(g,ee,J,re,d,a),ue=new is(g,re,Y),pe=new Vi(ve,$,Z,Y),fe=new ur(ve,$,Z,Y),Z.programs=oe.programs,g.capabilities=Y,g.extensions=$,g.properties=K,g.renderLists=ae,g.shadowMap=ue,g.state=J,g.info=Z}_e();const be=new hs(g,ve);function we(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),v=!0}function Te(){console.log("THREE.WebGLRenderer: Context Restored."),v=!1;const e=Z.autoReset,t=ue.enabled,n=ue.autoUpdate,i=ue.needsUpdate,r=ue.type;_e(),Z.autoReset=e,ue.enabled=t,ue.autoUpdate=n,ue.needsUpdate=i,ue.type=r}function Se(e){const t=e.target;t.removeEventListener("dispose",Se),function(e){(function(e){const t=K.get(e).programs;void 0!==t&&(t.forEach(function(e){oe.releaseProgram(e)}),e.isShaderMaterial&&oe.releaseShaderCache(e))})(e),K.remove(e)}(t)}this.xr=be,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=$.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=$.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return R},this.setPixelRatio=function(e){void 0!==e&&(R=e,this.setSize(M,A,!1))},this.getSize=function(e){return e.set(M,A)},this.setSize=function(e,t,i){be.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(M=e,A=t,n.width=Math.floor(e*R),n.height=Math.floor(t*R),!1!==i&&(n.style.width=e+"px",n.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return e.set(M*R,A*R).floor()},this.setDrawingBufferSize=function(e,t,i){M=e,A=t,R=i,n.width=Math.floor(e*i),n.height=Math.floor(t*i),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return e.copy(T)},this.getViewport=function(e){return e.copy(k)},this.setViewport=function(e,t,n,i){e.isVector4?k.set(e.x,e.y,e.z,e.w):k.set(e,t,n,i),J.viewport(T.copy(k).multiplyScalar(R).floor())},this.getScissor=function(e){return e.copy(D)},this.setScissor=function(e,t,n,i){e.isVector4?D.set(e.x,e.y,e.z,e.w):D.set(e,t,n,i),J.scissor(S.copy(D).multiplyScalar(R).floor())},this.getScissorTest=function(){return F},this.setScissorTest=function(e){J.setScissorTest(F=e)},this.setOpaqueSort=function(e){C=e},this.setTransparentSort=function(e){L=e},this.getClearColor=function(e){return e.copy(de.getClearColor())},this.setClearColor=function(){de.setClearColor.apply(de,arguments)},this.getClearAlpha=function(){return de.getClearAlpha()},this.setClearAlpha=function(){de.setClearAlpha.apply(de,arguments)},this.clear=function(e=!0,t=!0,n=!0){let i=0;e&&(i|=ve.COLOR_BUFFER_BIT),t&&(i|=ve.DEPTH_BUFFER_BIT),n&&(i|=ve.STENCIL_BUFFER_BIT),ve.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",we,!1),n.removeEventListener("webglcontextrestored",Te,!1),ae.dispose(),le.dispose(),K.dispose(),ee.dispose(),te.dispose(),re.dispose(),ge.dispose(),oe.dispose(),be.dispose(),be.removeEventListener("sessionstart",Me),be.removeEventListener("sessionend",Ae),G&&(G.dispose(),G=null),Re.stop()},this.renderBufferDirect=function(e,t,n,i,r,o){null===t&&(t=q);const s=r.isMesh&&r.matrixWorld.determinant()<0,a=function(e,t,n,i,r){!0!==t.isScene&&(t=q),Q.resetTextureUnits();const o=t.fog,s=i.isMeshStandardMaterial?t.environment:null,a=null===x?g.outputEncoding:!0===x.isXRRenderTarget?x.texture.encoding:xe,l=(i.isMeshStandardMaterial?te:ee).get(i.envMap||s),c=!0===i.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!i.normalMap&&!!n.attributes.tangent,d=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,f=!!n.morphAttributes.color,m=i.toneMapped?g.toneMapping:0,v=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,y=void 0!==v?v.length:0,_=K.get(i),T=p.state.lights;if(!0===H&&(!0===z||e!==w)){const t=e===w&&i.id===b;ce.setState(i,e,t)}let S=!1;i.version===_.__version?_.needsLights&&_.lightsStateVersion!==T.state.version||_.outputEncoding!==a||r.isInstancedMesh&&!1===_.instancing?S=!0:r.isInstancedMesh||!0!==_.instancing?r.isSkinnedMesh&&!1===_.skinning?S=!0:r.isSkinnedMesh||!0!==_.skinning?_.envMap!==l||i.fog&&_.fog!==o?S=!0:void 0===_.numClippingPlanes||_.numClippingPlanes===ce.numPlanes&&_.numIntersection===ce.numIntersection?(_.vertexAlphas!==c||_.vertexTangents!==u||_.morphTargets!==d||_.morphNormals!==h||_.morphColors!==f||_.toneMapping!==m||!0===Y.isWebGL2&&_.morphTargetsCount!==y)&&(S=!0):S=!0:S=!0:S=!0:(S=!0,_.__version=i.version);let E=_.currentProgram;!0===S&&(E=ke(i,t,r));let M=!1,C=!1,L=!1;const P=E.getUniforms(),I=_.uniforms;if(J.useProgram(E.program)&&(M=!0,C=!0,L=!0),i.id!==b&&(b=i.id,C=!0),M||w!==e){if(P.setValue(ve,"projectionMatrix",e.projectionMatrix),Y.logarithmicDepthBuffer&&P.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),w!==e&&(w=e,C=!0,L=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshStandardMaterial||i.envMap){const t=P.map.cameraPosition;void 0!==t&&t.setValue(ve,j.setFromMatrixPosition(e.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&P.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.isShadowMaterial||r.isSkinnedMesh)&&P.setValue(ve,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){P.setOptional(ve,r,"bindMatrix"),P.setOptional(ve,r,"bindMatrixInverse");const e=r.skeleton;e&&(Y.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),P.setValue(ve,"boneTexture",e.boneTexture,Q),P.setValue(ve,"boneTextureSize",e.boneTextureSize)):P.setOptional(ve,e,"boneMatrices"))}const k=n.morphAttributes;var D,O;return(void 0!==k.position||void 0!==k.normal||void 0!==k.color&&!0===Y.isWebGL2)&&he.update(r,n,i,E),(C||_.receiveShadow!==r.receiveShadow)&&(_.receiveShadow=r.receiveShadow,P.setValue(ve,"receiveShadow",r.receiveShadow)),C&&(P.setValue(ve,"toneMappingExposure",g.toneMappingExposure),_.needsLights&&(O=L,(D=I).ambientLightColor.needsUpdate=O,D.lightProbe.needsUpdate=O,D.directionalLights.needsUpdate=O,D.directionalLightShadows.needsUpdate=O,D.pointLights.needsUpdate=O,D.pointLightShadows.needsUpdate=O,D.spotLights.needsUpdate=O,D.spotLightShadows.needsUpdate=O,D.rectAreaLights.needsUpdate=O,D.hemisphereLights.needsUpdate=O),o&&i.fog&&se.refreshFogUniforms(I,o),se.refreshMaterialUniforms(I,i,R,A,G),bo.upload(ve,_.uniformsList,I,Q)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(bo.upload(ve,_.uniformsList,I,Q),i.uniformsNeedUpdate=!1),i.isSpriteMaterial&&P.setValue(ve,"center",r.center),P.setValue(ve,"modelViewMatrix",r.modelViewMatrix),P.setValue(ve,"normalMatrix",r.normalMatrix),P.setValue(ve,"modelMatrix",r.matrixWorld),E}(e,t,n,i,r);J.setMaterial(i,s);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let u,d=1;!0===i.wireframe&&(l=ie.getWireframeAttribute(n),d=2),ge.setup(r,i,a,n,l);let h=pe;null!==l&&(u=ne.get(l),h=fe,h.setIndex(u));const f=null!==l?l.count:c.count,m=n.drawRange.start*d,v=n.drawRange.count*d,y=null!==o?o.start*d:0,_=null!==o?o.count*d:1/0,T=Math.max(m,y),S=Math.min(f,m+v,y+_)-1,E=Math.max(0,S-T+1);if(0!==E){if(r.isMesh)!0===i.wireframe?(J.setLineWidth(i.wireframeLinewidth*X()),h.setMode(ve.LINES)):h.setMode(ve.TRIANGLES);else if(r.isLine){let e=i.linewidth;void 0===e&&(e=1),J.setLineWidth(e*X()),r.isLineSegments?h.setMode(ve.LINES):r.isLineLoop?h.setMode(ve.LINE_LOOP):h.setMode(ve.LINE_STRIP)}else r.isPoints?h.setMode(ve.POINTS):r.isSprite&&h.setMode(ve.TRIANGLES);if(r.isInstancedMesh)h.renderInstances(T,E,r.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);h.renderInstances(T,E,e)}else h.render(T,E)}},this.compile=function(e,t){p=le.get(e),p.init(),m.push(p),e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))}),p.setupLights(g.physicallyCorrectLights),e.traverse(function(t){const n=t.material;if(n)if(Array.isArray(n))for(let i=0;i<n.length;i++)ke(n[i],e,t);else ke(n,e,t)}),m.pop(),p=null};let Ee=null;function Me(){Re.stop()}function Ae(){Re.start()}const Re=new Oi;function Ce(e,t,n,i){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)p.pushLight(e),e.castShadow&&p.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||B.intersectsSprite(e)){i&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);const t=re.update(e),r=e.material;r.visible&&h.push(e,t,r,n,j.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==Z.render.frame&&(e.skeleton.update(),e.skeleton.frame=Z.render.frame),!e.frustumCulled||B.intersectsObject(e))){i&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);const t=re.update(e),r=e.material;if(Array.isArray(r)){const i=t.groups;for(let o=0,s=i.length;o<s;o++){const s=i[o],a=r[s.materialIndex];a&&a.visible&&h.push(e,t,a,n,j.z,s)}}else r.visible&&h.push(e,t,r,n,j.z,null)}const r=e.children;for(let e=0,o=r.length;e<o;e++)Ce(r[e],t,n,i)}function Le(e,t,n,i){const r=e.opaque,o=e.transmissive,a=e.transparent;p.setupLightsView(n),o.length>0&&function(e,t,n){const i=Y.isWebGL2;null===G&&(G=new st(1,1,{generateMipmaps:!0,type:null!==me.convert(N)?N:I,minFilter:P,samples:i&&!0===s?4:0})),g.getDrawingBufferSize(W),i?G.setSize(W.x,W.y):G.setSize(Ue(W.x),Ue(W.y
vendor: 4,239 bytes, line 30
30));const r=g.getRenderTarget();g.setRenderTarget(G),g.clear();const o=g.toneMapping;g.toneMapping=0,Pe(e,t,n),g.toneMapping=o,Q.updateMultisampleRenderTarget(G),Q.updateRenderTargetMipmap(G),g.setRenderTarget(r)}(r,t,n),i&&J.viewport(T.copy(i)),r.length>0&&Pe(r,t,n),o.length>0&&Pe(o,t,n),a.length>0&&Pe(a,t,n),J.buffers.depth.setTest(!0),J.buffers.depth.setMask(!0),J.buffers.color.setMask(!0),J.setPolygonOffset(!1)}function Pe(e,t,n){const i=!0===t.isScene?t.overrideMaterial:null;for(let r=0,o=e.length;r<o;r++){const o=e[r],s=o.object,a=o.geometry,l=null===i?o.material:i,c=o.group;s.layers.test(n.layers)&&Ie(s,t,n,a,l,c)}}function Ie(e,t,n,i,r,o){e.onBeforeRender(g,t,n,i,r,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(g,t,n,i,e,o),!0===r.transparent&&2===r.side?(r.side=1,r.needsUpdate=!0,g.renderBufferDirect(n,t,i,r,e,o),r.side=0,r.needsUpdate=!0,g.renderBufferDirect(n,t,i,r,e,o),r.side=2):g.renderBufferDirect(n,t,i,r,e,o),e.onAfterRender(g,t,n,i,r,o)}function ke(e,t,n){!0!==t.isScene&&(t=q);const i=K.get(e),r=p.state.lights,o=p.state.shadowsArray,s=r.state.version,a=oe.getParameters(e,r.state,o,t,n),l=oe.getProgramCacheKey(a);let c=i.programs;i.environment=e.isMeshStandardMaterial?t.environment:null,i.fog=t.fog,i.envMap=(e.isMeshStandardMaterial?te:ee).get(e.envMap||i.environment),void 0===c&&(e.addEventListener("dispose",Se),c=new Map,i.programs=c);let u=c.get(l);if(void 0!==u){if(i.currentProgram===u&&i.lightsStateVersion===s)return De(e,a),u}else a.uniforms=oe.getUniforms(e),e.onBuild(n,a,g),e.onBeforeCompile(a,g),u=oe.acquireProgram(a,l),c.set(l,u),i.uniforms=a.uniforms;const d=i.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(d.clippingPlanes=ce.uniform),De(e,a),i.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),i.lightsStateVersion=s,i.needsLights&&(d.ambientLightColor.value=r.state.ambient,d.lightProbe.value=r.state.probe,d.directionalLights.value=r.state.directional,d.directionalLightShadows.value=r.state.directionalShadow,d.spotLights.value=r.state.spot,d.spotLightShadows.value=r.state.spotShadow,d.rectAreaLights.value=r.state.rectArea,d.ltc_1.value=r.state.rectAreaLTC1,d.ltc_2.value=r.state.rectAreaLTC2,d.pointLights.value=r.state.point,d.pointLightShadows.value=r.state.pointShadow,d.hemisphereLights.value=r.state.hemi,d.directionalShadowMap.value=r.state.directionalShadowMap,d.directionalShadowMatrix.value=r.state.directionalShadowMatrix,d.spotShadowMap.value=r.state.spotShadowMap,d.spotShadowMatrix.value=r.state.spotShadowMatrix,d.pointShadowMap.value=r.state.pointShadowMap,d.pointShadowMatrix.value=r.state.pointShadowMatrix);const h=u.getUniforms(),f=bo.seqWithValue(h.seq,d);return i.currentProgram=u,i.uniformsList=f,u}function De(e,t){const n=K.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Re.setAnimationLoop(function(e){Ee&&Ee(e)}),"undefined"!=typeof window&&Re.setContext(window),this.setAnimationLoop=function(e){Ee=e,be.setAnimationLoop(e),null===e?Re.stop():Re.start()},be.addEventListener("sessionstart",Me),be.addEventListener("sessionend",Ae),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===v)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===be.enabled&&!0===be.isPresenting&&(!0===be.cameraAutoUpdate&&be.updateCamera(t),t=be.getCamera()),!0===e.isScene&&e.onBeforeRender(g,e,t,x),p=le.get(e,m.length),p.init(),m.push(p),V.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),B.setFromProjectionMatrix(V),z=this.localClippingEnabled,H=ce.init(this.clippingPlanes,z,t),h=ae.get(e,f.length),h.init(),f.pu
vendor: 16,100 bytes, line 30
30sh(h),Ce(e,t,0,g.sortObjects),h.finish(),!0===g.sortObjects&&h.sort(C,L),!0===H&&ce.beginShadows();const n=p.state.shadowsArray;if(ue.render(n,e,t),!0===H&&ce.endShadows(),!0===this.info.autoReset&&this.info.reset(),de.render(h,e),p.setupLights(g.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,i=n.length;t<i;t++){const i=n[t];Le(h,e,i,i.viewport)}}else Le(h,e,t);null!==x&&(Q.updateMultisampleRenderTarget(x),Q.updateRenderTargetMipmap(x)),!0===e.isScene&&e.onAfterRender(g,e,t),ge.resetDefaultState(),b=-1,w=null,m.pop(),p=m.length>0?m[m.length-1]:null,f.pop(),h=f.length>0?f[f.length-1]:null},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return _},this.getRenderTarget=function(){return x},this.setRenderTargetTextures=function(e,t,n){K.get(e.texture).__webglTexture=t,K.get(e.depthTexture).__webglTexture=n;const i=K.get(e);i.__hasExternalTextures=!0,i.__hasExternalTextures&&(i.__autoAllocateDepthBuffer=void 0===n,i.__autoAllocateDepthBuffer||!0===$.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),i.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=K.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){x=e,y=t,_=n;let i=!0;if(e){const t=K.get(e);void 0!==t.__useDefaultFramebuffer?(J.bindFramebuffer(ve.FRAMEBUFFER,null),i=!1):void 0===t.__webglFramebuffer?Q.setupRenderTarget(e):t.__hasExternalTextures&&Q.rebindTextures(e,K.get(e.texture).__webglTexture,K.get(e.depthTexture).__webglTexture)}let r=null,o=!1,s=!1;if(e){const n=e.texture;(n.isData3DTexture||n.isDataArrayTexture)&&(s=!0);const i=K.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=i[t],o=!0):r=Y.isWebGL2&&e.samples>0&&!1===Q.useMultisampledRTT(e)?K.get(e).__webglMultisampledFramebuffer:i,T.copy(e.viewport),S.copy(e.scissor),E=e.scissorTest}else T.copy(k).multiplyScalar(R).floor(),S.copy(D).multiplyScalar(R).floor(),E=F;if(J.bindFramebuffer(ve.FRAMEBUFFER,r)&&Y.drawBuffers&&i&&J.drawBuffers(e,r),J.viewport(T),J.scissor(S),J.setScissorTest(E),o){const i=K.get(e.texture);ve.framebufferTexture2D(ve.FRAMEBUFFER,ve.COLOR_ATTACHMENT0,ve.TEXTURE_CUBE_MAP_POSITIVE_X+t,i.__webglTexture,n)}else if(s){const i=K.get(e.texture),r=t||0;ve.framebufferTextureLayer(ve.FRAMEBUFFER,ve.COLOR_ATTACHMENT0,i.__webglTexture,n||0,r)}b=-1},this.readRenderTargetPixels=function(e,t,n,i,r,o,s){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=K.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(a=a[s]),a){J.bindFramebuffer(ve.FRAMEBUFFER,a);try{const s=e.texture,a=s.format,l=s.type;if(a!==U&&me.convert(a)!==ve.getParameter(ve.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===N&&($.has("EXT_color_buffer_half_float")||Y.isWebGL2&&$.has("EXT_color_buffer_float"));if(!(l===I||me.convert(l)===ve.getParameter(ve.IMPLEMENTATION_COLOR_READ_TYPE)||l===O&&(Y.isWebGL2||$.has("OES_texture_float")||$.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");ve.checkFramebufferStatus(ve.FRAMEBUFFER)===ve.FRAMEBUFFER_COMPLETE?t>=0&&t<=e.width-i&&n>=0&&n<=e.height-r&&ve.readPixels(t,n,i,r,me.convert(a),me.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==x?K.get(x).__webglFramebuffer:null;J.bindFramebuffer(ve.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){if(!0!==t.isFramebufferTexture)return void console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");const i=Math.pow(2,-n),r=Math.floor(t.image.width*i),o=Math.floor(t.image.height*i);Q.setTexture2D(t,0),ve.copyTexSubImage2D(ve.TEXTURE_2D,n,0,0,e.x,e.y,r,o),J.unbindTexture()},this.copyTextureToTexture=function(e,t,n,i=0){const r=t.image.width,o=t.image.height,s=me.convert(n.format),a=me.convert(n.type);Q.setTexture2D(n,0),ve.pixelStorei(ve.UNPACK_FLIP_Y_WEBGL,n.flipY),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),ve.pixelStorei(ve.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(ve.TEXTURE_2D,i,e.x,e.y,r,o,s,a,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(ve.TEXTURE_2D,i,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,s,t.mipmaps[0].data):ve.texSubImage2D(ve.TEXTURE_2D,i,e.x,e.y,s,a,t.image),0===i&&n.generateMipmaps&&ve.generateMipmap(ve.TEXTURE_2D),J.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,i,r=0){if(g.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,s=e.max.y-e.min.y+1,a=e.max.z-e.min.z+1,l=me.convert(i.format),c=me.convert(i.type);let u;if(i.isData3DTexture)Q.setTexture3D(i,0),u=ve.TEXTURE_3D;else{if(!i.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Q.setTexture2DArray(i,0),u=ve.TEXTURE_2D_ARRAY}ve.pixelStorei(ve.UNPACK_FLIP_Y_WEBGL,i.flipY),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),ve.pixelStorei(ve.UNPACK_ALIGNMENT,i.unpackAlignment);const d=ve.getParameter(ve.UNPACK_ROW_LENGTH),h=ve.getParameter(ve.UNPACK_IMAGE_HEIGHT),p=ve.getParameter(ve.UNPACK_SKIP_PIXELS),f=ve.getParameter(ve.UNPACK_SKIP_ROWS),m=ve.getParameter(ve.UNPACK_SKIP_IMAGES),v=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(ve.UNPACK_ROW_LENGTH,v.width),ve.pixelStorei(ve.UNPACK_IMAGE_HEIGHT,v.height),ve.pixelStorei(ve.UNPACK_SKIP_PIXELS,e.min.x),ve.pixelStorei(ve.UNPACK_SKIP_ROWS,e.min.y),ve.pixelStorei(ve.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?ve.texSubImage3D(u,r,t.x,t.y,t.z,o,s,a,l,c,v.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(u,r,t.x,t.y,t.z,o,s,a,l,v.data)):ve.texSubImage3D(u,r,t.x,t.y,t.z,o,s,a,l,c,v),ve.pixelStorei(ve.UNPACK_ROW_LENGTH,d),ve.pixelStorei(ve.UNPACK_IMAGE_HEIGHT,h),ve.pixelStorei(ve.UNPACK_SKIP_PIXELS,p),ve.pixelStorei(ve.UNPACK_SKIP_ROWS,f),ve.pixelStorei(ve.UNPACK_SKIP_IMAGES,m),0===r&&i.generateMipmaps&&ve.generateMipmap(u),J.unbindTexture()},this.initTexture=function(e){Q.setTexture2D(e,0),J.unbindTexture()},this.resetState=function(){y=0,_=0,x=null,J.reset(),ge.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}fs.prototype.isWebGLRenderer=!0;class ms extends fs{}ms.prototype.isWebGL1Renderer=!0;class gs{constructor(e,t=25e-5){this.name="",this.color=new Ke(e),this.density=t}clone(){return new gs(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}gs.prototype.isFogExp2=!0;class vs{constructor(e,t=1,n=1e3){this.name="",this.color=new Ke(e),this.near=t,this.far=n}clone(){return new vs(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}vs.prototype.isFog=!0;class ys extends gn{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}ys.prototype.isScene=!0;class _s{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Te,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Ie()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Ie()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Ie()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}_s.prototype.isInterleavedBuffer=!0;const xs=new pt;class bs{constructor(e,t,n,i=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)xs.x=this.getX(t),xs.y=this.getY(t),xs.z=this.getZ(t),xs.applyMatrix4(e),this.setXYZ(t,xs.x,xs.y,xs.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)xs.x=this.getX(t),xs.y=this.getY(t),xs.z=this.getZ(t),xs.applyNormalMatrix(e),this.setXYZ(t,xs.x,xs.y,xs.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)xs.x=this.getX(t),xs.y=this.getY(t),xs.z=this.getZ(t),xs.transformDirection(e),this.setXYZ(t,xs.x,xs.y,xs.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new kn(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new bs(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}bs.prototype.isInterleavedBufferAttribute=!0;class ws extends Cn{constructor(e){super(),this.type="SpriteMaterial",this.color=new Ke(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let Ts;ws.prototype.isSpriteMaterial=!0;const Ss=new pt,Es=new pt,Ms=new pt,As=new He,Rs=new He,Cs=new Wt,Ls=new pt,Ps=new pt,Is=new pt,ks=new He,Ds=new He,Os=new He;class Ns extends gn{constructor(e){if(super(),this.type="Sprite",void 0===Ts){Ts=new Zn;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new _s(e,5);Ts.setIndex([0,1,2,0,2,3]),Ts.setAttribute("position",new bs(t,3,0,!1)),Ts.setAttribute("uv",new bs(t,2,3,!1))}this.geometry=Ts,this.material=void 0!==e?e:new ws,this.center=new He(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Es.setFromMatrixScale(this.matrixWorld),Cs.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ms.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Es.multiplyScalar(-Ms.z);const n=this.material.rotation;let i,r;0!==n&&(r=Math.cos(n),i=Math.sin(n));const o=this.center;Fs(Ls.set(-.5,-.5,0),Ms,o,Es,i,r),Fs(Ps.set(.5,-.5,0),Ms,o,Es,i,r),Fs(Is.set(.5,.5,0),Ms,o,Es,i,r),ks.set(0,0),Ds.set(1,0),Os.set(1,1);let s=e.ray.intersectTriangle(Ls,Ps,Is,!1,Ss);if(null===s&&(Fs(Ps.set(-.5,.5,0),Ms,o,Es,i,r),Ds.set(0,1),s=e.ray.intersectTriangle(Ls,Is,Ps,!1,Ss),null===s))return;const a=e.ray.origin.distanceTo(Ss);a<e.near||a>e.far||t.push({distance:a,point:Ss.clone(),uv:An.getUV(Ss,Ls,Ps,Is,ks,Ds,Os,new He),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Fs(e,t,n,i,r,o){As.subVectors(e,n).addScalar(.5).multiply(i),void 0!==r?(Rs.x=o*As.x-r*As.y,Rs.y=r*As.x+o*As.y):Rs.copy(As),e.copy(t),e.x+=Rs.x,e.y+=Rs.y,e.applyMatrix4(Cs)}Ns.prototype.isSprite=!0;const Us=new pt,Bs=new pt;class Hs extends gn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.addLevel(n.object.clone(),n.distance)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0){t=Math.abs(t);const n=this.levels;let i;for(i=0;i<n.length&&!(t<n[i].distance);i++);return n.splice(i,0,{distance:t,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i&&!(e<t[n].distance);n++);return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){Us.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Us);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Us.setFromMatrixPosition(e.matrixWorld),Bs.setFromMatrixPosition(this.matrixWorld);const n=Us.distanceTo(Bs)/e.zoom;let i,r;for(t[0].object.visible=!0,i=1,r=t.length;i<r&&n>=t[i].distance;i++)t[i-1].object.visible=!1,t[i].object.visible=!0;for(this._currentLevel=i-1;
vendor: 7,334 bytes, line 30
30i<r;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let e=0,i=n.length;e<i;e++){const i=n[e];t.object.levels.push({object:i.object.uuid,distance:i.distance})}return t}}const zs=new pt,Gs=new ot,Vs=new ot,Ws=new pt,js=new Wt;class qs extends mi{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Wt,this.bindMatrixInverse=new Wt}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new ot,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,i=this.geometry;Gs.fromBufferAttribute(i.attributes.skinIndex,e),Vs.fromBufferAttribute(i.attributes.skinWeight,e),zs.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const i=Vs.getComponent(e);if(0!==i){const r=Gs.getComponent(e);js.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Ws.copy(zs).applyMatrix4(js),i)}}return t.applyMatrix4(this.bindMatrixInverse)}}qs.prototype.isSkinnedMesh=!0;class Xs extends gn{constructor(){super(),this.type="Bone"}}Xs.prototype.isBone=!0;class $s extends rt{constructor(e=null,t=1,n=1,i,r,o,s,a,l=1003,c=1003,u,d){super(null,o,s,a,l,c,i,r,u,d),this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}$s.prototype.isDataTexture=!0;const Ys=new Wt,Js=new Wt;class Zs{constructor(e=[],t=[]){this.uuid=Ie(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new Wt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new Wt;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let i=0,r=e.length;i<r;i++){const r=e[i]?e[i].matrixWorld:Js;Ys.multiplyMatrices(r,t[i]),Ys.toArray(n,16*i)}null!==i&&(i.needsUpdate=!0)}clone(){return new Zs(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=Fe(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new $s(t,e,e,U,O);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const i=e.bones[n];let r=t[i];void 0===r&&(console.warn("THREE.Skeleton: No bone found with UUID:",i),r=new Xs),this.bones.push(r),this.boneInverses.push((new Wt).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){const r=t[i];e.bones.push(r.uuid);const o=n[i];e.boneInverses.push(o.toArray())}return e}}class Ks extends kn{constructor(e,t,n,i=1){"number"==typeof n&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}Ks.prototype.isInstancedBufferAttribute=!0;const Qs=new Wt,ea=new Wt,ta=[],na=new mi;class ia extends mi{constructor(e,t,n){super(e,t),this.instanceMatrix=new Ks(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,i=this.count;if(na.geometry=this.geometry,na.material=this.material,void 0!==na.material)for(let r=0;r<i;r++){this.getMatrixAt(r,Qs),ea.multiplyMatrices(n,Qs),na.matrixWorld=ea,na.raycast(e,ta);for(let e=0,n=ta.length;e<n;e++){const n=ta[e];n.instanceId=r,n.object=this,t.push(n)}ta.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new Ks(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}ia.prototype.isInstancedMesh=!0;class ra extends Cn{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Ke(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this}}ra.prototype.isLineBasicMaterial=!0;const oa=new pt,sa=new pt,aa=new Wt,la=new Vt,ca=new Ot;class ua extends gn{constructor(e=new Zn,t=new ra){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,i=t.count;e<i;e++)oa.fromBufferAttribute(t,e-1),sa.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=oa.distanceTo(sa);e.setAttribute("lineDistance",new Gn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() n
30o longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ca.copy(n.boundingSphere),ca.applyMatrix4(i),ca.radius+=r,!1===e.ray.intersectsSphere(ca))return;aa.copy(i).invert(),la.copy(e.ray).applyMatrix4(aa);const s=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=s*s,l=new pt,c=new pt,u=new pt,d=new pt,h=this.isLineSegments?2:1;if(n.isBufferGeometry){const i=n.index,r=n.attributes.position;if(null!==i)for(let n=Math.max(0,o.start),s=Math.min(i.count,o.start+o.count)-1;n<s;n+=h){const o=i.getX(n),s=i.getX(n+1);if(l.fromBufferAttribute(r,o),c.fromBufferAttribute(r,s),la.distanceSqToSegment(l,c,d,u)>a)continue;d.applyMatrix4(this.matrixWorld);const h=e.ray.origin.distanceTo(d);h<e.near||h>e.far||t.push({distance:h,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,o.start),i=Math.min(r.count,o.start+o.count)-1;n<i;n+=h){if(l.fromBufferAttribute(r,n),c.fromBufferAttribute(r,n+1),la.distanceSqToSegment(l,c,d,u)>a)continue;d.applyMatrix4(this.matrixWorld);const i=e.ray.origin.distanceTo(d);i<e.near||i>e.far||t.push({distance:i,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}ua.prototype.isLine=!0;const da=new pt,ha=new pt;class pa extends ua{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,i=t.count;e<i;e+=2)da.fromBufferAttribute(t,e),ha.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+da.distanceTo(ha);e.setAttribute("lineDistance",new Gn(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}pa.prototype.isLineSegments=!0;class fa extends ua{constructor(e,t){super(e,t),this.type="LineLoop"}}fa.prototype.isLineLoop=!0;class ma extends Cn{constructor(e){super(),this.type="PointsMaterial",this.color=new Ke(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this}}ma.prototype.isPointsMaterial=!0;const ga=new Wt,va=new Vt,ya=new Ot,_a=new pt;class xa extends gn{constructor(e=new Zn,t=new ma){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ya.copy(n.boundingSphere),ya.applyMatrix4(i),ya.radius+=r,!1===e.ray.intersectsSphere(ya))return;ga.copy(i).invert(),va.copy(e.ray).applyMatrix4(ga);const s=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=s*s;if(n.isBufferGeometry){const r=n.index,s=n.attributes.position;if(null!==r)for(let n=Math.max(0,o.start),l=Math.min(r.count,o.start+o.count);n<l;n++){const o=r.getX(n);_a.fromBufferAttribute(s,o),ba(_a,o,a,i,e,t,this)}else for(let n=Math.max(0,o.start),r=Math.min(s.count,o.start+o.count);n<r;n++)_a.fromBufferAttribute(s,n),ba(_a,n,a,i,e,t,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function ba(e,t,n,i,r,o,s){const a=va.distanceSqToPoint(e);if(a<n){const n=new pt;va.closestPointToPoint(e,n),n.applyMatrix4(i);const l=r.ray.origin.distanceTo(n);if(l<r.near||l>r.far)return;o.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:t,face:null,object:s})}}xa.prototype.isPoints=!0;class wa extends rt{constructor(e,t,n,i,r,o,s,a,l){super(e,t,n,i,r,o,s,a,l),this.minFilter=void 0!==o?o:C,this.magFilter=void 0!==r?r:C,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)})}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}wa.prototype.isVideoTexture=!0;class Ta extends rt{constructor(e,t,n){super({width:e,height:t}),this.format=n,this.magFilter=M,this.minFilter=M,this.generateMipmaps=!1,this.needsUpdate=!0}}Ta.prototype.isFramebufferTexture=!0;class Sa extends rt{constructor(e,t,n,i,r,o,s,a,l,c,u,d){super(null,o,s,a,l,c,i,r,u,d),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}Sa.prototype.isCompressedTexture=!0;class Ea extends rt{constructor(e,t,n,i,r,o,s,a,l){super(e,t,n,i,r,o,s,a,l),this.needsUpdate=!0}}Ea.prototype.isCanvasTexture=!0;class Ma extends Zn{constructor(e=1,t=8,n=0,i=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radiu
vendor: 2,236 bytes, line 30
30s:e,segments:t,thetaStart:n,thetaLength:i},t=Math.max(3,t);const r=[],o=[],s=[],a=[],l=new pt,c=new He;o.push(0,0,0),s.push(0,0,1),a.push(.5,.5);for(let r=0,u=3;r<=t;r++,u+=3){const d=n+r/t*i;l.x=e*Math.cos(d),l.y=e*Math.sin(d),o.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(o[u]/e+1)/2,c.y=(o[u+1]/e+1)/2,a.push(c.x,c.y)}for(let e=1;e<=t;e++)r.push(e,e+1,0);this.setIndex(r),this.setAttribute("position",new Gn(o,3)),this.setAttribute("normal",new Gn(s,3)),this.setAttribute("uv",new Gn(a,2))}static fromJSON(e){return new Ma(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Aa extends Zn{constructor(e=1,t=1,n=1,i=8,r=1,o=!1,s=0,a=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a};const l=this;i=Math.floor(i),r=Math.floor(r);const c=[],u=[],d=[],h=[];let p=0;const f=[],m=n/2;let g=0;function v(n){const r=p,o=new He,f=new pt;let v=0;const y=!0===n?e:t,_=!0===n?1:-1;for(let e=1;e<=i;e++)u.push(0,m*_,0),d.push(0,_,0),h.push(.5,.5),p++;const x=p;for(let e=0;e<=i;e++){const t=e/i*a+s,n=Math.cos(t),r=Math.sin(t);f.x=y*r,f.y=m*_,f.z=y*n,u.push(f.x,f.y,f.z),d.push(0,_,0),o.x=.5*n+.5,o.y=.5*r*_+.5,h.push(o.x,o.y),p++}for(let e=0;e<i;e++){const t=r+e,i=x+e;!0===n?c.push(i,i+1,t):c.push(i+1,i,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const o=new pt,v=new pt;let y=0;const _=(t-e)/n;for(let l=0;l<=r;l++){const c=[],g=l/r,y=g*(t-e)+e;for(let e=0;e<=i;e++){const t=e/i,r=t*a+s,l=Math.sin(r),f=Math.cos(r);v.x=y*l,v.y=-g*n+m,v.z=y*f,u.push(v.x,v.y,v.z),o.set(l,_,f).normalize(),d.push(o.x,o.y,o.z),h.push(t,1-g),c.push(p++)}f.push(c)}for(let e=0;e<i;e++)for(let t=0;t<r;t++){const n=f[t][e],i=f[t+1][e],r=f[t+1][e+1],o=f[t][e+1];c.push(n,i,o),c.push(i,r,o),y+=6}l.addGroup(g,y,0),g+=y}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new Gn(u,3)),this.setAttribute("normal",new Gn(d,3)),this.setAttribute("uv",new Gn(h,2))}static fromJSON(e){return new Aa(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ra extends Aa{constructor(e=1,t=1,n=8,i=1,r=!1,o=0,s=2*Math.PI){super(0,e,t,n,i,r,o,s),this.type="C
30oneGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:o,thetaLength:s}}static fromJSON(e){return new Ra(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ca extends Zn{constructor(e=[],t=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:i};const r=[],o=[];function s(e,t,n,i){const r=i+1,o=[];for(let i=0;i<=r;i++){o[i]=[];const s=e.clone().lerp(n,i/r),a=t.clone().lerp(n,i/r),l=r-i;for(let e=0;e<=l;e++)o[i][e]=0===e&&i===r?s:s.clone().lerp(a,e/l)}for(let e=0;e<r;e++)for(let t=0;t<2*(r-e)-1;t++){const n=Math.floor(t/2);t%2==0?(a(o[e][n+1]),a(o[e+1][n]),a(o[e][n])):(a(o[e][n+1]),a(o[e+1][n+1]),a(o[e+1][n]))}}function a(e){r.push(e.x,e.y,e.z)}function l(t,n){const i=3*t;n.x=e[i+0],n.y=e[i+1],n.z=e[i+2]}function c(e,t,n,i){i<0&&1===e.x&&(o[t]=e.x-1),0===n.x&&0===n.z&&(o[t]=i/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}function d(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}!function(e){const n=new pt,i=new pt,r=new pt;for(let o=0;o<t.length;o+=3)l(t[o+0],n),l(t[o+1],i),l(t[o+2],r),s(n,i,r,e)}(i),function(e){const t=new pt;for(let n=0;n<r.length;n+=3)t.x=r[n+0],t.y=r[n+1],t.z=r[n+2],t.normalize().multiplyScalar(e),r[n+0]=t.x,r[n+1]=t.y,r[n+2]=t.z}(n),function(){const e=new pt;for(let t=0;t<r.length;t+=3){e.x=r[t+0],e.y=r[t+1],e.z=r[t+2];const n=u(e)/2/Math.PI+.5,i=d(e)/Math.PI+.5;o.push(n,1-i)}(function(){const e=new pt,t=new pt,n=new pt,i=new pt,s=new He,a=new He,l=new He;for(let d=0,h=0;d<r.length;d+=9,h+=6){e.set(r[d+0],r[d+1],r[d+2]),t.set(r[d+3],r[d+4],r[d+5]),n.set(r[d+6],r[d+7],r[d+8]),s.set(o[h+0],o[h+1]),a.set(o[h+2],o[h+3]),l.set(o[h+4],o[h+5]),i.copy(e).add(t).add(n).divideScalar(3);const p=u(i);c(s,h+0,e,p),c(a,h+2,t,p),c(l,h+4,n,p)}})(),function(){for(let e=0;e<o.length;e+=6){const t=o[e+0],n=o[e+2],i=o[e+4],r=Math.max(t,n,i),s=Math.min(t,n,i);r>.9&&s<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),i<.2&&(o[e+4]+=1))}}()}(),this.setAttribute("position",new Gn(r,3)),this.setAttribute("normal",new Gn(r.slice(),3)),this.setAttribute("uv",new Gn(o,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new Ca(e.vertices,e.indices,e.radius,e.details)}}class La extends Ca{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
vendor: 13,108 bytes, line 30
3019,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new La(e.radius,e.detail)}}const Pa=new pt,Ia=new pt,ka=new pt,Da=new An;class Oa extends Zn{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,i=Math.pow(10,n),r=Math.cos(Le*t),o=e.getIndex(),s=e.getAttribute("position"),a=o?o.count:s.count,l=[0,0,0],c=["a","b","c"],u=new Array(3),d={},h=[];for(let e=0;e<a;e+=3){o?(l[0]=o.getX(e),l[1]=o.getX(e+1),l[2]=o.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:a}=Da;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),a.fromBufferAttribute(s,l[2]),Da.getNormal(ka),u[0]=`${Math.round(t.x*i)},${Math.round(t.y*i)},${Math.round(t.z*i)}`,u[1]=`${Math.round(n.x*i)},${Math.round(n.y*i)},${Math.round(n.z*i)}`,u[2]=`${Math.round(a.x*i)},${Math.round(a.y*i)},${Math.round(a.z*i)}`,u[0]!==u[1]&&u[1]!==u[2]&&u[2]!==u[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=u[e],i=u[t],o=Da[c[e]],s=Da[c[t]],a=`${n}_${i}`,p=`${i}_${n}`;p in d&&d[p]?(ka.dot(d[p].normal)<=r&&(h.push(o.x,o.y,o.z),h.push(s.x,s.y,s.z)),d[p]=null):a in d||(d[a]={index0:l[e],index1:l[t],normal:ka.clone()})}}for(const e in d)if(d[e]){const{index0:t,index1:n}=d[e];Pa.fromBufferAttribute(s,t),Ia.fromBufferAttribute(s,n),h.push(Pa.x,Pa.y,Pa.z),h.push(Ia.x,Ia.y,Ia.z)}this.setAttribute("position",new Gn(h,3))}}}class Na{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let i=0;const r=n.length;let o;o=t||e*n[r-1];let s,a=0,l=r-1;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),s=n[i]-o,s<0)a=i+1;else{if(!(s>0)){l=i;break}l=i-1}if(i=l,n[i]===o)return i/(r-1);const c=n[i];return(i+(o-c)/(n[i+1]-c))/(r-1)}getTangent(e,t){const n=1e-4;let i=e-n,r=e+n;i<0&&(i=0),r>1&&(r=1);const o=this.getPoint(i),s=this.getPoint(r),a=t||(o.isVector2?new He:new pt);return a.copy(s).sub(o).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new pt,i=[],r=[],o=[],s=new pt,a=new Wt;for(let t=0;t<=e;t++){const n=t/e;i[t]=this.getTangentAt(n,new pt)}r[0]=new pt,o[0]=new pt;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),u=Math.abs(i[0].y),d=Math.abs(i[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],s),o[0].crossVectors(i[0],r[0]);for(let t=1;t<=e;t++){if(r[t]=r[t-1].clone(),o[t]=o[t-1].clone(),s.crossVectors(i[t-1],i[t]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(ke(i[t-1].dot(i[t]),-1,1));r[t].applyMatrix4(a.makeRotationAxis(s,e))}o[t].crossVectors(i[t],r[t])}if(!0===t){let t=Math.acos(ke(r[0].dot(r[e]),-1,1));t/=e,i[0].dot(s.crossVectors(r[0],r[e]))>0&&(t=-t);for(let n=1;n<=e;n++)r[n].applyMatrix4(a.makeRotationAxis(i[n],t*n)),o[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Fa extends Na{constructor(e=0,t=0,n=1,i=1,r=0,o=2*Math.PI,s=!1,a=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=s,this.aRotation=a}getPoint(e,t){const n=t||new He,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(r=o?0:i),!0!==this.aClockwise||o||(r===i?r=-i:r-=i);const s=this.aStartAngle+e*r;let a=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=a-this.aX,i=l-this.aY;a=n*e-i*t+this.aX,l=n*t+i*e+this.aY}return n.set(a,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}Fa.prototype.isEllipseCurve=!0;class Ua extends Fa{constructor(e,t,n,i,r,o){super(e,t,n,n,i,r,o),this.type="ArcCurve"}}function Ba(){let e=0,t=0,n=0,i=0;function r(r,o,s,a){e=r,t=s,n=-3*r+3*o-2*s-a,i=2*r-2*o+s+a}return{initCatmullRom:function(e,t,n,i,o){r(t,n,o*(n-e),o*(i-t))},initNonuniformCatmullRom:function(e,t,n,i,o,s,a){let l=(t-e)/o-(n-e)/(o+s)+(n-t)/s,c=(n-t)/s-(i-t)/(s+a)+(i-n)/a;l*=s,c*=s,r(t,n,l,c)},calc:function(r){const o=r*r;return e+t*r+n*o+i*(o*r)}}}Ua.prototype.isArcCurve=!0;const Ha=new pt,za=new Ba,Ga=new Ba,Va=new Ba;class Wa extends Na{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new pt){const n=t,i=this.points,r=i.length,o=(r-(this.closed?0:1))*e;let s,a,l=Math.floor(o),c=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?s=i[(l-1)%r]:(Ha.subVectors(i[0],i[1]).add(i[0]),s=Ha);const u=i[l%r],d=i[(l+1)%r];if(this.closed||l+2<r?a=i[(l+2)%r]:(Ha.subVectors(i[r-1],i[r-2]).add(i[r-1]),a=Ha),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(s.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(d),e),i=Math.pow(d.distanceToSquared(a),e);n<1e-4&&(n=1),t<1e-4&&(t=n),i<1e-4&&(i=n),za.initNonuniformCatmullRom(s.x,u.x,d.x,a.x,t,n,i),Ga.initNonuniformCatmullRom(s.y,u.y,d.y,a.y,t,n,i),Va.initNonuniformCatmullRom(s.z,u.z,d.z,a.z,t,n,i)}else"catmullrom"===this.curveType&&(za.initCatmullRom(s.x,u.x,d.x,a.x,this.tension),Ga.initCatmullRom(s.y,u.y,d.y,a.y,this.tension),Va.initCatmullRom(s.z,u.z,d.z,a.z,this.tension));return n.set(za.calc(c),Ga.calc(c),Va.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new pt).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function ja(e,t,n,i,r){const o=.5*(i-t),s=.5*(r-n),a=e*e;return(2*n-2*i+o+s)*(e*a)+(-3*n+3*i-2*o-s)*a+o*e+n}function qa(e,t,n,i){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,i)}function Xa(e,t,n,i,r){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,i)+function(e,t){return e*e*e*t}(e,r)}Wa.prototype.isCatmullRomCurve3=!0;class $a extends Na{constructor(e=new He,t=new He,n=new He,i=new He){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new He){const n=t,i=this.v0,r=this.v1,o=this.v2,s=this.v3;return n.set(Xa(e,i.x,r.x,o.x,s.x),Xa(e,i.y,r.y,o.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}$a.prototype.isCubicBezierCurve=!0;class Ya extends Na{constructor(e=new pt,t=new pt,n=new pt,i=new pt){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new pt){const n=t,i=this.v0,r=this.v1,o=this.v2,s=this.v3;return n.set(Xa(e,i.x,r.x,o.x,s.x),Xa(e,i.y,r.y,o.y,s.y),Xa(e,i.z,r.z,o.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Ya.prototype.isCubicBezierCurve3=!0;class Ja extends Na{constructor(e=new He,t=new He){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new He){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new He;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ja.prototype.isLineCurve=!0;class Za extends Na{constructor(e=new pt,t=new pt){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new pt){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Ka extends Na{constructor(e=new He,t=new He,n=new He){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new He){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(qa(e,i.x,r.x,o.x),qa(e,i.y,r.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ka.prototype.isQuadraticBezierCurve=!0;class Qa extends Na{constructor(e=new pt,t=new pt,n=new pt){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new pt){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(qa(e,i.x,r.x,o.x),qa(e,i.y,r.y,o.y),qa(e,i.z,r.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Qa.prototype.isQuadraticBezierCurve3=!0;class el extends Na{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new He){const n=t,i=this.points,r=(i.length-1)*e,o=Math.floor(r),s=r-o,a=i[0===o?o:o-1],l=i[o],c=i[o>i.length-2?i.length-1:o+1],u=i[o>i.length-3?i.length-1:o+2];return n.set(ja(s,a.x,l.x,c.x,u.x),ja(s,a.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new He).fromArray(n))}return this}}el.prototype.isSplineCurve=!0;var tl=Object.freeze({__proto__:null,ArcCurve:Ua,CatmullRomCurve3:Wa,CubicBezierCurve:$a,CubicBezierCurve3:Ya,EllipseCurve:Fa,LineCurve:Ja,LineCurve3:Za,QuadraticBezierCurve:Ka,QuadraticBezierCurve3:Qa,SplineCurve:el});
vendor: 4,772 bytes, line 30
30class nl extends Na{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Ja(t,e))}getPoint(e,t){const n=e*this.getLength(),i=this.getCurveLengths();let r=0;for(;r<i.length;){if(i[r]>=n){const e=i[r]-n,o=this.curves[r],s=o.getLength(),a=0===s?0:1-e/s;return o.getPointAt(a,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n<i;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let i=0,r=this.curves;i<r.length;i++){const o=r[i],s=o.isEllipseCurve?2*e:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,a=o.getPoints(s);for(let e=0;e<a.length;e++){const i=a[e];n&&n.equals(i)||(t.push(i),n=i)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new tl[n.type]).fromJSON(n))}return this}}class il extends nl{constructor(e){super(),this.type="Path",this.currentPoint=new He,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Ja(this.currentPoint.clone(),new He(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){const r=new Ka(this.currentPoint.clone(),new He(e,t),new He(n,i));return this.curves.push(r),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,r,o){const s=new $a(this.currentPoint.clone(),new He(e,t),new He(n,i),new He(r,o));return this.curves.push(s),this.currentPoint.set(r,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new el(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,r,o){const s=this.currentPoint.x,a=this.currentPoint.y;return this.absarc(e+s,t+a,n,i,r,o),this}absarc(e,t,n,i,r,o){return this.absellipse(e,t,n,n,i,r,o),this}ellipse(e,t,n,i,r,o,s,a){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,i,r,o,s,a),this}absellipse(e,t,n,i,r,o,s,a){const l=new Fa(e,t,n,i,r,o,s,a);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class rl extends il{constructor(e){super(e),this.uuid=Ie(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new il).fromJSON(n))}return this}}const ol=function(e,t,n=2){const i=t&&t.length,r=i?t[0]*n:e.length;let o=sl(e,0,r,n,!0);const s=[];if(!o||o.next===o.prev)return s;let a,l,c,u,d,h,p;if(i&&(o=function(e,t,n,i){const r=[];let o,s,a,l,c;for(o=0,s=t.length;o<s;o++)a=t[o]*i,l=o<s-1?t[o+1]*i:e.length,c=sl(e,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(vl(c));for(r.sort(pl),o=0;o<r.length;o++)fl(r[o],n),n=al(n,n.next);return n}(e,t,o,n)),e.length>80*n){a=c=e[0],l=u=e[1];for(let t=n;t<r;t+=n)d=e[t],h=e[t+1],d<a&&(a=d),h<l&&(l=h),d>c&&(c=d),h>u&&(u=h);p=Math.max(c-a,u-l),p=0!==p?1/p:0}
vendor: 9,290 bytes, line 30
30return ll(o,s,n,a,l,p),s};function sl(e,t,n,i,r){let o,s;if(r===function(e,t,n,i){let r=0;for(let o=t,s=n-i;o<n;o+=i)r+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return r}(e,t,n,i)>0)for(o=t;o<n;o+=i)s=Al(o,e[o],e[o+1],s);else for(o=n-i;o>=t;o-=i)s=Al(o,e[o],e[o+1],s);return s&&bl(s,s.next)&&(Rl(s),s=s.next),s}function al(e,t){if(!e)return e;t||(t=e);let n,i=e;do{if(n=!1,i.steiner||!bl(i,i.next)&&0!==xl(i.prev,i,i.next))i=i.next;else{if(Rl(i),i=t=i.prev,i===i.next)break;n=!0}}while(n||i!==t);return t}function ll(e,t,n,i,r,o,s){if(!e)return;!s&&o&&function(e,t,n,i){let r=e;do{null===r.z&&(r.z=gl(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,function(e){let t,n,i,r,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,i=n,a=0,t=0;t<c&&(a++,i=i.nextZ,i);t++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;n=i}o.nextZ=null,c*=2}while(s>1)}(r)}(e,i,r,o);let a,l,c=e;for(;e.prev!==e.next;)if(a=e.prev,l=e.next,o?ul(e,i,r,o):cl(e))t.push(a.i/n),t.push(e.i/n),t.push(l.i/n),Rl(e),e=l.next,c=l.next;else if((e=l)===c){s?1===s?ll(e=dl(al(e),t,n),t,n,i,r,o,2):2===s&&hl(e,t,n,i,r,o):ll(al(e),t,n,i,r,o,1);break}}function cl(e){const t=e.prev,n=e,i=e.next;if(xl(t,n,i)>=0)return!1;let r=e.next.next;for(;r!==e.prev;){if(yl(t.x,t.y,n.x,n.y,i.x,i.y,r.x,r.y)&&xl(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function ul(e,t,n,i){const r=e.prev,o=e,s=e.next;if(xl(r,o,s)>=0)return!1;const a=r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,l=r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,c=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,u=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,d=gl(a,l,t,n,i),h=gl(c,u,t,n,i);let p=e.prevZ,f=e.nextZ;for(;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&yl(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&xl(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&yl(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&xl(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&yl(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&xl(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&yl(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&xl(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function dl(e,t,n){let i=e;do{const r=i.prev,o=i.next.next;!bl(r,o)&&wl(r,i,i.next,o)&&El(r,o)&&El(o,r)&&(t.push(r.i/n),t.push(i.i/n),t.push(o.i/n),Rl(i),Rl(i.next),i=e=o),i=i.next}while(i!==e);return al(i)}function hl(e,t,n,i,r,o){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&_l(s,e)){let a=Ml(s,e);return s=al(s,s.next),a=al(a,a.next),ll(s,t,n,i,r,o),void ll(a,t,n,i,r,o)}e=e.next}s=s.next}while(s!==e)}function pl(e,t){return e.x-t.x}function fl(e,t){if(t=function(e,t){let n=t;const i=e.x,r=e.y;let o,s=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const e=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=i&&e>s){if(s=e,e===i){if(r===n.y)return n;if(r===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(i===s)return o;const a=o,l=o.x,c=o.y;let u,d=1/0;n=o;do{i>=n.x&&n.x>=l&&i!==n.x&&yl(r<c?i:s,r,l,c,r<c?s:i,r,n.x,n.y)&&(u=Math.abs(r-n.y)/(i-n.x),El(n,e)&&(u<d||u===d&&(n.x>o.x||n.x===o.x&&ml(o,n)))&&(o=n,d=u)),n=n.next}while(n!==a);return o}(e,t),t){const n=Ml(t,e);al(t,t.next),al(n,n.next)}}function ml(e,t){return xl(e.prev,e,t.prev)<0&&xl(t.next,e,e.next)<0}function gl(e,t,n,i,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function vl(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function yl(e,t,n,i,r,o,s,a){return(r-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(i-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(r-s)*(i-a)>=0}function _l(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&wl(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(El(e,t)&&El(t,e)&&function(e,t){let n=e,i=!1;const r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==e);return i}(e,t)&&(xl(e.prev,e,t.prev)||xl(e,t.prev,t))||bl(e,t)&&xl(e.prev,e,e.next)>0&&xl(t.prev,t,t.next)>0)}function xl(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function bl(e,t){return e.x===t.x&&e.y===t.y}function wl(e,t,n,i){const r=Sl(xl(e,t,n)),o=Sl(xl(e,t,i)),s=Sl(xl(n,i,e)),a=Sl(xl(n,i,t));return r!==o&&s!==a||!(0!==r||!Tl(e,n,t))||!(0!==o||!Tl(e,i,t))||!(0!==s||!Tl(n,e,i))||!(0!==a||!Tl(n,t,i))}function Tl(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Sl(e){return e>0?1:e<0?-1:0}function El(e,t){return xl(e.prev,e,e.next)<0?xl(e,t,e.next)>=0&&xl(e,e.prev,t)>=0:xl(e,t,e.prev)<0||xl(e,e.next,t)<0}function Ml(e,t){const n=new Cl(e.i,e.x,e.y),i=new Cl(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function Al(e,t,n,i){const r=new Cl(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Rl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Cl(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Ll{static area(e){const t=e.length;let n=0;for(let i=t-1,r=0;r<t;i=r++)n+=e[i].x*e[r].y-e[r].x*e[i].y;return.5*n}static isClockWise(e){return Ll.area(e)<0}static triangulateShape(e,t){const n=[],i=[],r=[];Pl(e),Il(n,e);let o=e.length;t.forEach(Pl);for(let e=0;e<t.length;e++)i.push(o),o+=t[e].length,Il(n,t[e]);const s=ol(n,i);for(let e=0;e<s.length;e+=3)r.push(s.slice(e,e+3));return r}}function Pl(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Il(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class kl extends Zn{constructor(e=new rl([new He(.5,.5),new He(-.5,.5),new He(-.5,-.5),new He(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,i=[],r=[];for(let t=0,n=e.length;t<n;t++)o(e[t]);function o(e){const o=[],s=void 0!==t.curveSegments?t.curveSegments:12,a=void 0!==t.steps?t.steps:1;let l=void 0!==t.depth?t.depth:1,c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:.2,d=void 0!==t.bevelSize?t.bevelSize:u-.1,h=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Dl;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);let g,v,y,_,x,b=!1;f&&(g=f.getSpacedPoints(a),b=!0,c=!1,v=f.computeFrenetFrames(a,!1),y=new pt,_=new pt,x=new pt),c||(p=0,u=0,d=0,h=0);const w=e.extractPoints(s);let T=w.shape;const S=w.holes;if(!Ll.isClockWise(T)){T=T.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];Ll.isClockWise(t)&&(S[e]=t.reverse())}}const E=Ll.triangulateShape(T,S),M=T;for(let e=0,t=S.length;e<t;e++){const t=S[e];T=T.concat(t)}function A(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const R=T.length,C=E.length;function L(e,t,n){let i,r,o;const s=e.x-t.x,a=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=s*s+a*a,d=s*c-a*l;if(Math.abs(d)>Number.EPSILON){const d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),p=t.x-a/d,f=t.y+s/d,m=((n.x-c/h-p)*c-(n.y+l/h-f)*l)/(s*c-a*l);i=p+s*m-e.x,r=f+a*m-e.y;const g=i*i+r*r;if(g<=2)return new He(i,r);o=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(a)===Math.sign(c)&&(e=!0),e?(i=-a,r=s,o=Math.sqrt(u)):(i=s,r=a,o=Math.sqrt(u/2))}return new He(i/o,r/o)}const P=[];for(let e=0,t=M.length,n=t-1,i=e+1;e<t;e++,n++,i++)n===t&&(n=0),i===t&&(i=0),P[e]=L(M[e],M[n],M[i]);const I=[];let k,D=P.concat();for(let e=0,t=S.length;e<t;e++){const t=S[e];k=[];for(let e=0,n=t.length,i=n-1,r=e+1;e<n;e++,i++,r++)i===n&&(i=0),r===n&&(r=0),k[e]=L(t[e],t[i],t[r]);I.push(k),D=D.concat(k)}for(let e=0;e<p;e++){const t=e/p,n=u*Math.cos(t*Math.PI/2),i=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=M.length;e<t;e++){const t=A(M[e],P[e],i);F(t.x,t.y,-n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];k=I[e];for(let e=0,r=t.length;e<r;e++){const r=A(t[e],k[e],i);F(r.x,r.y,-n)}}}const O=d+h;for(let e=0;e<R;e++){const t=c?A(T[e],D[e],O):T[e];b?(_.copy(v.normals[0]).multiplyScalar(t.x),y.copy(v.binormals[0]).multiplyScalar(t.y),x.copy(g[0]).add(_).add(y),F(x.x,x.y,x.z)):F(t.x,t.y,0)}for(let e=1;e<=a;e++)for(let t=0;t<R;t++){const n=c?A(T[t],D[t],O):T[t];b?(_.copy(v.normals[e]).multiplyScalar(n.x),y.copy(v.binormals[e]).multiplyScalar(n.y),x.copy(g[e]).add(_).add(y),F(x.x,x.y,x.z)):F(n.x,n.y,l/a*e)}for(let e=p-1;e>=0;e--){const t=e/p,n=u*Math.cos(t*Math.PI/2),i=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=M.length;e<t;e++){const t=A(M[e],P[e],i);F(t.x,t.y,l+n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];k=I[e];for(let e=0,r=t.length;e<r;e++){const r=A(t[e],k[e],i);b?F(r.x,r.y+g[a-1].y,g[a-1].x+n):F(r.x,r.y,l+n)}}}function N(e,t){let n=e.length;for(;--n>=0;){const i=n;let r=n-1;r<0&&(r=e.length-1);for(let e=0,n=a+2*p;
vendor: 6,336 bytes, line 30
30e<n;e++){const n=R*e,o=R*(e+1);B(t+i+n,t+r+n,t+r+o,t+i+o)}}}function F(e,t,n){o.push(e),o.push(t),o.push(n)}function U(e,t,r){H(e),H(t),H(r);const o=i.length/3,s=m.generateTopUV(n,i,o-3,o-2,o-1);z(s[0]),z(s[1]),z(s[2])}function B(e,t,r,o){H(e),H(t),H(o),H(t),H(r),H(o);const s=i.length/3,a=m.generateSideWallUV(n,i,s-6,s-3,s-2,s-1);z(a[0]),z(a[1]),z(a[3]),z(a[1]),z(a[2]),z(a[3])}function H(e){i.push(o[3*e+0]),i.push(o[3*e+1]),i.push(o[3*e+2])}function z(e){r.push(e.x),r.push(e.y)}!function(){const e=i.length/3;if(c){let e=0,t=R*e;for(let e=0;e<C;e++){const n=E[e];U(n[2]+t,n[1]+t,n[0]+t)}e=a+2*p,t=R*e;for(let e=0;e<C;e++){const n=E[e];U(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<C;e++){const t=E[e];U(t[2],t[1],t[0])}for(let e=0;e<C;e++){const t=E[e];U(t[0]+R*a,t[1]+R*a,t[2]+R*a)}}n.addGroup(e,i.length/3-e,0)}(),function(){const e=i.length/3;let t=0;N(M,t),t+=M.length;for(let e=0,n=S.length;e<n;e++){const n=S[e];N(n,t),t+=n.length}n.addGroup(e,i.length/3-e,1)}()}this.setAttribute("position",new Gn(i,3)),this.setAttribute("uv",new Gn(r,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,i=e.length;t<i;t++){const i=e[t];n.shapes.push(i.uuid)}else n.shapes.push(e.uuid);return void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,r=e.shapes.length;i<r;i++){const r=t[e.shapes[i]];n.push(r)}const i=e.options.extrudePath;return void 0!==i&&(e.options.extrudePath=(new tl[i.type]).fromJSON(i)),new kl(n,e.options)}}const Dl={generateTopUV:function(e,t,n,i,r){const o=t[3*n],s=t[3*n+1],a=t[3*i],l=t[3*i+1],c=t[3*r],u=t[3*r+1];return[new He(o,s),new He(a,l),new He(c,u)]},generateSideWallUV:function(e,t,n,i,r,o){const s=t[3*n],a=t[3*n+1],l=t[3*n+2],c=t[3*i],u=t[3*i+1],d=t[3*i+2],h=t[3*r],p=t[3*r+1],f=t[3*r+2],m=t[3*o],g=t[3*o+1],v=t[3*o+2];return Math.abs(a-u)<Math.abs(s-c)?[new He(s,1-l),new He(c,1-d),new He(h,1-f),new He(m,1-v)]:[new He(a,1-l),new He(u,1-d),new He(p,1-f),new He(g,1-v)]}};class Ol extends Ca{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Ol(e.radius,e.detail)}}class Nl extends Zn{constructor(e=[new He(0,.5),new He(.5,0),new He(0,-.5)],t=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:i},t=Math.floor(t),i=ke(i,0,2*Math.PI);const r=[],o=[],s=[],a=[],l=[],c=1/t,u=new pt,d=new He,h=new pt,p=new pt,f=new pt;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,f.copy(h),h.normalize(),a.push(h.x,h.y,h.z);break;case e.length-1:a.push(f.x,f.y,f.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,p.copy(h),h.x+=f.x,h.y+=f.y,h.z+=f.z,h.normalize(),a.push(h.x,h.y,h.z),f.copy(p)}for(let r=0;r<=t;r++){const h=n+r*c*i,p=Math.sin(h),f=Math.cos(h);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*p,u.y=e[n].y,u.z=e[n].x*f,o.push(u.x,u.y,u.z),d.x=r/t,d.y=n/(e.length-1),s.push(d.x,d.y);const i=a[3*n+0]*p,c=a[3*n+1],h=a[3*n+0]*f;l.push(i,c,h)}}for(let n=0;n<t;n++)for(let t=0;t<e.length-1;t++){const i=t+n*e.length,o=i,s=i+e.length,a=i+e.length+1,l=i+1;r.push(o,s,l),r.push(a,l,s)}this.setIndex(r),this.setAttribute("position",new Gn(o,3)),this.setAttribute("uv",new Gn(s,2)),this.setAttribute("normal",new Gn(l,3))}static fromJSON(e){return new Nl(e.points,e.segments,e.phiStart,e.phiLength)}}class Fl extends Ca{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Fl(e.radius,e.detail)}}class Ul extends Zn{constructor(e=.5,t=1,n=8,i=1,r=0,o=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:o},n=Math.max(3,n);const s=[],a=[],l=[],c=[];let u=e;const d=(t-e)/(i=Math.max(1,i)),h=new pt,p=new He;for(let e=0;e<=i;e++){for(let e=0;e<=n;e++){const i=r+e/n*o;h.x=u*Math.cos(i),h.y=u*Math.sin(i),a.push(h.x,h.y,h.z),l.push(0,0,1),p.x=(h.x/t+1)/2,p.y=(h.y/t+1)/2,c.push(p.x,p.y)}u+=d}for(let e=0;e<i;e++){const t=e*(n+1);for(let e=0;e<n;e++){const i=e+t,r=i,o=i+n+1,a=i+n+2,l=i+1;s.push(r,o,l),s.push(o,a,l)}}this.setIndex(s),this.setAttribute("position",new Gn(a,3)),this.setAttribute("normal",new Gn(l,3)),this.setAttribute("uv",new Gn(c,2))}static fromJSON(e){return new Ul(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Bl extends Zn{constructor(e=new rl([new He(0,.5),new He(-.5,-.5),new He(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],i=[],r=[],o=[];let s=0,a=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t<e.length;t++)l(e[t]),this.addGroup(s,a,t),s+=a,a=0;function l(e){const s=i.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===Ll.isClockWise(c)&&(c=c.reverse());for(let e=0,t=u.length;e<t;e++){const t=u[e];!0===Ll.isClockWise(t)&&(u[e]=t.reverse())}const d=Ll.triangulateShape(c,u);for(let e=0,t=u.length;e<t;e++){const t=u[e];c=c.concat(t)}for(let e=0,t=c.length;e<t;e++){const t=c[e];i.push(t.x,t.y,0),r.push(0,0,1),o.push(t.x,t.y)}for(let e=0,t=d.length;e<t;e++){const t=d[e],i=t[0]+s,r=t[1]+s,o=t[2]+s;n.push(i,r,o),a+=3}}this.setIndex(n),this.setAttribute("position",new Gn(i,3)),this.setAttribute("normal",new Gn(r,3)),this.setAttribute("uv",new Gn(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,i=e.length;n<i;n++){const i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let i=0,r=e.shapes.length;i<r;i++){const r=t[e.shapes[i]];n.push(r)}return new Bl(n,e.curveSegments)}}class Hl extends Zn{constructor(e=1,t=32,n=16,i=0,r=2*Math.PI,o=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radiu
vendor: 27,441 bytes, line 30
30s:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:o,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const a=Math.min(o+s,Math.PI);let l=0;const c=[],u=new pt,d=new pt,h=[],p=[],f=[],m=[];for(let h=0;h<=n;h++){const g=[],v=h/n;let y=0;0==h&&0==o?y=.5/t:h==n&&a==Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const a=n/t;u.x=-e*Math.cos(i+a*r)*Math.sin(o+v*s),u.y=e*Math.cos(o+v*s),u.z=e*Math.sin(i+a*r)*Math.sin(o+v*s),p.push(u.x,u.y,u.z),d.copy(u).normalize(),f.push(d.x,d.y,d.z),m.push(a+y,1-v),g.push(l++)}c.push(g)}for(let e=0;e<n;e++)for(let i=0;i<t;i++){const t=c[e][i+1],r=c[e][i],s=c[e+1][i],l=c[e+1][i+1];(0!==e||o>0)&&h.push(t,r,l),(e!==n-1||a<Math.PI)&&h.push(r,s,l)}this.setIndex(h),this.setAttribute("position",new Gn(p,3)),this.setAttribute("normal",new Gn(f,3)),this.setAttribute("uv",new Gn(m,2))}static fromJSON(e){return new Hl(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class zl extends Ca{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new zl(e.radius,e.detail)}}class Gl extends Zn{constructor(e=1,t=.4,n=8,i=6,r=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:i,arc:r},n=Math.floor(n),i=Math.floor(i);const o=[],s=[],a=[],l=[],c=new pt,u=new pt,d=new pt;for(let o=0;o<=n;o++)for(let h=0;h<=i;h++){const p=h/i*r,f=o/n*Math.PI*2;u.x=(e+t*Math.cos(f))*Math.cos(p),u.y=(e+t*Math.cos(f))*Math.sin(p),u.z=t*Math.sin(f),s.push(u.x,u.y,u.z),c.x=e*Math.cos(p),c.y=e*Math.sin(p),d.subVectors(u,c).normalize(),a.push(d.x,d.y,d.z),l.push(h/i),l.push(o/n)}for(let e=1;e<=n;e++)for(let t=1;t<=i;t++){const n=(i+1)*e+t-1,r=(i+1)*(e-1)+t-1,s=(i+1)*(e-1)+t,a=(i+1)*e+t;o.push(n,r,a),o.push(r,s,a)}this.setIndex(o),this.setAttribute("position",new Gn(s,3)),this.setAttribute("normal",new Gn(a,3)),this.setAttribute("uv",new Gn(l,2))}static fromJSON(e){return new Gl(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Vl extends Zn{constructor(e=1,t=.4,n=64,i=8,r=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:i,p:r,q:o},n=Math.floor(n),i=Math.floor(i);const s=[],a=[],l=[],c=[],u=new pt,d=new pt,h=new pt,p=new pt,f=new pt,m=new pt,g=new pt;for(let s=0;s<=n;++s){const y=s/n*r*Math.PI*2;v(y,r,o,e,h),v(y+.01,r,o,e,p),m.subVectors(p,h),g.addVectors(p,h),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let e=0;e<=i;++e){const r=e/i*Math.PI*2,o=-t*Math.cos(r),p=t*Math.sin(r);u.x=h.x+(o*g.x+p*f.x),u.y=h.y+(o*g.y+p*f.y),u.z=h.z+(o*g.z+p*f.z),a.push(u.x,u.y,u.z),d.subVectors(u,h).normalize(),l.push(d.x,d.y,d.z),c.push(s/n),c.push(e/i)}}for(let e=1;e<=n;e++)for(let t=1;t<=i;t++){const n=(i+1)*(e-1)+(t-1),r=(i+1)*e+(t-1),o=(i+1)*e+t,a=(i+1)*(e-1)+t;s.push(n,r,a),s.push(r,o,a)}function v(e,t,n,i,r){const o=Math.cos(e),s=Math.sin(e),a=n/t*e,l=Math.cos(a);r.x=i*(2+l)*.5*o,r.y=i*(2+l)*s*.5,r.z=i*Math.sin(a)*.5}this.setIndex(s),this.setAttribute("position",new Gn(a,3)),this.setAttribute("normal",new Gn(l,3)),this.setAttribute("uv",new Gn(c,2))}static fromJSON(e){return new Vl(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Wl extends Zn{constructor(e=new Qa(new pt(-1,-1,0),new pt(-1,1,0),new pt(1,1,0)),t=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r};const o=e.computeFrenetFrames(t,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const s=new pt,a=new pt,l=new He;let c=new pt;const u=[],d=[],h=[],p=[];function f(r){c=e.getPointAt(r/t,c);const l=o.normals[r],h=o.binormals[r];for(let e=0;e<=i;e++){const t=e/i*Math.PI*2,r=Math.sin(t),o=-Math.cos(t);a.x=o*l.x+r*h.x,a.y=o*l.y+r*h.y,a.z=o*l.z+r*h.z,a.normalize(),d.push(a.x,a.y,a.z),s.x=c.x+n*a.x,s.y=c.y+n*a.y,s.z=c.z+n*a.z,u.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!1===r?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=i;n++)l.x=e/t,l.y=n/i,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=i;t++){const n=(i+1)*(e-1)+(t-1),r=(i+1)*e+(t-1),o=(i+1)*e+t,s=(i+1)*(e-1)+t;p.push(n,r,s),p.push(r,o,s)}}()}(),this.setIndex(p),this.setAttribute("position",new Gn(u,3)),this.setAttribute("normal",new Gn(d,3)),this.setAttribute("uv",new Gn(h,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Wl((new tl[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class jl extends Zn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,i=new pt,r=new pt;if(null!==e.index){const o=e.attributes.position,s=e.index;let a=e.groups;0===a.length&&(a=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=a.length;e<l;++e){const l=a[e],c=l.start;for(let e=c,a=c+l.count;e<a;e+=3)for(let a=0;a<3;a++){const l=s.getX(e+a),c=s.getX(e+(a+1)%3);i.fromBufferAttribute(o,l),r.fromBufferAttribute(o,c),!0===ql(i,r,n)&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const o=e.attributes.position;for(let e=0,s=o.count/3;e<s;e++)for(let s=0;s<3;s++){const a=3*e+s,l=3*e+(s+1)%3;i.fromBufferAttribute(o,a),r.fromBufferAttribute(o,l),!0===ql(i,r,n)&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new Gn(t,3))}}}function ql(e,t,n){const i=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,r=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(i)&&!0!==n.has(r)&&(n.add(i),n.add(r),!0)}var Xl=Object.freeze({__proto__:null,BoxGeometry:vi,BoxBufferGeometry:vi,CircleGeometry:Ma,CircleBufferGeometry:Ma,ConeGeometry:Ra,ConeBufferGeometry:Ra,CylinderGeometry:Aa,CylinderBufferGeometry:Aa,DodecahedronGeometry:La,DodecahedronBufferGeometry:La,EdgesGeometry:Oa,ExtrudeGeometry:kl,ExtrudeBufferGeometry:kl,IcosahedronGeometry:Ol,IcosahedronBufferGeometry:Ol,LatheGeometry:Nl,LatheBufferGeometry:Nl,OctahedronGeometry:Fl,OctahedronBufferGeometry:Fl,PlaneGeometry:Fi,PlaneBufferGeometry:Fi,PolyhedronGeometry:Ca,PolyhedronBufferGeometry:Ca,RingGeometry:Ul,RingBufferGeometry:Ul,ShapeGeometry:Bl,ShapeBufferGeometry:Bl,SphereGeometry:Hl,SphereBufferGeometry:Hl,TetrahedronGeometry:zl,TetrahedronBufferGeometry:zl,TorusGeometry:Gl,TorusBufferGeometry:Gl,TorusKnotGeometry:Vl,TorusKnotBufferGeometry:Vl,TubeGeometry:Wl,TubeBufferGeometry:Wl,WireframeGeometry:jl});class $l extends Cn{constructor(e){super(),this.type="ShadowMaterial",this.color=new Ke(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}$l.prototype.isShadowMaterial=!0;class Yl extends bi{constructor(e){super(e),this.type="RawShaderMaterial"}}Yl.prototype.isRawShaderMaterial=!0;class Jl extends Cn{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ke(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ke(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}Jl.prototype.isMeshStandardMaterial=!0;class Zl extends Jl{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new He(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return ke(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenColor=new Ke(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new Ke(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Ke(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}Zl.prototype.isMeshPhysicalMaterial=!0;class Kl extends Cn{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Ke(16777215),this.specular=new Ke(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ke(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}Kl.prototype.isMeshPhongMaterial=!0;class Ql extends Cn{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ke(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ke(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}Ql.prototype.isMeshToonMaterial=!0;class ec extends Cn{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}ec.prototype.isMeshNormalMaterial=!0;class tc extends Cn{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Ke(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ke(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}tc.prototype.isMeshLambertMaterial=!0;class nc extends Cn{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ke(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new He(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}}nc.prototype.isMeshMatcapMaterial=!0;class ic extends ra{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}ic.prototype.isLineDashedMaterial=!0;const rc={ShadowMaterial:$l,SpriteMaterial:ws,RawShaderMaterial:Yl,ShaderMaterial:bi,PointsMaterial:ma,MeshPhysicalMaterial:Zl,MeshStandardMaterial:Jl,MeshPhongMaterial:Kl,MeshToonMaterial:Ql,MeshNormalMaterial:ec,MeshLambertMaterial:tc,MeshDepthMaterial:ts,MeshDistanceMaterial:ns,MeshBasicMaterial:Ln,MeshMatcapMaterial:nc,LineDashedMaterial:ic,LineBasicMaterial:ra,Material:Cn};Cn.fromType=function(e){return new rc[e]};const oc={arraySlice:function(e,t,n){return oc.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort(function(t,n){return e[t]-e[n]}),n},sortedArray:function(e,t,n){const i=e.length,r=new e.constructor(i);for(let o=0,s=0;s!==i;++o){const i=n[o]*t;for(let n=0;n!==t;++n)r[s++]=e[i+n]}return r},flattenJSON:function(e,t,n,i){let r=1,o=e[0];for(;void 0!==o&&void 0===o[i];)o=e[r++];if(void 0===o)return;let s=o[i];if(void 0!==s)if(Array.isArray(s))do{s=o[i],void 0!==s&&(t.push(o.time),n.push.apply(n,s)),o=e[r++]}while(void 0!==o);else if(void 0!==s.toArray)do{s=o[i],void 0!==s&&(t.push(o.time),s.toArray(n,n.length)),o=e[r++]}while(void 0!==o);else do{s=o[i],void 0!==s&&(t.push(o.time),n.push(s)),o=e[r++]}while(void 0!==o)},subclip:function(e,t,n,i,r=30){const o=e.clone();o.name=t;const s=[];for(let e=0;e<o.tracks.length;++e){const t=o.tracks[e],a=t.getValueSize(),l=[],c=[];for(let e=0;e<t.times.length;++e){const o=t.times[e]*r;if(!(o<n||o>=i)){l.push(t.times[e]);for(let n=0;n<a;++n)c.push(t.values[e*a+n])}}0!==l.length&&(t.times=oc.convertArray(l,t.times.constructor),t.values=oc.convertArray(c,t.values.constructor),s.push(t))}o.tracks=s;let a=1/0;for(let e=0;e<o.tracks.length;++e)a>o.tracks[e].times[0]&&(a=o.tracks[e].times[0]);for(let e=0;e<o.tracks.length;++e)o.tracks[e].shift(-1*a);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,i=30){i<=0&&(i=30);const r=n.tracks.length,o=t/i;for(let t=0;t<r;++t){const i=n.tracks[t],r=i.ValueTypeName;if("bool"===r||"string"===r)continue;const s=e.tracks.find(function(e){return e.name===i.name&&e.ValueTypeName===r});if(void 0===s)continue;let a=0;const l=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(a=l/3);let c=0;const u=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const d=i.times.length-1;let h;if(o<=i.times[0]){const e=a,t=l-a;h=oc.arraySlice(i.values,e,t)}else if(o>=i.times[d]){const e=d*l+a,t=e+l-a;h=oc.arraySlice(i.values,e,t)}else{const e=i.createInterpolant(),t=a,n=l-a;e.evaluate(o),h=oc.arraySlice(e.resultBuffer,t,n)}"quaternion"===r&&(new ht).fromArray(h).normalize().conjugate().toArray(h);const p=s.times.length;for(let e=0;e<p;++e){const t=e*u+c;if("quaternion"===r)ht.multiplyQuaternionsFlat(s.values,t,h,0,s.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)s.values[t+n]-=h[n]}}}return e.blendMode=_e,e}};class sc{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{let o;n:{i:if(!(e<i)){for(let o=n+2;;){if(void 0===i){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,r)}if(n===o)break;if(r=i,i=t[++n],e<i)break t}o=t.length;break n}if(!(e>=r)){const s=t[1];e<s&&(n=2,r=s);for(let o=n-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(n===o)break;if(i=r,r=t[--n-1],e>=r)break t}o=n,n=0;break n}break e}for(;n<o;){const i=n+o>>>1;e<t[i]?o=i:n=i+1}if(i=t[n],r=t[n-1],void 0===r)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(void 0===i)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,r,e)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let e=0;e!==i;++e)t[e]=n[r+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}sc.prototype.beforeStart_=sc.prototype.copySampleValue_,sc.prototype.afterEnd_=sc.prototype.copySampleValue_;class ac extends sc{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:me,endingEnd:me}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,o=e+1,s=i[r],a=i[o];if(void 0===s)switch(this.getSettings_().endingStart){case ge:r=e,s=2*t-n;break;case ve:r=i.length-2,s=t+i[r]-i[r+1];break;default:r=e,s=n}if(void 0===a)switch(this.getSettings_().endingEnd){case ge:o=e,a=2*n-t;break;case ve:o=1,a=n+i[1]-i[0];break;default:o=e-1,a=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(a-n),this._offsetPrev=r*c,this._offsetNext=o*c}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=e*s,l=a-s,c=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,h=this._weightNext,p=(n-t)/(i-t),f=p*p,m=f*p,g=-d*m+2*d*f-d*p,v=(1+d)*m+(-1.5-2*d)*f+(-.5+d)*p+1,y=(-1-h)*m+(1.5+h)*f+.5*p,_=h*m-h*f;for(let e=0;e!==s;++e)r[e]=g*o[c+e]+v*o[l+e]+y*o[a+e]+_*o[u+e];return r}}class lc extends sc{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=e*s,l=a-s,c=(n-t)/(i-t),u=1-c;for(let e=0;e!==s;++e)r[e]=o[l+e]*u+o[a+e]*c;return r}}class cc extends sc{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class uc{constructor(e,t,n,i){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=oc.convertArray(t,this.TimeBufferType),this.values=oc.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:oc.convertArray(e.times,Array),values:oc.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new cc(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new lc(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new ac(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case he:t=this.InterpolantFactoryMethodDiscrete;break;case pe:t=this.InterpolantFactoryMethodLinear;break;case fe:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return he;case this.InterpolantFactoryMethodLinear:return pe;case this.InterpolantFactoryMethodSmooth:return fe}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,o=i-1;for(;r!==i&&n[r]<e;)++r;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==r||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const e=this.getValueSize();this.times=oc.arraySlice(n,r,o),this.values=oc.arraySlice(this.values,r*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let t=0;t!==r;t++){const i=n[t];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,i),e=!1;break}if(null!==o&&o>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,i,o),e=!1;break}o=i}if(void 0!==i&&oc.isTypedArray(i))for(let t=0,n=i.length;t!==n;++t){const n=i[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=oc.arraySlice(this.times),t=oc.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===fe,r=e.length-1;let o=1;for(let s=1;s<r;++s){let r=!1;const a=e[s];if(a!==e[s+1]&&(1!==s||a!==e[0]))if(i)r=!0;else{const e=s*n,i=e-n,o=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[i+s]||n!==t[o+s]){r=!0;break}}}if(r){if(s!==o){e[o]=e[s];const i=s*n,r=o*n;for(let e=0;e!==n;++e)t[r+e]=t[i+e]}++o}}if(r>0){e[o]=e[r];for(let e=r*n,i=o*n,s=0;s!==n;++s)t[i+s]=t[e+s];++o}return o!==e.length?(this.times=oc.arraySlice(e,0,o),this.values=oc.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=oc.arraySlice(this.times,0),t=oc.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}uc.prototype.TimeBufferType=Float32Array,uc.prototype.ValueBufferType=Float32Array,uc.prototype.DefaultInterpolation=pe;class dc extends uc{}dc.prototype.ValueTypeName="bool",dc.prototype.ValueBufferType=Array,dc.prototype.DefaultInterpolation=he,dc.prototype.InterpolantFactoryMethodLinear=void 0,dc.prototype.InterpolantFactoryMethodSmooth=void 0;class hc extends uc{}hc.prototype.ValueTypeName="color";class pc extends uc{}pc.prototype.ValueTypeName="number";class fc extends sc{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=(n-t)/(i-t);let l=e*s;for(let e=l+s;
vendor: 12,253 bytes, line 30
30l!==e;l+=4)ht.slerpFlat(r,0,o,l-s,o,l,a);return r}}class mc extends uc{InterpolantFactoryMethodLinear(e){return new fc(this.times,this.values,this.getValueSize(),e)}}mc.prototype.ValueTypeName="quaternion",mc.prototype.DefaultInterpolation=pe,mc.prototype.InterpolantFactoryMethodSmooth=void 0;class gc extends uc{}gc.prototype.ValueTypeName="string",gc.prototype.ValueBufferType=Array,gc.prototype.DefaultInterpolation=he,gc.prototype.InterpolantFactoryMethodLinear=void 0,gc.prototype.InterpolantFactoryMethodSmooth=void 0;class vc extends uc{}vc.prototype.ValueTypeName="vector";class yc{constructor(e,t=-1,n,i=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=Ie(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let e=0,r=n.length;e!==r;++e)t.push(_c(n[e]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,i=n.length;e!==i;++e)t.push(uc.toJSON(n[e]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,o=[];for(let e=0;e<r;e++){let s=[],a=[];s.push((e+r-1)%r,e,(e+1)%r),a.push(0,1,0);const l=oc.getKeyframeOrder(s);s=oc.sortedArray(s,1,l),a=oc.sortedArray(a,1,l),i||0!==s[0]||(s.push(r),a.push(a[0])),o.push(new pc(".morphTargetInfluences["+t[e].name+"]",s,a).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],o=n.name.match(r);if(o&&o.length>1){const e=o[1];let t=i[e];t||(i[e]=t=[]),t.push(n)}}const o=[];for(const e in i)o.push(this.CreateFromMorphTargetSequence(e,i[e],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,i,r){if(0!==n.length){const o=[],s=[];oc.flattenJSON(n,o,s,i),0!==o.length&&r.push(new e(t,o,s))}},i=[],r=e.name||"default",o=e.fps||30,s=e.blendMode;let a=e.length||-1;const l=e.hierarchy||[];for(let e=0;e<l.length;e++){const r=l[e].keys;if(r&&0!==r.length)if(r[0].morphTargets){const e={};let t;for(t=0;t<r.length;t++)if(r[t].morphTargets)for(let n=0;n<r[t].morphTargets.length;n++)e[r[t].morphTargets[n]]=-1;for(const n in e){const e=[],o=[];for(let i=0;i!==r[t].morphTargets.length;++i){const i=r[t];e.push(i.time),o.push(i.morphTarget===n?1:0)}i.push(new pc(".morphTargetInfluence["+n+"]",e,o))}a=e.length*o}else{const o=".bones["+t[e].name+"]";n(vc,o+".position",r,"pos",i),n(mc,o+".quaternion",r,"rot",i),n(vc,o+".scale",r,"scl",i)}}return 0===i.length?null:new this(r,a,i,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function _c(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return pc;case"vector":case"vector2":case"vector3":case"vector4":return vc;case"color":return hc;case"quaternion":return mc;case"bool":case"boolean":return dc;case"string":return gc}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];oc.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const xc={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class bc{constructor(e,t,n){const i=this;let r,o=!1,s=0,a=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===o&&void 0!==i.onStart&&i.onStart(e,s,a),o=!0},this.itemEnd=function(e){s++,void 0!==i.onProgress&&i.onProgress(e,s,a),s===a&&(o=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return r?r(e):e},this.setURLModifier=function(e){return r=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],i=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}}const wc=new bc;class Tc{constructor(e){this.manager=void 0!==e?e:wc,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Sc={};class Ec extends Tc{constructor(e){super(e)}load(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=xc.get(e);if(void 0!==r)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(void 0!==Sc[e])return void Sc[e].push({onLoad:t,onProgress:n,onError:i});Sc[e]=[],Sc[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,a=this.responseType;fetch(o).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Sc[e],i=t.body.getReader(),r=t.headers.get("Content-Length"),o=r?parseInt(r):0,s=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){i.read().then(({done:i,value:r})=>{if(i)e.close();else{a+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:s,loaded:a,total:o});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(i)}e.enqueue(r),t()}})}()}});return new Response(l)}throw Error(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`)}).then(e=>{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>(new DOMParser).parseFromString(e,s));case"json":return e.json();default:if(void 0===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,i=new TextDecoder(n);return e.arrayBuffer().then(e=>i.decode(e))}}}).then(t=>{xc.add(e,t);const n=Sc[e];delete Sc[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];i.onLoad&&i.onLoad(t)}}).catch(t=>{const n=Sc[e];if(void 0===n)throw this.manager.itemError(e),t;delete Sc[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];i.onError&&i.onError(t)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Mc extends Tc{constructor(e){super(e)}load(e,t,n,i){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=xc.get(e);if(void 0!==o)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const s=je("img");function a(){c(),xc.add(e,this),t&&t(this),r.manager.itemEnd(e)}function l(t){c(),i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)}function c(){s.removeEventListener("load",a,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",a,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),r.manager.itemStart(e),s.src=e,s}}class Ac extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=new Mi,o=new Mc(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let s=0;function a(n){o.load(e[n],function(e){r.images[n]=e,s++,6===s&&(r.needsUpdate=!0,t&&t(r))},void 0,i)}for(let t=0;t<e.length;++t)a(t);return r}}class Rc extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new $s,s=new Ec(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(r.withCredentials),s.load(e,function(e){const n=r.parse(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:S,o.wrapT=void 0!==n.wrapT?n.wrapT:S,o.magFilter=void 0!==n.magFilter?n.magFilter:C,o.minFilter=void 0!==n.minFilter?n.minFilter:C,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=P),1===n.mipmapCount&&(o.minFilter=C),void 0!==n.generateMipmaps&&(o.generateMipmaps=n.generateMipmaps),o.needsUpdate=!0,t&&t(o,n))},n,i),o}}class Cc extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=new rt,o=new Mc(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(e){r.image=e,r.needsUpdate=!0,void 0!==t&&t(r)},n,i),r}}class Lc extends gn{constructor(e,t=1){super(),this.type="Light",this.color=new Ke(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}Lc.prototype.isLight=!0;class Pc extends Lc{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(gn.DefaultUp),this.updateMatrix(),this.groundColor=new Ke(t)}copy(e){return Lc.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Pc.prototype.isHemisphereLight=!0;const Ic=new Wt,kc=new pt,Dc=new pt;class Oc{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new He(512,512),this.map=null,this.mapPass=null,this.matrix=new Wt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Di,this._frameExtents=new He(1,1),this._viewportCount=1,this._viewports=[new ot(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;kc.setFromMatrixPosition(e.matrixWorld),t.position.copy(kc),Dc.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Dc),t.updateMatrixWorld(),Ic.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ic),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radiu
vendor: 22,973 bytes, line 30
30s=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Nc extends Oc{constructor(){super(new Ti(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*Pe*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;n===t.fov&&i===t.aspect&&r===t.far||(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}Nc.prototype.isSpotLightShadow=!0;class Fc extends Lc{constructor(e,t,n=0,i=Math.PI/3,r=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(gn.DefaultUp),this.updateMatrix(),this.target=new gn,this.distance=n,this.angle=i,this.penumbra=r,this.decay=o,this.shadow=new Nc}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}Fc.prototype.isSpotLight=!0;const Uc=new Wt,Bc=new pt,Hc=new pt;class zc extends Oc{constructor(){super(new Ti(90,1,.5,500)),this._frameExtents=new He(4,2),this._viewportCount=6,this._viewports=[new ot(2,1,1,1),new ot(0,1,1,1),new ot(3,1,1,1),new ot(1,1,1,1),new ot(3,0,1,1),new ot(1,0,1,1)],this._cubeDirections=[new pt(1,0,0),new pt(-1,0,0),new pt(0,0,1),new pt(0,0,-1),new pt(0,1,0),new pt(0,-1,0)],this._cubeUps=[new pt(0,1,0),new pt(0,1,0),new pt(0,1,0),new pt(0,1,0),new pt(0,0,1),new pt(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),Bc.setFromMatrixPosition(e.matrixWorld),n.position.copy(Bc),Hc.copy(n.position),Hc.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Hc),n.updateMatrixWorld(),i.makeTranslation(-Bc.x,-Bc.y,-Bc.z),Uc.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Uc)}}zc.prototype.isPointLightShadow=!0;class Gc extends Lc{constructor(e,t,n=0,i=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new zc}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}Gc.prototype.isPointLight=!0;class Vc extends Oc{constructor(){super(new Xi(-5,5,5,-5,.5,500))}}Vc.prototype.isDirectionalLightShadow=!0;class Wc extends Lc{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(gn.DefaultUp),this.updateMatrix(),this.target=new gn,this.shadow=new Vc}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}Wc.prototype.isDirectionalLight=!0;class jc extends Lc{constructor(e,t){super(e,t),this.type="AmbientLight"}}jc.prototype.isAmbientLight=!0;class qc extends Lc{constructor(e,t,n=10,i=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}qc.prototype.isRectAreaLight=!0;class Xc{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new pt)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,i=e.y,r=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*i),t.addScaledVector(o[2],.488603*r),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*i*1.092548),t.addScaledVector(o[5],i*r*1.092548),t.addScaledVector(o[6],.315392*(3*r*r-1)),t.addScaledVector(o[7],n*r*1.092548),t.addScaledVector(o[8],.546274*(n*n-i*i)),t}getIrradianceAt(e,t){const n=e.x,i=e.y,r=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*i),t.addScaledVector(o[2],1.023328*r),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*i),t.addScaledVector(o[5],.858086*i*r),t.addScaledVector(o[6],.743125*r*r-.247708),t.addScaledVector(o[7],.858086*n*r),t.addScaledVector(o[8],.429043*(n*n-i*i)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(e,t+3*i);return this}toArray(e=[],t=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(e,t+3*i);return e}static getBasisAt(e,t){const n=e.x,i=e.y,r=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*r,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*n*r,t[8]=.546274*(n*n-i*i)}}Xc.prototype.isSphericalHarmonics3=!0;class $c extends Lc{constructor(e=new Xc,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}$c.prototype.isLightProbe=!0;class Yc extends Tc{constructor(e){super(e),this.textures={}}load(e,t,n,i){const r=this,o=new Ec(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}},n,i)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const i=Cn.fromType(e.type);if(void 0!==e.uuid&&(i.uuid=e.uuid),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&void 0!==i.color&&i.color.setHex(e.color),void 0!==e.roughness&&(i.roughness=e.roughness),void 0!==e.metalness&&(i.metalness=e.metalness),void 0!==e.sheen&&(i.sheen=e.sheen),void 0!==e.sheenColor&&(i.sheenColor=(new Ke).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(i.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==i.emissive&&i.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==i.specular&&i.specular.setHex(e.specular),void 0!==e.specularIntensity&&(i.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==i.specularColor&&i.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(i.shininess=e.shininess),void 0!==e.clearcoat&&(i.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(i.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.transmission&&(i.transmission=e.transmission),void 0!==e.thickness&&(i.thickness=e.thickness),void 0!==e.attenuationDistance&&(i.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==i.attenuationColor&&i.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(i.fog=e.fog),void 0!==e.flatShading&&(i.flatShading=e.flatShading),void 0!==e.blending&&(i.blending=e.blending),void 0!==e.combine&&(i.combine=e.combine),void 0!==e.side&&(i.side=e.side),void 0!==e.shadowSide&&(i.shadowSide=e.shadowSide),void 0!==e.opacity&&(i.opacity=e.opacity),void 0!==e.transparent&&(i.transparent=e.transparent),void 0!==e.alphaTest&&(i.alphaTest=e.alphaTest),void 0!==e.depthTest&&(i.depthTest=e.depthTest),void 0!==e.depthWrite&&(i.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(i.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(i.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(i.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(i.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(i.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(i.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(i.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(i.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(i.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(i.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(i.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(i.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(i.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(i.rotation=e.rotation),1!==e.linewidth&&(i.linewidth=e.linewidth),void 0!==e.dashSize&&(i.dashSize=e.dashSize),void 0!==e.gapSize&&(i.gapSize=e.gapSize),void 0!==e.scale&&(i.scale=e.scale),void 0!==e.polygonOffset&&(i.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(i.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(i.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(i.dithering=e.dithering),void 0!==e.alphaToCoverage&&(i.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(i.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.toneMapped&&(i.toneMapped=e.toneMapped),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?i.vertexColors=e.vertexColors>0:i.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const r=e.uniforms[t];switch(i.uniforms[t]={},r.type){case"t":i.uniforms[t].value=n(r.value);break;case"c":i.uniforms[t].value=(new Ke).setHex(r.value);break;case"v2":i.uniforms[t].value=(new He).fromArray(r.value);break;case"v3":i.uniforms[t].value=(new pt).fromArray(r.value);break;case"v4":i.uniforms[t].value=(new ot).fromArray(r.value);break;case"m3":i.uniforms[t].value=(new ze).fromArray(r.value);break;case"m4":i.uniforms[t].value=(new Wt).fromArray(r.value);break;default:i.uniforms[t].value=r.value}}if(void 0!==e.defines&&(i.defines=e.defines),void 0!==e.vertexShader&&(i.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(i.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(const t in e.extensions)i.extensions[t]=e.extensions[t];if(void 0!==e.shading&&(i.flatShading=1===e.shading),void 0!==e.size&&(i.size=e.size),void 0!==e.sizeAttenuation&&(i.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(i.map=n(e.map)),void 0!==e.matcap&&(i.matcap=n(e.matcap)),void 0!==e.alphaMap&&(i.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(i.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(i.bumpScale=e.bumpScale),void 0!==e.normalMap&&(i.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(i.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),i.normalScale=(new He).fromArray(t)}return void 0!==e.displacementMap&&(i.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(i.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(i.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(i.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(i.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(i.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(i.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(i.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(i.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(i.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(i.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(i.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(i.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(i.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(i.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(i.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(i.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(i.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(i.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(i.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(i.clearcoatNormalScale=(new He).fromArray(e.clearcoatNormalScale)),void 0!==e.transmissionMap&&(i.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(i.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(i.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(i.sheenRoughnessMap=n(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}}class Jc{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class Zc extends Zn{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}Zc.prototype.isInstancedBufferGeometry=!0;class Kc extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new Ec(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}},n,i)}parse(e){const t={},n={};function i(e,i){if(void 0!==t[i])return t[i];const r=e.interleavedBuffers[i],o=function(e,t){if(void 0!==n[t])return n[t];const i=e.arrayBuffers,r=i[t],o=new Uint32Array(r).buffer;return n[t]=o,o}(e,r.buffer),s=We(r.type,o),a=new _s(s,r.stride);return a.uuid=r.uuid,t[i]=a,a}const r=e.isInstancedBufferGeometry?new Zc:new Zn,o=e.data.index;if(void 0!==o){const e=We(o.type,o.array);r.setIndex(new kn(e,1))}const s=e.data.attributes;for(const t in s){const n=s[t];let o;if(n.isInterleavedBufferAttribute){const t=i(e.data,n.data);o=new bs(t,n.itemSize,n.offset,n.normalized)}else{const e=We(n.type,n.array);o=new(n.isInstancedBufferAttribute?Ks:kn)(e,n.itemSize,n.normalized)}void 0!==n.name&&(o.name=n.name),void 0!==n.usage&&o.setUsage(n.usage),void 0!==n.updateRange&&(o.updateRange.offset=n.updateRange.offset,o.updateRange.count=n.updateRange.count),r.setAttribute(t,o)}const a=e.data.morphAttributes;if(a)for(const t in a){const n=a[t],o=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];let s;if(r.isInterleavedBufferAttribute){const t=i(e.data,r.data);s=new bs(t,r.itemSize,r.offset,r.normalized)}else{const e=We(r.type,r.array);s=new kn(e,r.itemSize,r.normalized)}void 0!==r.name&&(s.name=r.name),o.push(s)}r.morphAttributes[t]=o}e.data.morphTargetsRelative&&(r.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){const t=l[e];r.addGroup(t.start,t.count,t.materialIndex)}const c=e.data.boundingSphere;if(void 0!==c){const e=new pt;void 0!==c.center&&e.fromArray(c.center),r.boundingSphere=new Ot(e,c.radius)}return e.name&&(r.name=e.name),e.userData&&(r.userData=e.userData),r}}const Qc={UVMapping:g,CubeReflectionMapping:v,CubeRefractionMapping:y,EquirectangularReflectionMapping:_,EquirectangularRefractionMapping:x,CubeUVReflectionMapping:b,CubeUVRefractionMapping:w},eu={RepeatWrapping:T,ClampToEdgeWrapping:S,MirroredRepeatWrapping:E},tu={NearestFilter:M,NearestMipmapNearestFilter:A,NearestMipmapLinearFilter:R,LinearFilter:C,LinearMipmapNearestFilter:L,LinearMipmapLinearFilter:P};class nu extends Tc{constructor(e){super(e),"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=xc.get(e);if(void 0!==o)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(n){xc.add(e,n),t&&t(n),r.manager.itemEnd(e)}).catch(function(t){i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}let iu;nu.prototype.isImageBitmapLoader=!0;const ru={getContext:function(){return void 0===iu&&(iu=new(window.AudioContext||window.webkitAudioContext)),iu},setContext:function(e){iu=e}};class ou extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new Ec(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(n){try{const e=n.slice(0);ru.getContext().decodeAudioData(e,function(e){t(e)})}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}},n,i)}}class su extends $c{constructor(e,t,n=1){super(void 0,n);const i=(new Ke).set(e),r=(new Ke).set(t),o=new pt(i.r,i.g,i.b),s=new pt(r.r,r.g,r.b),a=Math.sqrt(Math.PI),l=a*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(s).multiplyScalar(a),this.sh.coefficients[1].copy(o).sub(s).multiplyScalar(l)}}su.prototype.isHemisphereLightProbe=!0;class au extends $c{constructor(e,t=1){super(void 0,t);const n=(new Ke).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}au.prototype.isAmbientLightProbe=!0;const lu=new Wt,cu=new Wt,uu=new Wt;class du{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=hu(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=hu();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function hu(){return("undefined"==typeof performance?Date:performance).now()}const pu=new pt,fu=new ht,mu=new pt,gu=new pt;class vu extends gn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const yu=new pt,_u=new ht,xu=new pt,bu=new pt;
vendor: 5,508 bytes, line 30
30class wu{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class Tu{constructor(e,t,n){let i,r,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":i=this._slerp,r=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:i=this._lerp,r=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,i=this.valueSize,r=e*i+i;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==i;++e)n[r+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,r,0,e,i)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,i=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,i=e*t+t,r=this.cumulativeWeight,o=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const e=t*this._origIndex;this._mixBufferRegion(n,i,e,1-r,t)}o>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(n[e]!==n[e+t]){s.setValue(n,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let e=n,r=i;e!==r;++e)t[e]=t[i+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)e[t+i]=e[n+i]}_slerp(e,t,n,i){ht.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){const o=this._workIndex*r;ht.multiplyQuaternionsFlat(e,o,e,t,e,n),ht.slerpFlat(e,t,e,t,e,o,i)}_lerp(e,t,n,i,r){const o=1-i;for(let s=0;s!==r;++s){const r=t+s;e[r]=e[r]*o+e[n+s]*i}}_lerpAdditive(e,t,n,i,r){for(let o=0;o!==r;++o){const r=t+o;e[r]=e[r]+e[n+o]*i}}}const Su="\\[\\]\\.:\\/",Eu=new RegExp("["+Su+"]","g"),Mu="[^"+Su+"]",Au="[^"+Su.replace("\\.","")+"]",Ru=/((?:WC+[\/:])*)/.source.replace("WC",Mu),Cu=/(WCOD+)?/.source.replace("WCOD",Au),Lu=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Mu),Pu=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Mu),Iu=new RegExp("^"+Ru+Cu+Lu+Pu+"$"),ku=["material","materials","bones"];class Du{constructor(e,t,n){this.path=t,this.parsedPath=n||Du.parseTrackName(t),this.node=Du.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Du.Composite(e,t,n):new Du(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Eu,"")}static parseTrackName(e){const t=Iu.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const e=n.nodeName.substring(i+1);-1!==ku.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let i=0;i<e.length;i++){const r=e[i];if(r.name===t||r.uuid===t)return r;const o=n(r.children);if(o)return o}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}
vendor: 27,214 bytes, line 30
30_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,i=t.propertyName;let r=t.propertyIndex;if(e||(e=Du.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let i=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===i){i=t;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==i){if(void 0===e[i])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[i]}}const o=e[i];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+i+" but it wasn't found.",e)}let s=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?s=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[r]&&(r=e.morphTargetDictionary[r])}a=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=r}else void 0!==o.fromArray&&void 0!==o.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(a=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Du.Composite=class{constructor(e,t,n){const i=n||Du.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Du.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Du.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Du.prototype.GetterByBindingType=[Du.prototype._getValue_direct,Du.prototype._getValue_array,Du.prototype._getValue_arrayElement,Du.prototype._getValue_toArray],Du.prototype.SetterByBindingTypeAndVersioning=[[Du.prototype._setValue_direct,Du.prototype._setValue_direct_setNeedsUpdate,Du.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Du.prototype._setValue_array,Du.prototype._setValue_array_setNeedsUpdate,Du.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Du.prototype._setValue_arrayElement,Du.prototype._setValue_arrayElement_setNeedsUpdate,Du.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Du.prototype._setValue_fromArray,Du.prototype._setValue_fromArray_setNeedsUpdate,Du.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class Ou{constructor(){this.uuid=Ie(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,i=this._parsedPaths,r=this._bindings,o=r.length;let s,a=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],d=u.uuid;let h=t[d];if(void 0===h){h=a++,t[d]=h,e.push(u);for(let e=0,t=o;e!==t;++e)r[e].push(new Du(u,n[e],i[e]))}else if(h<l){s=e[h];const a=--l,c=e[a];t[c.uuid]=h,e[h]=c,t[d]=a,e[a]=u;for(let e=0,t=o;e!==t;++e){const t=r[e],o=t[a];let s=t[h];t[h]=o,void 0===s&&(s=new Du(u,n[e],i[e])),t[a]=s}}else e[h]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o],a=s.uuid,l=t[a];if(void 0!==l&&l>=r){const o=r++,c=e[o];t[c.uuid]=l,e[l]=c,t[a]=o,e[o]=s;for(let e=0,t=i;e!==t;++e){const t=n[e],i=t[o],r=t[l];t[l]=i,t[o]=r}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,o=e.length;for(let s=0,a=arguments.length;s!==a;++s){const a=arguments[s].uuid,l=t[a];if(void 0!==l)if(delete t[a],l<r){const s=--r,a=e[s],c=--o,u=e[c];t[a.uuid]=l,e[l]=a,t[u.uuid]=s,e[s]=u,e.pop();for(let e=0,t=i;e!==t;++e){const t=n[e],i=t[s],r=t[c];t[l]=i,t[s]=r,t.pop()}}else{const r=--o,s=e[r];r>0&&(t[s.uuid]=l),e[l]=s,e.pop();for(let e=0,t=i;e!==t;++e){const t=n[e];t[l]=t[r],t.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const n=this._bindingsIndicesByPath;let i=n[e];const r=this._bindings;if(void 0!==i)return r[i];const o=this._paths,s=this._parsedPaths,a=this._objects,l=a.length,c=this.nCachedObjects_,u=new Array(l);i=r.length,n[e]=i,o.push(e),s.push(t),r.push(u);for(let n=c,i=a.length;n!==i;++n){const i=a[n];u[n]=new Du(i,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const i=this._paths,r=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];t[e[s]]=n,o[n]=a,o.pop(),r[n]=r[s],r.pop(),i[n]=i[s],i.pop()}}}Ou.prototype.isAnimationObjectGroup=!0;class Nu{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;const r=t.tracks,o=r.length,s=new Array(o),a={endingStart:me,endingEnd:me};for(let e=0;e!==o;++e){const t=r[e].createInterpolant(null);s[e]=t,t.settings=a}this._interpolantSettings=a,this._interpolants=s,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,i=e._clip.duration,r=i/n,o=n/i;e.warp(1,r,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const i=this._mixer,r=i.time,o=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=r,a[1]=r+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled)return void this._updateWeight(e);const r=this._startTime;if(null!==r){const i=(e-r)*n;if(i<0||0===n)return;this._startTime=null,t=n*i}t*=this._updateTimeScale(e);const o=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===_e)for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulateAdditive(s);else for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulate(i,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let i=this.time+e,r=this._loopCount;const o=2202===n;if(0===e)return-1===r||!o||1&~r?i:t-i;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else{if(!(i<0)){this.time=i;break e}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),i>=t||i<0){const n=Math.floor(i/t);i-=t*n,r+=Math.abs(n);const s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(o&&!(1&~r))return t-i}return i}_setEndings(e,t,n){const i=this._interpolantSettings;n?(i.endingStart=ge,i.endingEnd=ge):(i.endingStart=e?this.zeroSlopeAtStart?ge:me:ve,i.endingEnd=t?this.zeroSlopeAtEnd?ge:me:ve)}_scheduleFading(e,t,n){const i=this._mixer,r=i.time;let o=this._weightInterpolant;null===o&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const s=o.parameterPositions,a=o.sampleValues;return s[0]=r,a[0]=t,s[1]=r+e,a[1]=n,this}}class Fu extends Ae{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,o=e._propertyBindings,s=e._interpolants,a=n.uuid,l=this._bindingsByRootAndName;let c=l[a];void 0===c&&(c={},l[a]=c);for(let e=0;e!==r;++e){const r=i[e],l=r.name;let u=c[l];if(void 0!==u)++u.referenceCount,o[e]=u;else{if(u=o[e],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,a,l));continue}const i=t&&t._propertyBindings[e].binding.parsedPath;u=new Tu(Du.create(n,l,i),r.ValueTypeName,r.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,a,l),o[e]=u}s[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,i=this._actionsByClip[n];this._bindAction(e,i&&i.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const i=this._actions,r=this._actionsByClip;let o=r[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=i.length,i.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;const r=e._clip.uuid,o=this._actionsByClip,s=o[r],a=s.knownActions,l=a[a.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,a[c]=l,a.pop(),e._byClipCacheIndex=null,delete s.actionByRoot[(e._localRoot||this._root).uuid],0===a.length&&delete o[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_addInactiveBinding(e,t,n){const i=this._bindingsByRootAndName,r=this._bindings;let o=i[t];void 0===o&&(o={},i[t]=o),o[n]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,o=this._bindingsByRootAndName,s=o[i],a=t[t.length-1],l=e._cacheIndex;a._cacheIndex=l,t[l]=a,t.pop(),delete s[r],0===Object.keys(s).length&&delete o[i]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new lc(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r}clipAction(e,t,n){const i=t||this._root,r=i.uuid;let o="string"==typeof e?yc.findByName(i,e):e;const s=null!==o?o.uuid:e,a=this._actionsByClip[s];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:ye),void 0!==a){const e=a.actionByRoot[r];if(void 0!==e&&e.blendMode===n)return e;l=a.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new Nu(this,o,t,n);return this._bindAction(c,l),this._addInactiveAction(c,s,r),c}existingAction(e,t){const n=t||this._root,i=n.uuid,r="string"==typeof e?yc.findByName(n,e):e,o=r?r.uuid:e,s=this._actionsByClip[o];return void 0!==s&&s.actionByRoot[i]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let s=0;s!==n;++s)t[s]._update(i,e,r,o);const s=this._bindings,a=this._nActiveBindings;for(let e=0;e!==a;++e)s[e].apply(o);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){const e=r.knownActions;for(let n=0,i=e.length;n!==i;++n){const i=e[n];this._deactivateAction(i);const r=i._cacheIndex,o=t[t.length-1];i._cacheIndex=null,i._byClipCacheIndex=null,o._cacheIndex=r,t[r]=o,t.pop(),this._removeInactiveBindingsForAction(i)}delete i[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const i=n[e].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}const i=this._bindingsByRootAndName[t];if(void 0!==i)for(const e in i){const t=i[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}Fu.prototype._controlInterpolantsResultBuffer=new Float32Array(1);class Uu{constructor(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new Uu(void 0===this.value.clone?this.value:this.value.clone())}}class Bu extends _s{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}Bu.prototype.isInstancedInterleavedBuffer=!0;class Hu{constructor(e,t,n,i,r){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=i,this.count=r,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}function zu(e,t){return e.distance-t.distance}function Gu(e,t,n,i){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===i){const i=e.children;for(let e=0,r=i.length;e<r;e++)Gu(i[e],t,n,!0)}}Hu.prototype.isGLBufferAttribute=!0;const Vu=new He;class Wu{constructor(e=new He(1/0,1/0),t=new He(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Vu.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Vu.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}Wu.prototype.isBox2=!0;const ju=new pt,qu=new pt;class Xu{constructor(e=new pt,t=new pt){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){ju.subVectors(e,this.start),qu.subVectors(this.end,this.start);const n=qu.dot(qu);let i=qu.dot(ju)/n;return t&&(i=ke(i,0,1)),i}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const $u=new pt,Yu=new pt,Ju=new Wt,Zu=new Wt;class Ku extends pa{constructor(e){const t=Qu(e),n=new Zn,i=[],r=[],o=new Ke(0,0,1),s=new Ke(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(o.r,o.g,o.b),r.push(s.r,s.g,s.b))}n.setAttribute("position",new Gn(i,3)),n.setAttribute("color",new Gn(r,3)),super(n,new ra({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,i=n.getAttribute("position");Zu.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const r=t[e];r.parent&&r.parent.isBone&&(Ju.multiplyMatrices(Zu,r.matrixWorld),Yu.setFromMatrixPosition(Ju),i.setXYZ(n,Yu.x,Yu.y,Yu.z),Ju.multiplyMatrices(Zu,r.parent.matrixWorld),Yu.setFromMatrixPosition(Ju),i.setXYZ(n+1,Yu.x,Yu.y,Yu.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}function Qu(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,Qu(e.children[n]));return t}const ed=new pt,td=new Ke,nd=new Ke;class id extends pa{constructor(e=10,t=10,n=4473924,i=8947848){n=new Ke(n),i=new Ke(i);const r=t/2,o=e/t,s=e/2,a=[],l=[];for(let e=0,c=0,u=-s;e<=t;e++,u+=o){a.push(-s,0,u,s,0,u),a.push(u,0,-s,u,0,s);const t=e===r?n:i;t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3}const c=new Zn;c.setAttribute("position",new Gn(a,3)),c.setAttribute("color",new Gn(l,3)),super(c,new ra({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}const rd=new pt,od=new pt,sd=new pt,ad=new pt,ld=new wi;function cd(e,t,n,i,r,o,s){ad.set(r,o,s).unproject(i);const a=t[e];if(void 0!==a){const e=n.getAttribute("position");for(let t=0,n=a.length;t<n;t++)e.setXYZ(a[t],ad.x,ad.y,ad.z)}}const ud=new gt;class dd extends pa{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),r=new Zn;r.setIndex(new kn(n,1)),r.setAttribute("position",new kn(i,3)),super(r,new ra({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&ud.setFromObject(this.object),ud.isEmpty())return;const t=ud.min,n=ud.max,i=this.geometry.attributes.position,r=i.array;r[0]=n.x,r[1]=n.y,r[2]=n.z,r[3]=t.x,r[4]=n.y,r[5]=n.z,r[6]=t.x,r[7]=t.y,r[8]=n.z,r[9]=n.x,r[10]=t.y,r[11]=n.z,r[12]=n.x,r[13]=n.y,r[14]=t.z,r[15]=t.x,r[16]=n.y,r[17]=t.z,r[18]=t.x,r[19]=t.y,r[20]=t.z,r[21]=n.x,r[22]=t.y,r[23]=t.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e){return pa.prototype.copy.call(this,e),this.object=e.object,this}}const hd=new pt;let pd,fd;class md extends pa{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new Zn;n.setAttribute("position",new Gn(t,3)),n.setAttribute("color",new Gn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new ra({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const i=new Ke,r=this.geometry.attributes.color.array;return i.set(e),i.toArray(r,0),i.toArray(r,3),i.set(t),i.toArray(r,6),i.toArray(r,9),i.set(n),i.toArray(r,12),i.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}const gd=new Float32Array(1),vd=new Int32Array(gd.buffer);Na.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Na.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},il.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},id.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ku.prototype.update=function(){console.error("THREE.SkeletonHelper: update(
30) no longer needs to be called.")},Tc.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Jc.extractUrlBase(e)},Tc.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Wu.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},Wu.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Wu.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Wu.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},gt.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},gt.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},gt.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},gt.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},gt.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},en.prototype.toVector3=function(){console.error("THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead")},Ot.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Di.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Xu.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},ze.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},ze.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3(
30) has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},ze.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},ze.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},ze.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},ze.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Wt.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},Wt.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},Wt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new pt).setFromMatrixColumn(this,3)},Wt.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},Wt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},Wt.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3(
30) has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Wt.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Wt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},Wt.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},Wt.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Wt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},Wt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},Wt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},Wt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},Wt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},Wt.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Wt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},Wt.prototype.makeFrustum=function(e,t,n,i,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,i,n,r,o)},Wt.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Pi.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},ht.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3(
30) has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},ht.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Vt.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Vt.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},Vt.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},An.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},An.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},An.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},An.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},An.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},An.barycoordFromPoint=function(e,t,n,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),An.getBarycoord(e,t,n,i,r)},An.normal=function(e,t,n,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),An.getNormal(e,t,n,i)},rl.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},rl.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new kl(this,e)},rl.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Bl(this,e)},He.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},He.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},He.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},pt.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},pt.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},pt.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},pt.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},pt.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},pt.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},pt.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},pt.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},pt.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},ot.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},ot.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},gn.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},gn.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},gn.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},gn.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}
vendor: 11,159 bytes, line 30
30,gn.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(gn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),mi.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(mi.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),qs.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Ti.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Lc.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(kn.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Se},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Se)}}}),kn.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Se:Te),this},kn.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},kn.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Zn.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},Zn.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new kn(arguments[1],arguments[2])))},Zn.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},Zn.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Zn.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Zn.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},Zn.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Zn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),_s.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Se:Te),this},_s.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},kl.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},kl.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},kl.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},ys.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Uu.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Cn.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ke}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(bi.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),fs.prototype.clearTarget=function(e,t,n,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,i)},fs.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},fs.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},fs.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},fs.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},fs.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},fs.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},fs.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},fs.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},fs.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},fs.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},fs.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},fs.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},fs.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_
30instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},fs.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},fs.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},fs.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},fs.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},fs.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},fs.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},fs.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},fs.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},fs.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},fs.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},fs.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(fs.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?be:xe}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}}),Object.defineProperties(is.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(st.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy
30is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),vu.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new ou).load(e,function(e){t.setBuffer(e)}),this},wu.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ei.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update(
30)."),this.update(e,t)},Ei.prototype.clear=function(e,t,n,i){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,i)},et.crossOrigin=void 0,et.loadTexture=function(e,t,n,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const r=new Cc;r.setCrossOrigin(this.crossOrigin);const o=r.load(e,n,void 0,i);return t&&(o.mapping=t),o},et.loadTextureCube=function(e,t,n,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const r=new Ac;r.setCrossOrigin(this.crossOrigin);const o=r.load(e,n,void 0,i);return t&&(o.mapping=t),o},et.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},et.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const yd={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:t}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=t),e.ACESFilmicToneMapping=4,e.AddEquation=n,e.AddOperation=2,e.AdditiveAnimationBlendMode=_e,e.AdditiveBlending=2,e.AlphaFormat=1021,e.AlwaysDepth=1,e.AlwaysStencilFunc=519,e.AmbientLight=jc,e.AmbientLightProbe=au,e.AnimationClip=yc,e.AnimationLoader=class extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new Ec(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}},n,i)}parse(e){const t=[];for(let n=0;n<e.length;n++){const i=yc.parse(e[n]);t.push(i)}return t}},e.AnimationMixer=Fu,e.AnimationObjectGroup=Ou,e.AnimationUtils=oc,e.ArcCurve=Ua,e.ArrayCamera=as,e.ArrowHelper=class extends gn{constructor(e=new pt(0,0,1),t=new pt(0,0,0),n=1,i=16776960,r=.2*n,o=.2*r){super(),this.type="ArrowHelper",void 0===pd&&(pd=new Zn,pd.setAttribute("position",new Gn([0,0,0,0,1,0],3)),fd=new Aa(0,.5,1,5,1),fd.translate(0,-.5,0)),this.position.copy(t),this.line=new ua(pd,new ra({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mi(fd,new Ln({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,r,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{hd.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(hd,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}},e.Audio=vu,e.AudioAnalyser=wu,e.AudioContext=ru,e.AudioListener=class extends gn{constructor(){super(),this.type="AudioListener",this.context=ru.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new du}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(pu,fu,mu),gu.set(0,0,-1).applyQuaternion(fu),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(pu.x,e),t.positionY.linearRampToValueAtTime(pu.y,e),t.positionZ.linearRampToValueAtTime(pu.z,e),t.forwardX.linearRampToValueAtTime(gu.x,e),t.forwardY.linearRampToValueAtTime(gu.y,e),t.forwardZ.linearRampToValueAtTime(gu.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(pu.x,pu.y,pu.z),t.setOrientation(gu.x,gu.y,gu.z,n.x,n.y,n.z)}},e.AudioLoader=ou,e.AxesHelper=md,e.AxisHelper=function(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new md(e)},e.BackSide=1,e.BasicDepthPacking=3200,e.BasicShadowMap=0,e.BinaryTextureLoader=function(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Rc(e)},e.Bone=Xs,e.BooleanKeyframeTrack=dc,e.BoundingBoxHelper=function(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new dd(e,t)},e.Box2=Wu,e.Box3=gt,e.Box3Helper=class extends pa{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Zn;i.setIndex(new kn(n,1)),i.setAttribute("position",new Gn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(i,new ra({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}},e.BoxBufferGeometry=vi,e.BoxGeometry=vi,e.BoxHelper=dd,e.BufferAttribute=kn,e.BufferGeometry=Zn,e.BufferGeometryLoader=Kc,e.ByteType=1010,e.Cache=xc,e.Camera=wi,e.CameraHelper=class extends pa{constructor(e){const t=new Zn,n=new ra({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],r=[],o={},s=new Ke(16755200),a=new Ke(16711680),l=new Ke(43775),c=new Ke(16777215),u=new Ke(3355443);function d(e,t,n){h(e,n),h(t,n)}function h(e,t){i.push(0,0,0),r.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(i.length/3-1)}d("n1","n2",s),d("n2","n4",s),d("n4","n3",s),d("n3","n1",s),d("f1","f2",s),d("f2","f4",s),d("f4","f3",s),d("f3","f1",s),d("n1","f1",s),d("n2","f2",s),d("n3","f3",s),d("n4","f4",s),d("p","n1",a),d("p","n2",a),d("p","n3",a),d("p","n4",a),d("u1","u2",l),d("u2","u3",l),d("u3","u1",l),d("c","t",c),d("p","c",u),d("cn1","cn2",u),d("cn3","cn4",u),d("cf1","cf2",u),d("cf3","cf4",u),t.setAttribute("position",new Gn(i,3)),t.setAttribute("color",new Gn(r,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){const e=this.geometry,t=this.pointMap;ld.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),cd("c",t,e,ld,0,0,-1),cd("t",t,e,ld,0,0,1),cd("n1",t,e,ld,-1,-1,-1),cd("n2",t,e,ld,1,-1,-1),cd("n3",t,e,ld,-1,1,-1),cd("n4",t,e,ld,1,1,-1),cd("f1",t,e,ld,-1,-1,1),cd("f2",t,e,ld,1,-1,1),cd("f3",t,e,ld,-1,1,1),cd("f4",t,e,ld,1,1,1),cd("u1",t,e,ld,.7,1.1,-1),cd("u2",t,e,ld,-.7,1.1,-1),cd("u3",t,e,ld,0,2,-1),cd("cf1",t,e,ld,-1,0,1),cd("cf2",t,e,ld,1,0,1),cd("cf3",t,e,ld,0,-1,1),cd("cf4",t,e,ld,0,1,1),cd("cn1",t,e,ld,-1,0,-1),cd("cn2",t,e,ld,1,0,-1),cd("cn3",t,e,ld,0,-1,-1),cd("cn4",t,e,ld,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},e.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},e.CanvasTexture=Ea,e.CatmullRomCurve3=Wa,e.CineonToneMapping=3,e.CircleBufferGeometry=Ma,e.CircleGeometry=Ma,e.ClampToEdgeWrapping=S,e.Clock=du,e.Color=Ke,e.ColorKeyframeTrack=hc,e.CompressedTexture=Sa,e.CompressedTextureLoader=class extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=this,o=[],s=new Sa,a=new Ec(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(r.withCredentials);let l=0;function c(c){a.load(e[c],function(e){const n=r.parse(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(s.minFilter=C),s.image=o,s.format=n.format,s.needsUpdate=!0,t&&t(s))},n,i)}if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)c(t);else a.load(e,function(e){const n=r.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){o[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)o[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),o[t].format=n.format,o[t].width=n.width,o[t].height=n.height}s.image=o}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=C),s.format=n.format,s.needsUpdate=!0,t&&t(s)},n,i);return s}},e.ConeBufferGeometry=Ra,e.ConeGeometry=Ra,e.CubeCamera=Ei,e.CubeReflectionMapping=v,e.CubeRefractionMapping=y,e.CubeTexture=Mi,e.CubeTextureLoader=Ac,e.CubeUVReflectionMapping=b,e.CubeUVRefractionMapping=w,e.CubicBezierCurve=$a,e.CubicBezierCurve3=Ya,e.CubicInterpolant=ac,e.CullFaceBack=1,e.CullFaceFront=2,e.CullFaceFrontBack=3,e.CullFaceNone=0,e.Curve=Na,e.CurvePath=nl,e.CustomBlending=5,e.CustomToneMapping=5,e.CylinderBufferGeometry=Aa,e.CylinderGeometry=Aa,e.Cylindrical=class{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}},e.Data3DTexture=ct,e.DataArrayTexture=at,e.DataTexture=$s,e.DataTexture2DArray=function(e,t,n,i){return console.warn("THREE.DataTexture2DArray has been renamed to DataArrayTexture."),new at(e,t,n,i)},e.DataTexture3D=function(e,t,n,i){return console.warn("THREE.DataTexture3D has been renamed to Data3DTexture."),new ct(e,t,n,i)},e.DataTextureLoader=Rc,e.DataUtils=class{static toHalfFloat(e){e>65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),e=65504),gd[0]=e;const t=vd[0];let n=t>>16&32768,i=t>>12&2047;const r=t>>23&255;return r<103?n:r>142?(n|=31744,n|=(255==r?0:1)&&8388607&t,n):r<113?(i|=2048,n|=(i>>114-r)+(i>>113-r&1),n):(n|=r-112<<10|i>>1,n+=1&i,n)}},e.DecrementStencilOp=7683,e.DecrementWrapStencilOp=34056,e.DefaultLoadingManager=wc,e.DepthFormat=B,e.DepthStencilFormat=H,e.DepthTexture=ds,e.DirectionalLight=Wc,e.DirectionalLightHelper=class extends gn{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1);let i=new Zn;i.setAttribute("position",new Gn([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const r=new ra({fog:!1,toneMapped:!1});this.lightPlane=new ua(i,r),this.add(this.lightPlane),i=new Zn,i.setAttribute("position",new Gn([0,0,0,0,0,1],3)),this.targetLine=new ua(i,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){rd.setFromMatrixPosition(this.light.matrixWorld),od.setFromMatrixPosition(this.light.target.matrixWorld),sd.subVectors(od,rd),this.lightPlane.lookAt(od),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(od),this.targetLine.scale.z
vendor: 4,882 bytes, line 30
30=sd.length()}},e.DiscreteInterpolant=cc,e.DodecahedronBufferGeometry=La,e.DodecahedronGeometry=La,e.DoubleSide=2,e.DstAlphaFactor=206,e.DstColorFactor=208,e.DynamicBufferAttribute=function(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new kn(e,t).setUsage(Se)},e.DynamicCopyUsage=35050,e.DynamicDrawUsage=Se,e.DynamicReadUsage=35049,e.EdgesGeometry=Oa,e.EdgesHelper=function(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new pa(new Oa(e.geometry),new ra({color:void 0!==t?t:16777215}))},e.EllipseCurve=Fa,e.EqualDepth=4,e.EqualStencilFunc=514,e.EquirectangularReflectionMapping=_,e.EquirectangularRefractionMapping=x,e.Euler=en,e.EventDispatcher=Ae,e.ExtrudeBufferGeometry=kl,e.ExtrudeGeometry=kl,e.FaceColors=1,e.FileLoader=Ec,e.FlatShading=1,e.Float16BufferAttribute=zn,e.Float32Attribute=function(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Gn(e,t)},e.Float32BufferAttribute=Gn,e.Float64Attribute=function(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Vn(e,t)},e.Float64BufferAttribute=Vn,e.FloatType=O,e.Fog=vs,e.FogExp2=gs,e.Font=function(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")},e.FontLoader=function(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")},e.FramebufferTexture=Ta,e.FrontSide=0,e.Frustum=Di,e.GLBufferAttribute=Hu,e.GLSL1="100",e.GLSL3=Ee,e.GreaterDepth=6,e.GreaterEqualDepth=5,e.GreaterEqualStencilFunc=518,e.GreaterStencilFunc=516,e.GridHelper=id,e.Group=ls,e.HalfFloatType=N,e.HemisphereLight=Pc,e.HemisphereLightHelper=class extends gn{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const i=new Fl(t);i.rotateY(.5*Math.PI),this.material=new Ln({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const r=i.getAttribute("position"),o=new Float32Array(3*r.count);i.setAttribute("color",new kn(o,3)),this.add(new mi(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");td.copy(this.light.color),nd.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const i=e<n/2?td:nd;t.setXYZ(e,i.r,i.g,i.b)}t.needsUpdate=!0}e.lookAt(ed.setFromMatrixPosition(this.light.matrixWorld).negate())}},e.HemisphereLightProbe=su,e.IcosahedronBufferGeometry=Ol,e.IcosahedronGeometry=Ol,e.ImageBitmapLoader=nu,e.ImageLoader=Mc,e.ImageUtils=et,e.ImmediateRenderObject=function(){console.error("THREE.ImmediateRenderObject has been removed.")},e.IncrementStencilOp=7682,e.IncrementWrapStencilOp=34055,e.InstancedBufferAttribute=Ks,e.InstancedBufferGeometry=Zc,e.InstancedInterleavedBuffer=Bu,e.InstancedMesh=ia,e.Int16Attribute=function(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Fn(e,t)},e.Int16BufferAttribute=Fn,e.Int32Attribute=function(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Bn(e,t)},e.Int32BufferAttribute=Bn,e.Int8Attribute=function(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Dn(e,t)},e.Int8BufferAttribute=Dn,e.IntType=1013,e.InterleavedBuffer=_s,e.InterleavedBufferAttribute=bs,e.Interpolant=sc,e.InterpolateDiscrete=he,e.InterpolateLinear=pe,e.InterpolateSmooth=fe,e.InvertStencilOp=5386,e.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")},e.KeepStencilOp=we,e.KeyframeTrack=uc,e.LOD=Hs,e.LatheBufferGeometry=Nl,e.LatheGeometry=Nl,e.Layers=tn,e.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")},e.LessDepth=2,e.LessEqualDepth=3,e.LessEqualStencilFunc=515,e.LessStencilFunc=513,e.Light=Lc,e.LightProbe=$c,e.Line=ua,e.Line3=Xu,e.LineBasicMaterial=ra,e.LineCurve=Ja,e.LineCurve3=Za,e.LineDashedMaterial=ic,e.LineLoop=fa,e.LinePieces=1,e.LineSegments=pa,e.LineStrip=0,e.LinearEncoding=xe,e.LinearFilter=C,e.LinearInterpolant=lc,e.LinearMipMapLinearFilter=1008,e.LinearMipMapNearestFilter=1007,e.LinearMipmapLinearFilter=P,e.LinearMipmapNearestFilter=L,e.LinearToneMapping=1,e.Loader=Tc,e.LoaderUtils=Jc,e.LoadingManager=bc,e.LoopOnce=2200,e.LoopPingPong=2202,e.LoopRepeat=2201,e.LuminanceAlphaFormat=1025,e.LuminanceFormat=1024,e.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},e.Material=Cn,e.MaterialLoader=Yc,e.Math=Be,e.MathUtils=Be,e.Matr
vendor: 7,471 bytes, line 30
30ix3=ze,e.Matrix4=Wt,e.MaxEquation=104,e.Mesh=mi,e.MeshBasicMaterial=Ln,e.MeshDepthMaterial=ts,e.MeshDistanceMaterial=ns,e.MeshFaceMaterial=function(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e},e.MeshLambertMaterial=tc,e.MeshMatcapMaterial=nc,e.MeshNormalMaterial=ec,e.MeshPhongMaterial=Kl,e.MeshPhysicalMaterial=Zl,e.MeshStandardMaterial=Jl,e.MeshToonMaterial=Ql,e.MinEquation=103,e.MirroredRepeatWrapping=E,e.MixOperation=1,e.MultiMaterial=function(e=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e},e.MultiplyBlending=4,e.MultiplyOperation=0,e.NearestFilter=M,e.NearestMipMapLinearFilter=1005,e.NearestMipMapNearestFilter=1004,e.NearestMipmapLinearFilter=R,e.NearestMipmapNearestFilter=A,e.NeverDepth=0,e.NeverStencilFunc=512,e.NoBlending=0,e.NoColors=0,e.NoToneMapping=0,e.NormalAnimationBlendMode=ye,e.NormalBlending=1,e.NotEqualDepth=7,e.NotEqualStencilFunc=517,e.NumberKeyframeTrack=pc,e.Object3D=gn,e.ObjectLoader=class extends Tc{constructor(e){super(e)}load(e,t,n,i){const r=this,o=""===this.path?Jc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const s=new Ec(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(n){let o=null;try{o=JSON.parse(n)}catch(t){return void 0!==i&&i(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}const s=o.metadata;void 0!==s&&void 0!==s.type&&"geometry"!==s.type.toLowerCase()?r.parse(o,t):console.error("THREE.ObjectLoader: Can't load "+e)},n,i)}async loadAsync(e,t){const n=""===this.path?Jc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const i=new Ec(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);const r=await i.loadAsync(e,t),o=JSON.parse(r),s=o.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(o)}parse(e,t){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),o=this.parseImages(e.images,function(){void 0!==t&&t(l)}),s=this.parseTextures(e.textures,o),a=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,r,a,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){let e=!1;for(const t in o)if(o[t]instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),r=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,r),s=this.parseMaterials(e.materials,o),a=this.parseObject(e.object,i,s,o,t),l=this.parseSkeletons(e.skeletons,a);return this.bindSkeletons(a,l),a}parseShapes(e){const t={};if(void 0!==e)for(let n=0,i=e.length;n<i;n++){const i=(new rl).fromJSON(e[n]);t[i.uuid]=i}return t}parseSkeletons(e,t){const n={},i={};if(t.traverse(function(e){e.isBone&&(i[e.uuid]=e)}),void 0!==e)for(let t=0,r=e.length;t<r;t++){const r=(new Zs).fromJSON(e[t],i);n[r.uuid]=r}return n}parseGeometries(e,t){const n={};if(void 0!==e){const i=new Kc;for(let r=0,o=e.length;r<o;r++){let o;const s=e[r];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":o=i.parse(s);break;case"Geometry":console.error("THREE.ObjectLoader: The legacy Geometry type is no longer supported.");break;default:s.type in Xl?o=Xl[s.type].fromJSON(s,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${s.type}"`)}o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),!0===o.isBufferGeometry&&void 0!==s.userData&&(o.userData=s.userData),n[s.uuid]=o}}return n}parseMaterials(e,t){const n={},i={};if(void 0!==e){const r=new Yc;r.setTextures(t);for(let t=0,o=e.length;t<o;t++){const o=e[t];if("MultiMaterial"===o.type){const e=[];for(let t=0;t<o.materials.length;t++){const i=o.materials[t];void 0===n[i.uuid]&&(n[i.uuid]=r.parse(i)),e.push(n[i.uuid])}i[o.uuid]=e}else void 0===n[o.uuid]&&(n[o.uuid]=r.parse(o)),i[o.uuid]=n[o.uuid]}}return i}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const i=e[n],r=yc.parse(i);t[r.uuid]=r}return t}parseImages(e,t){const n=this,i={};let r;function o(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),r.load(e,function(){n.manager.itemEnd(e)},void 0,function(){n.manager.itemError(e),n.manager.itemEnd(e)})}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:We(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new bc(t);r=new Mc(n),r.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){const n=e[t],r=n.url;if(Array.isArray(r)){const e=[];for(let t=0,n=r.length;t<n;t++){const n=o(r[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new $s(n.data,n.width,n.height)))}i[n.uuid]=new tt(e)}else{const e=o(n.url);i[n.uuid]=new tt(e)}}}return i}async parseImagesAsync(e){const t=this,n={};let i;async function r(e){if("string"==typeof e){const n=e,r=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:t.resourcePath+n;return await i.loadAsync(r)}return e.data?{data:We(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){i=new Mc(this.manager),i.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t<i;t++){const i=e[t],o=i.url;if(Array.isArray(o)){const e=[];for(let t=0,n=o.length;t<n;t++){const n=o[t],i=await r(n);null!==i&&(i instanceof HTMLImageElement?e.push(i):e.push(new $s(i.data,i.width,i.height)))}n[i.uuid]=new tt(e)}else{const e=await r(i.url);n[i.uuid]=new tt(e)}}}return n}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}const i={};if(void 0!==e)for(let r=0,o=e.length;r<o;r++){const o=e[r];void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===t[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);const s=t[o.image],a=s.data;let l;Array.isArray(a)?(l=new Mi,6===a.length&&(l.needsUpdate=!0)):(l=a&&a.data?new $s:new rt,a&&(l.needsUpdate=!0)),l.source=s,l.uuid=o.uuid,void 0!==o.name&&(l.name=o.name),void 0!==o.mapping&&(l.mapping=n(o.mapping,Qc)),void 0!==o.offset&&l.offset.fromArray(o.offset),void 0!==o.repeat&&l.repeat.fromArray(o.repeat),void 0!==o.center&&l.center.fromArray(o.center),void 0!==o.rotation&&(l.rotation=o.rotation),void 0!==o.wrap&&(l.wrapS=n(o.wrap[0],eu),l.wrapT=n(o.wrap[1],eu)),void 0!==o.format&&(l.format=o.format),void 0!==o.type&&(l.type=o.type),void 0!==o.encoding&&(l.encoding=o.encoding),void 0!==o.minFilter&&(l.minFilter=n(o.minFilter,tu)),void 0!==o.magFilter&&(l.magFilter=n(o.magFilter,tu)),void 0!==o.anisotropy&&(l.anisotropy=o.anisotropy),void 0!==o.flipY&&(l.flipY=o.flipY),void 0!==o.premultiplyAlpha&&(l.premultiplyAlpha=o.premultiplyAlpha),void 0!==o.unpackAlignment&&(l.unpackAlignment=o.unpackAlignment),void 0!==o.userData&&(l.userData=o.userData),i[o.uuid]=l}return i}parseObject(e,t,n,i,r){let o,s,a;function l(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function c(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];void 0===n[r]&&console.warn("THREE.ObjectLoader: Undefined material",r),t.pu
vendor: 10,696 bytes, line 30
30sh(n[r])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}function u(e){return void 0===i[e]&&console.warn("THREE.ObjectLoader: Undefined texture",e),i[e]}switch(e.type){case"Scene":o=new ys,void 0!==e.background&&(Number.isInteger(e.background)?o.background=new Ke(e.background):o.background=u(e.background)),void 0!==e.environment&&(o.environment=u(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?o.fog=new vs(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(o.fog=new gs(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":o=new Ti(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(o.focus=e.focus),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.filmGauge&&(o.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(o.filmOffset=e.filmOffset),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new Xi(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new jc(e.color,e.intensity);break;case"DirectionalLight":o=new Wc(e.color,e.intensity);break;case"PointLight":o=new Gc(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new qc(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new Fc(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new Pc(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=(new $c).fromJSON(e);break;case"SkinnedMesh":s=l(e.geometry),a=c(e.material),o=new qs(s,a),void 0!==e.bindMode&&(o.bindMode=e.bindMode),void 0!==e.bindMatrix&&o.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(o.skeleton=e.skeleton);break;case"Mesh":s=l(e.geometry),a=c(e.material),o=new mi(s,a);break;case"InstancedMesh":s=l(e.geometry),a=c(e.material);const t=e.count,n=e.instanceMatrix,i=e.instanceColor;o=new ia(s,a,t),o.instanceMatrix=new Ks(new Float32Array(n.array),16),void 0!==i&&(o.instanceColor=new Ks(new Float32Array(i.array),i.itemSize));break;case"LOD":o=new Hs;break;case"Line":o=new ua(l(e.geometry),c(e.material));break;case"LineLoop":o=new fa(l(e.geometry),c(e.material));break;case"LineSegments":o=new pa(l(e.geometry),c(e.material));break;case"PointCloud":case"Points":o=new xa(l(e.geometry),c(e.material));break;case"Sprite":o=new Ns(c(e.material));break;case"Group":o=new ls;break;case"Bone":o=new Xs;break;default:o=new gn}if(o.uuid=e.uuid,void 0!==e.name&&(o.name=e.name),void 0!==e.matrix?(o.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(void 0!==e.position&&o.position.fromArray(e.position),void 0!==e.rotation&&o.rotation.fromArray(e.rotation),void 0!==e.quaternion&&o.quaternion.fromArray(e.quaternion),void 0!==e.scale&&o.scale.fromArray(e.scale)),void 0!==e.castShadow&&(o.castShadow=e.castShadow),void 0!==e.receiveShadow&&(o.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(o.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(o.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(o.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&o.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(o.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(o.visible=e.visible),void 0!==e.frustumCulled&&(o.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(o.renderOrder=e.renderOrder),void 0!==e.userData&&(o.userData=e.userData),void 0!==e.layers&&(o.layers.mask=e.layers),void 0!==e.children){const s=e.children;for(let e=0;e<s.length;e++)o.add(this.parseObject(s[e],t,n,i,r))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];o.animations.push(r[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(o.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],i=o.getObjectByProperty("uuid",n.object);void 0!==i&&o.addLevel(i,n.distance)}}return o}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse(function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}})}setTexturePath(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}},e.ObjectSpaceNormalMap=1,e.OctahedronBufferGeometry=Fl,e.OctahedronGeometry=Fl,e.OneFactor=201,e.OneMinusDstAlphaFactor=207,e.OneMinusDstColorFactor=209,e.OneMinusSrcAlphaFactor=205,e.OneMinusSrcColorFactor=203,e.OrthographicCamera=Xi,e.PCFShadowMap=1,e.PCFSoftShadowMap=2,e.PMREMGenerator=nr,e.ParametricGeometry=function(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new Zn},e.Particle=function(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Ns(e)},e.ParticleBasicMaterial=function(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ma(e)},e.ParticleSystem=function(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new xa(e,t)},e.ParticleSystemMaterial=function(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ma(e)},e.Path=il,e.PerspectiveCamera=Ti,e.Plane=Pi,e.PlaneBufferGeometry=Fi,e.PlaneGeometry=Fi,e.PlaneHelper=class extends ua{constructor(e,t=1,n=16776960){const i=n,r=new Zn;r.setAttribute("position",new Gn([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),r.computeBoundingSphere(),super(r,new ra({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const o=new Zn;o.setAttribute("position",new Gn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mi(o,new Ln({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){let t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?1:0,this.lookAt(this.plane.normal),super.updateMatrixWorld(e)}},e.PointCloud=function(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new xa(e,t)},e.PointCloudMaterial=function(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ma(e)},e.PointLight=Gc,e.PointLightHelper=class extends mi{constructor(e,t,n){super(new Hl(t,4,2),new Ln({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},e.Points=xa,e.PointsMaterial=ma,e.PolarGridHelper=class extends pa{constructor(e=10,t=16,n=8,i=64,r=4473924,o=8947848){r=new Ke(r),o=new Ke(o);const s=[],a=[];for(let n=0;n<=t;n++){const i=n/t*(2*Math.PI),l=Math.sin(i)*e,c=Math.cos(i)*e;s.push(0,0,0),s.push(l,0,c);const u=1&n?r:o;a.push(u.r,u.g,u.b),a.push(u.r,u.g,u.b)}for(let t=0;t<=n;t++){const l=1&t?r:o,c=e-e/n*t;for(let e=0;e<i;e++){let t=e/i*(2*Math.PI),n=Math.sin(t)*c,r=Math.cos(t)*c;s.push(n,0,r),a.push(l.r,l.g,l.b),t=(e+1)/i*(2*Math.PI),n=Math.sin(t)*c,r=Math.cos(t)*c,s.push(n,0,r),a.push(l.r,l.g,l.b)}}const l=new Zn;l.setAttribute("position",new Gn(s,3)),l.setAttribute("color",new Gn(a,3)),super(l,new ra({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}},e.PolyhedronBufferGeometry=Ca,e.PolyhedronGeometry=Ca,e.PositionalAudio=class extends vu{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(yu,_u,xu),bu.set(0,0,1).applyQuaternion(_u);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(yu.x,e),t.positionY.linearRampToValueAtTime(yu.y,e),t.positionZ.linearRampToValueAtTime(yu.z,e),t.orientationX.linearRampToValueAtTime(bu.x,e),t.orientationY.linearRampToValueAtTime(bu.y,e),t.orientationZ.linearRampToValueAtTime(bu.z,e)}else t.setPosition(yu.x,yu.y,yu.z),t.setOrientation(bu.x,bu.y,bu.z)}},e.PropertyBinding=Du,e.PropertyMixer=Tu,e.QuadraticBezierCurve=Ka,e.QuadraticBezierCurve3=Qa,e.Quaternion=ht,e.QuaternionKeyframeTrack=mc,e.QuaternionLinearInterpolant=fc,e.REVISION=t,e.RGBADepthPacking=3201,e.RGBAFormat=U,e.RGBAIntegerFormat=1033,e.RGBA_ASTC_10x10_Format=le,e.RGBA_ASTC_10x5_Format=oe,e.RGBA_ASTC_10x6_Format=se,e.RGBA_ASTC_10x8_Format=ae,e.RGBA_ASTC_12x10_Format=ce,e.RGBA_ASTC_12x12_Format=ue,e.RGBA_ASTC_4x4_Format=Z,e.RGBA_ASTC_5x4_Format=K,e.RGBA_ASTC_5x5_Format=Q,e.RGBA_ASTC_6x5_Format=ee,e.RGBA_ASTC_6x6_Format=te,e.RGBA_ASTC_8x5_Format=ne,e.RGBA_ASTC_8x6_Format=ie,e.RGBA_ASTC_8x8_Format=re,e.RGBA_BPTC_Format=de,e.RGBA_ETC2_EAC_Format=J,e.RGBA_PVRTC_2BPPV1_Format=$,e.RGBA_PVRTC_4BPPV1_Format=X,e.RGBA_S3TC_DXT1_Format=G,e.RGBA_S3TC_DXT3_Format=V,e.RGBA_S3TC_DXT5_Format=W,e.RGBFormat=1022,e.RGB_ETC1_Format=36196,e.RGB_ETC2_Format=Y,e.RGB_PVRTC_2BPPV1_Format=q,e.RGB_PVRTC_4BPPV1_Format=j,e.RGB_S3TC_DXT1_Format=z,e.RGFormat=1030,e.RGIntegerFormat=1031,e.RawShaderMaterial=Yl,e.Ray=Vt,e.Raycaster=class{constructor(e,t,n=0,i=1/0){this.ray=new Vt(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new tn,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster:
30Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return Gu(e,this,n,t),n.sort(zu),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Gu(e[i],this,n,t);return n.sort(zu),n}},e.RectAreaLight=qc,e.RedFormat=1028,e.RedIntegerFormat=1029,e.ReinhardToneMapping=2,e.RepeatWrapping=T,e.ReplaceStencilOp=7681,e.ReverseSubtractEquation=102,e.RingBufferGeometry=Ul,e.RingGeometry=Ul,e.Scene=ys,e.SceneUtils=yd,e.ShaderChunk=Ui,e.ShaderLib=Hi,e.ShaderMaterial=bi,e.ShadowMaterial=$l,e.Shape=rl,e.ShapeBufferGeometry=Bl,e.ShapeGeometry=Bl,e.ShapePath=class{constructor(){this.type="ShapePath",this.color=new Ke,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new il,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,r,o){return this.currentPath.bezierCurveTo(e,t,n,i,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n],r=new rl;r.curves=i.curves,t.push(r)}return t}function i(e,t){const n=t.length;let i=!1;for(let r=n-1,o=0;o<n;r=o++){let n=t[r],s=t[o],a=s.x-n.x,l=s.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[o],a=-a,s=t[r],l=-l),e.y<n.y||e.y>s.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-a*(e.y-n.y);if(0===t)return!0;if(t<0)continue;i=!i}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return i}const r=Ll.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let s,a,l;const c=[];if(1===o.length)return a=o[0],l=new rl,l.curves=a.curves,c.push(l),c;let u=!r(o[0].getPoints());u=e?!u:u;const d=[],h=[];let p,f,m=[],g=0;h[g]=void 0,m[g]=[];for(let t=0,n=o.length;t<n;t++)a=o[t],p=a.getPoints(),s=r(p),s=e?!s:s,s?(!u&&h[g]&&g++,h[g]={s:new rl,p:p},h[g].s.curves=a.curves,u&&g++,m[g]=[]):m[g].push({h:a,p:p[0]});if(!h[0])return n(o);if(h.length>1){let e=!1,t=0;for(let e=0,t=h.length;e<t;e++)d[e]=[];for(let n=0,r=h.length;n<r;n++){const r=m[n];for(let o=0;o<r.length;o++){const s=r[o];let a=!0;for(let r=0;r<h.length;r++)i(s.p,h[r].p)&&(n!==r&&t++,a?(a=!1,d[r].push(s)):e=!0);a&&d[n].push(s)}}t>0&&!1===e&&(m=d)}for(let e=0,t=h.length;e<t;e++){l=h[e].s,c.push(l),f=m[e];for(let e=0,t=f.length;e<t;e++)l.holes.push(f[e].h)}return c}},e.ShapeUtils=Ll,e.ShortType=1011,e.Skeleton=Zs,e.SkeletonHelper=Ku,e.SkinnedMesh=qs,e.SmoothShading=2,e.Sphere=Ot,e.SphereBufferGeometry=Hl,e.SphereGeometry=Hl,e.Spherical=class{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(ke(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}},e.SphericalHarmonics3=Xc,e.SplineCurve=el,e.SpotLight=Fc,e.SpotLightHelper=class extends gn{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new Zn,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e<n;e++,t++){const r=e/n*Math.PI*2,o=t/n*Math.PI*2;i.push(Math.cos(r),Math.sin(r),1,Math.cos(o),Math.sin(o),1)}n.setAttribute("position",new Gn(i,3));const r=new ra({fog:!1,toneMapped:!1});this.cone=new pa(n,r),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),$u.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt($u),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},e.Sprite=Ns,e.SpriteMaterial=ws,e.SrcAlphaFactor=204,e.SrcAlphaSaturateFactor=210,e.SrcColorFactor=202,e.StaticCopyUsage=35046,e.StaticDrawUsage=Te,e.StaticReadUsage=35045,e.StereoCamera=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ti,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ti,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,uu.copy(e.projectionMatrix);const n=t.eyeSep/2,i=n*t.near/t.focus,r=t.near*Math.tan(Le*t.fov*.5)/t.zoom;let o,s;
30cu.elements[12]=-n,lu.elements[12]=n,o=-r*t.aspect+i,s=r*t.aspect+i,uu.elements[0]=2*t.near/(s-o),uu.elements[8]=(s+o)/(s-o),this.cameraL.projectionMatrix.copy(uu),o=-r*t.aspect-i,s=r*t.aspect-i,uu.elements[0]=2*t.near/(s-o),uu.elements[8]=(s+o)/(s-o),this.cameraR.projectionMatrix.copy(uu)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(cu),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(lu)}},e.StreamCopyUsage=35042,e.StreamDrawUsage=35040,e.StreamReadUsage=35041,e.StringKeyframeTrack=gc,e.SubtractEquation=101,e.SubtractiveBlending=3,e.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},e.TangentSpaceNormalMap=0,e.TetrahedronBufferGeometry=zl,e.TetrahedronGeometry=zl,e.TextGeometry=function(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new Zn},e.Texture=rt,e.TextureLoader=Cc,e.TorusBufferGeometry=Gl,e.TorusGeometry=Gl,e.TorusKnotBufferGeometry=Vl,e.TorusKnotGeometry=Vl,e.Triangle=An,e.TriangleFanDrawMode=2,e.TriangleStripDrawMode=1,e.TrianglesDrawMode=0,e.TubeBufferGeometry=Wl,e.TubeGeometry=Wl,e.UVMapping=g,e.Uint16Attribute=function(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Un(e,t)},e.Uint16BufferAttribute=Un,e.Uint32Attribute=function(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Hn(e,t)},e.Uint32BufferAttribute=Hn,e.Uint8Attribute=function(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new On(e,t)},e.Uint8BufferAttribute=On,e.Uint8ClampedAttribute=function(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Nn(e,t)},e.Uint8ClampedBufferAttribute=Nn,e.Uniform=Uu,e.UniformsLib=Bi,e.UniformsUtils=xi,e.UnsignedByteType=I,e.UnsignedInt248Type=F,e.UnsignedIntType=D,e.UnsignedShort4444Type=1017,e.UnsignedShort5551Type=1018,e.UnsignedShortType=k,e.VSMShadowMap=3,e.Vector2=He,e.Vector3=pt,e.Vector4=ot,e.VectorKeyframeTrack=vc,e.Vertex=function(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new pt(e,t,n)},e.VertexColors=2,e.VideoTexture=wa,e.WebGL1Renderer=ms,e.WebGL3DRenderTarget=ut,e.WebGLArrayRenderTarget=lt,e.WebGLCubeRenderTarget=Ai,e.WebGLMultipleRenderTargets=dt,e.WebGLMultisampleRenderTarget=function(e,t,n){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.');const i=new st(e,t,n);return i.samples=4,i},e.WebGLRenderTarget=st,e.WebGLRenderTargetCube=function(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Ai(e,n)},e.WebGLRenderer=fs,e.WebGLUtils=ss,e.WireframeGeometry=jl,e.WireframeHelper=function(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new pa(new jl(e.geometry),new ra({color:void 0!==t?t:16777215}))},e.WrapAroundEnding=ve,e.XHRLoader=function(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Ec(e)},e.ZeroCurvatureEnding=me,e.ZeroFactor=200,e.ZeroSlopeEnding=ge,e.ZeroStencilOp=0,e._SRGBAFormat=Me,e.sRGBEncoding=be,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define("three",["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).THREE={}), 31/*! 32* TweenJS 33* Visit http://createjs.com/ for documentation, updates and examples. 34* 35* Copyright (c) 2010 gskinner.com, inc. 36* 37* Permission is hereby granted, free of charge, to any person 38* obtaining a copy of this software and associated documentation 39* files (the "Software"), to deal in the Software without 40* restriction, including without limitation the rights to use, 41* copy, modify, merge, publish, distribute, sublicense, and/or sell 42* copies of the Software, and to permit persons to whom the 43* Software is furnished to do so, subject to the following 44* conditions: 45* 46* The above copyright notice and this permission notice shall be 47* included in all copies or substantial portions of the Software. 48* 49* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 50* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 51* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 52* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 53* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 54* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 55* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 56* OTHER DEALINGS IN THE SOFTWARE. 57*/ 58this.createjs=this.createjs||{},createjs.extend=function(e,t){"use strict";function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n},this.createjs=this.createjs||{},createjs.promote=function(e,t){"use strict";var n=e.prototype,i=Object.getPrototypeOf&&Object.getPrototypeOf(n)||n.__proto__;if(i)for(var r in n[(t+="_")+"constructor"]=i.constructor,i)n.hasOwnProperty(r)&&"function"==typeof i[r]&&(n[t+r]=i[r]);return e},this.createjs=this.createjs||{},createjs.deprecate=function(e,t){"use strict";return function(){var n="Deprecated property or method '"+t+"'. See docs for info.";return console&&(console.warn?console.warn(n):console.log(n)),e&&e.apply(this,arguments)}},this.createjs=this.createjs||{},function(){"use strict";function e(e,t,n){this.type=e,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!t,this.cancelable=!!n,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.prop
vendor: 7,939 bytes, line 58
58agationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var t=e.prototype;t.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},t.stopPropagation=function(){this.propagationStopped=!0},t.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},t.remove=function(){this.removed=!0},t.clone=function(){return new e(this.type,this.bubbles,this.cancelable)},t.set=function(e){for(var t in e)this[t]=e[t];return this},t.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(){this._listeners=null,this._captureListeners=null}var t=e.prototype;e.initialize=function(e){e.addEventListener=t.addEventListener,e.on=t.on,e.removeEventListener=e.off=t.removeEventListener,e.removeAllEventListeners=t.removeAllEventListeners,e.hasEventListener=t.hasEventListener,e.dispatchEvent=t.dispatchEvent,e._dispatchEvent=t._dispatchEvent,e.willTrigger=t.willTrigger},t.addEventListener=function(e,t,n){var i,r=(i=n?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{})[e];return r&&this.removeEventListener(e,t,n),(r=i[e])?r.push(t):i[e]=[t],t},t.on=function(e,t,n,i,r,o){return t.handleEvent&&(n=n||t,t=t.handleEvent),n=n||this,this.addEventListener(e,function(e){t.call(n,e,r),i&&e.remove()},o)},t.removeEventListener=function(e,t,n){var i=n?this._captureListeners:this._listeners;if(i){var r=i[e];if(r)for(var o=0,s=r.length;o<s;o++)if(r[o]==t){1==s?delete i[e]:r.splice(o,1);break}}},t.off=t.removeEventListener,t.removeAllEventListeners=function(e){e?(this._listeners&&delete this._listeners[e],this._captureListeners&&delete this._captureListeners[e]):this._listeners=this._captureListeners=null},t.dispatchEvent=function(e,t,n){if("string"==typeof e){var i=this._listeners;if(!(t||i&&i[e]))return!0;e=new createjs.Event(e,t,n)}else e.target&&e.clone&&(e=e.clone());try{e.target=this}catch(e){}if(e.bubbles&&this.parent){for(var r=this,o=[r];r.parent;)o.push(r=r.parent);var s,a=o.length;for(s=a-1;s>=0&&!e.propagationStopped;s--)o[s]._dispatchEvent(e,1+(0==s));for(s=1;s<a&&!e.propagationStopped;s++)o[s]._dispatchEvent(e,3)}else this._dispatchEvent(e,2);return!e.defaultPrevented},t.hasEventListener=function(e){var t=this._listeners,n=this._captureListeners;return!!(t&&t[e]||n&&n[e])},t.willTrigger=function(e){for(var t=this;t;){if(t.hasEventListener(e))return!0;t=t.parent}return!1},t.toString=function(){return"[EventDispatcher]"},t._dispatchEvent=function(e,t){var n,i,r=t<=2?this._captureListeners:this._listeners;if(e&&r&&(i=r[e.type])&&(n=i.length)){try{e.currentTarget=this}catch(e){}try{e.eventPhase=0|t}catch(e){}e.removed=!1,i=i.slice();for(var o=0;o<n&&!e.immediatePropagationStopped;o++){var s=i[o];s.handleEvent?s.handleEvent(e):s(e),e.removed&&(this.off(e.type,s,1==t),e.removed=!1)}}2===t&&this._dispatchEvent(e,2.1)},createjs.EventDispatcher=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(){throw"Ticker cannot be instantiated."}e.RAF_SYNCHED="synched",e.RAF="raf",e.TIMEOUT="timeout",e.timingMode=null,e.maxDelta=0,e.paused=!1,e.removeEventListener=null,e.removeAllEventListeners=null,e.dispatchEvent=null,e.hasEventListener=null,e._listeners=null,createjs.EventDispatcher.initialize(e),e._addEventListener=e.addEventListener,e.addEventListener=function(){return!e._inited&&e.init(),e._addEventListener.apply(e,arguments)},e._inited=!1,e._startTime=0,e._pausedTime=0,e._ticks=0,e._pausedTicks=0,e._interval=50,e._lastTime=0,e._times=null,e._tickTimes=null,e._timerId=null,e._raf=!0,e._setInterval=function(t){e._interval=t,e._inited&&e._setupTick()},e.setInterval=createjs.deprecate(e._setInterval,"Ticker.setInterval"),e._getInterval=function(){return e._interval},e.getInterval=createjs.deprecate(e._getInterval,"Ticker.getInterval"),e._setFPS=function(t){e._setInterval(1e3/t)},e.setFPS=createjs.deprecate(e._setFPS,"Ticker.setFPS"),e._getFPS=function(){return 1e3/e._interval},e.getFPS=createjs.deprecate(e._getFPS,"Ticker.getFPS");try{Object.defineProperties(e,{interval:{get:e._getInterval,set:e._setInterval},framerate:{get:e._getFPS,set:e._setFPS}})}catch(e){console.log(e)}e.init=function(){e._inited||(e._inited=!0,e._times=[],e._tickTimes=[],e._startTime=e._getTime(),e._times.push(e._lastTime=0),e.interval=e._interval)},e.reset=function(){if(e._raf){var t=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame;t&&t(e._timerId)}else clearTimeout(e._timerId);e.removeAllEventListeners("tick"),e._timerId=e._times=e._tickTimes=null,e._startTime=e._lastTime=e._ticks=e._pausedTime=0,e._inited=!1},e.getMeasuredTickTime=function(t){var n=0,i=e._tickTimes;if(!i||i.length<1)return-1;t=Math.min(i.length,t||0|e._getFPS());for(var r=0;r<t;r++)n+=i[r];return n/t},e.getMeasuredFPS=function(t){var n=e._times;return!n||n.length<2?-1:(t=Math.min(n.length-1,t||0|e._getFPS()),1e3/((n[0]-n[t])/t))},e.getTime=function(t){return e._startTime?e._getTime()-(t?e._pausedTime:0):-1},e.getEventTime=function(t){return e._startTime?(e._lastTime||e._startTime)-(t?e._pausedTime:0):-1},e.getTicks=function(t){return e._ticks-(t?e._pausedTicks:0)},e._handleSynch=function(){e._timerId=null,e._setupTick(),e._getTime()-e._lastTime>=.97*(e._interval-1)&&e._tick()},e._handleRAF=function(){e._timerId=null,e._setupTick(),e._tick()},e._handleTimeout=function(){e._timerId=null,e._setupTick(),e._tick()},e._setupTick=function(){if(null==e._timerId){var t=e.timingMode;if(t==e.RAF_SYNCHED||t==e.RAF){var n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(n)return e._timerId=n(t==e.RAF?e._handleRAF:e._handleSynch),void(e._raf=!0)}e._raf=!1,e._timerId=setTimeout(e._handleTimeout,e._interval)}},e._tick=function(){var t=e.paused,n=e._getTime(),i=n-e._lastTime;if(e._lastTime=n,e._ticks++,t&&(e._pausedTicks++,e._pausedTime+=i),e.hasEventListener("tick")){var r=new createjs.Event("tick"),o=e.maxDelta;r.delta=o&&i>o?o:i,r.paused=t,r.time=n,r.runTime=n-e._pausedTime,e.dispatchEvent(r)}for(e._tickTimes.unshift(e._getTime()-n);e._tickTimes.length>100;)e._tickTimes.pop();for(e._times.unshift(n);e._times.length>100;)e._times.pop()};var t=window,n=t.performance.now||t.performance.mozNow||t.performance.msNow||t.performance.oNow||t.performance.webkitNow;e._getTime=function(){return(n&&n.call(t.performance)||(new Date).getTime())-e._startTime},createjs.Ticker=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(e){this.EventDispatcher_constructor(),this.ignoreGlobalPause=!1,this.loop=0,this.useTicks=!1,this.reversed=!1,this.bounce=!1,this.timeScale=1,this.duration=0,this.position=0,this.rawPosition=-1,this._paused=!0,this._next=null,this._prev=null,this._parent=null,this._labels=null,this._labelList=null,e&&(this.useTicks=!!e.useTicks,this.ignoreGlobalPause=!!e.ignoreGlobalPause,this.loop=!0===e.loop?-1:e.loop||0,this.reversed=!!e.reversed,this.bounce=!!e.bounce,this.timeScale=e.timeScale||1,e.onChange&&this.addEventListener("change",e.onChange),e.onComplete&&this.addEventListener("complete",e.onComplete))}var t=createjs.extend(e,createjs.EventDispatcher);t._setPaused=function(e){return createjs.Tween._register(this,e),this},t.setPaused=createjs.deprecate(t._setPaused,"AbstractTween.setPaused"),t._getPaused=function(){return this._paused},t.getPaused=createjs.deprecate(t._getPaused,"AbstactTween.getPaused"),t._getCurrentLabel=function(e){var t=this.getLabels();null==e&&(e=this.position);for(var n=0,i=t.length;n<i&&!(e<t[n].position);n++);return 0===n?null:t[n-1].label},t.getCurrentLabel=createjs.deprecate(t._getCurrentLabel,"AbstractTween.getCurrentLabel");try{Object.defineProperties(t,{paused:{set:t._setPaused,get:t._getPaused},currentLabel:{get:t._getCurrentLabel}}
58)}catch(e){}t.advance=function(e,t){this.setPosition(this.rawPosition+e*this.timeScale,t)},t.setPosition=function(e,t,n,i){var r=this.duration,o=this.loop,s=this.rawPosition,a=0,l=0,c=!1;if(e<0&&(e=0),0===r){if(c=!0,-1!==s)return c}else{if(l=e-(a=e/r|0)*r,(c=-1!==o&&e>=o*r+r)&&(e=(l=r)*(a=o)+r),e===s)return c;!this.reversed!=!(this.bounce&&a%2)&&(l=r-l)}this.position=l,this.rawPosition=e,this._updatePosition(n,c),c&&(this.paused=!0),i&&i(this),t||this._runActions(s,e,n,!n&&-1===s),this.dispatchEvent("change"),c&&this.dispatchEvent("complete")},t.calculatePosition=function(e){var t=this.duration,n=this.loop,i=0,r=0;return 0===t?0:(-1!==n&&e>=n*t+t?(r=t,i=n):r=e<0?0:e-(i=e/t|0)*t,!this.reversed!=!(this.bounce&&i%2)?t-r:r)},t.getLabels=function(){var e=this._labelList;if(!e){e=this._labelList=[];var t=this._labels;for(var n in t)e.push({label:n,position:t[n]});e.sort(function(e,t){return e.position-t.position})}return e},t.setLabels=function(e){this._labels=e,this._labelList=null},t.addLabel=function(e,t){this._labels||(this._labels={}),this._labels[e]=t;var n=this._labelList;if(n){for(var i=0,r=n.length;i<r&&!(t<n[i].position);i++);n.splice(i,0,{label:e,position:t})}},t.gotoAndPlay=function(e){this.paused=!1,this._goto(e)},t.gotoAndStop=function(e){this.paused=!0,this._goto(e)},t.resolve=function(e){var t=Number(e);return isNaN(t)&&(t=this._labels&&this._labels[e]),t},t.toString=function(){return"[AbstractTween]"},t.clone=function(){throw"AbstractTween can not be cloned."},t._init=function(e){e&&e.paused||(this.paused=!1),e&&null!=e.position&&this.setPosition(e.position)},t._updatePosition=function(e,t){},t._goto=function(e){var t=this.resolve(e);null!=t&&this.setPosition(t,!1,!0)},t._runActions=function(e,t,n,i){if(this._actionHead||this.tweens){var r,o,s,a,l=this.duration,c=this.reversed,u=this.bounce,d=this.loop;if(0===l?(r=o=s=a=0,c=u=!1):(s=e-(r=e/l|0)*l,a=t-(o=t/l|0)*l),-1!==d&&(o>d&&(a=l,o=d),r>d&&(s=l,r=d)),n)return this._runActionsRange(a,a,n,i);if(r!==o||s!==a||n||i){-1===r&&(r=s=0);var h=e<=t,p=r;do{var f=p===r?s:h?0:l,m=p===o?a:h?l:0;if(!c!=!(u&&p%2)&&(f=l-f,m=l-m),u&&p!==r&&f===m);else if(this._runActionsRange(f,m,n,i||p!==r&&!u))return!0;i=!1}while(h&&++p<=o||!h&&--p>=o)}}},t._runActionsRange=function(e,t,n,i){},createjs.AbstractTween=createjs.promote(e,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function e(t,i){this.AbstractTween_constructor(i),this.pluginData=null,this.target=t,this.passive=!1,this._stepHead=new n(null,0,0,{},null,!0),this._stepTail=this._stepHead,this._stepPosition=0,this._actionHead=null,this._actionTail=null,this._plugins=null,this._pluginIds=null,this._injected=null,i&&(this.pluginData=i.pluginData,i.override&&e.removeTweens(t)),this.pluginData||(this.pluginData={}),this._init(i)}var t=createjs.extend(e,createjs.AbstractTween);function n(e,t,n,i,r,o){this.next=null,this.prev=e,this.t=t,this.d=n,this.props=i,this.ease=r,this.passive=o,this.index=e?e.index+1:0}function i(e,t,n,i,r){this.next=null,this.prev=e,this.t=t,this.d=0,this.scope=n,this.funct=i,this.params=r}e.IGNORE={},e._tweens=[],e._plugins=null,e._tweenHead=null,e._tweenTail=null,e.get=function(t,n){return new e(t,n)},e.tick=function(t,n){for(var i=e._tweenHead;i;){var r=i._next;n&&!i.ignoreGlobalPause||i._paused||i.advance(i.useTicks?1:t),i=r}},e.handleEvent=function(e){"tick"===e.type&&this.tick(e.delta,e.paused)},e.removeTweens=function(t){if(t.tweenjs_count){for(var n=e._tweenHead;n;){var i=n._next;n.target===t&&e._register(n,!0),n=i}t.tweenjs_count=0}},e.removeAllTweens=function(){for(var t=e._tweenHead;t;){var n=t._next;t._paused=!0,t.target&&(t.target.tweenjs_count=0),t._next=t._prev=null,t=n}e._tweenHead=e._tweenTail=null},e.hasActiveTweens=function(t){return t?!!t.tweenjs_count:!!e._tweenHead},e._installPlugin=function(t){for(var n=t.priority=t.priority||0,i=e._plugins=e._plugins||[],r=0,o=i.length;r<o&&!(n<i[r].priority);r++);i.splice(r,0,t)},e._register=function(t,n){var i=t.target;if(!n&&t._paused){i&&(i.tweenjs_count=i.tweenjs_count?i.tweenjs_count+1:1);var r=e._tweenTail;r?(e._tweenTail=r._next=t,t._prev=r):e._tweenHead=e._tweenTail=t,!e._inited&&createjs.Ticker&&(createjs.Ticker.addEventListener("tick",e),e._inited=!0)}else if(n&&!t._paused){i&&i.tweenjs_count--;
vendor: 9,315 bytes, line 58
58var o=t._next,s=t._prev;o?o._prev=s:e._tweenTail=s,s?s._next=o:e._tweenHead=o,t._next=t._prev=null}t._paused=n},t.wait=function(e,t){return e>0&&this._addStep(+e,this._stepTail.props,null,t),this},t.to=function(e,t,n){(null==t||t<0)&&(t=0);var i=this._addStep(+t,null,n);return this._appendProps(e,i),this},t.label=function(e){return this.addLabel(e,this.duration),this},t.call=function(e,t,n){return this._addAction(n||this.target,e,t||[this])},t.set=function(e,t){return this._addAction(t||this.target,this._set,[e])},t.play=function(e){return this._addAction(e||this,this._set,[{paused:!1}])},t.pause=function(e){return this._addAction(e||this,this._set,[{paused:!0}])},t.w=t.wait,t.t=t.to,t.c=t.call,t.s=t.set,t.toString=function(){return"[Tween]"},t.clone=function(){throw"Tween can not be cloned."},t._addPlugin=function(e){var t=this._pluginIds||(this._pluginIds={}),n=e.ID;if(n&&!t[n]){t[n]=!0;for(var i=this._plugins||(this._plugins=[]),r=e.priority||0,o=0,s=i.length;o<s;o++)if(r<i[o].priority)return void i.splice(o,0,e);i.push(e)}},t._updatePosition=function(e,t){var n=this._stepHead.next,i=this.position,r=this.duration;if(this.target&&n){for(var o=n.next;o&&o.t<=i;)o=(n=n.next).next;var s=t?0===r?1:i/r:(i-n.t)/n.d;this._updateTargetProps(n,s,t)}this._stepPosition=n?i-n.t:0},t._updateTargetProps=function(t,n,i){if(!(this.passive=!!t.passive)){var r,o,s,a,l=t.prev.props,c=t.props;(a=t.ease)&&(n=a(n,0,1,1));var u=this._plugins;e:for(var d in l){if(r=(o=l[d])!==(s=c[d])&&"number"==typeof o?o+(s-o)*n:n>=1?s:o,u)for(var h=0,p=u.length;h<p;h++){var f=u[h].change(this,t,d,r,n,i);if(f===e.IGNORE)continue e;void 0!==f&&(r=f)}this.target[d]=r}}},t._runActionsRange=function(e,t,n,i){var r=e>t,o=r?this._actionTail:this._actionHead,s=t,a=e;r&&(s=e,a=t);for(var l=this.position;o;){var c=o.t;if((c===t||c>a&&c<s||i&&c===e)&&(o.funct.apply(o.scope,o.params),l!==this.position))return!0;o=r?o.prev:o.next}},t._appendProps=function(t,n,i){var r,o,s,a,l,c=this._stepHead.props,u=this.target,d=e._plugins,h=n.prev,p=h.props,f=n.props||(n.props=this._cloneProps(p)),m={};for(r in t)if(t.hasOwnProperty(r)&&(m[r]=f[r]=t[r],void 0===c[r])){if(a=void 0,d)for(o=d.length-1;o>=0;o--)if(void 0!==(s=d[o].init(this,r,a))&&(a=s),a===e.IGNORE){delete f[r],delete m[r];break}a!==e.IGNORE&&(void 0===a&&(a=u[r]),p[r]=void 0===a?null:a)}for(r in m){s=t[r];for(var g,v=h;(g=v)&&(v=g.prev);)if(v.props!==g.props){if(void 0!==v.props[r])break;v.props[r]=p[r]}}if(!1!==i&&(d=this._plugins))for(o=d.length-1;o>=0;o--)d[o].step(this,n,m);(l=this._injected)&&(this._injected=null,this._appendProps(l,n,!1))},t._injectProp=function(e,t){(this._injected||(this._injected={}))[e]=t},t._addStep=function(e,t,i,r){var o=new n(this._stepTail,this.duration,e,t,i,r||!1);return this.duration+=e,this._stepTail=this._stepTail.next=o},t._addAction=function(e,t,n){var r=new i(this._actionTail,this.duration,e,t,n);return this._actionTail?this._actionTail.next=r:this._actionHead=r,this._actionTail=r,this},t._set=function(e){for(var t in e)this[t]=e[t]},t._cloneProps=function(e){var t={};for(var n in e)t[n]=e[n];return t},createjs.Tween=createjs.promote(e,"AbstractTween")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e){var t,n;e instanceof Array||null==e&&arguments.length>1?(t=e,n=arguments[1],e=arguments[2]):e&&(t=e.tweens,n=e.labels),this.AbstractTween_constructor(e),this.tweens=[],t&&this.addTween.apply(this,t),this.setLabels(n),this._init(e)}var t=createjs.extend(e,createjs.AbstractTween);t.addTween=function(e){e._parent&&e._parent.removeTween(e);var t=arguments.length;if(t>1){for(var n=0;n<t;n++)this.addTween(arguments[n]);return arguments[t-1]}if(0===t)return null;this.tweens.push(e),e._parent=this,e.paused=!0;var i=e.duration;return e.loop>0&&(i*=e.loop+1),i>this.duration&&(this.duration=i),this.rawPosition>=0&&e.setPosition(this.rawPosition),e},t.removeTween=function(e){var t=arguments.length;if(t>1){for(var n=!0,i=0;i<t;i++)n=n&&this.removeTween(arguments[i]);return n}if(0===t)return!0;var r=this.tweens;for(i=r.length;i--;)if(r[i]===e)return r.splice(i,1),e._parent=null,e.duration>=this.duration&&this.updateDuration(),!0;return!1},t.updateDuration=function(){this.duration=0;for(var e=0,t=this.tweens.length;e<t;e++){var n=this.tweens[e],i=n.duration;n.loop>0&&(i*=n.loop+1),i>this.duration&&(this.duration=i)}},t.toString=function(){return"[Timeline]"},t.clone=function(){throw"Timeline can not be cloned."},t._updatePosition=function(e,t){for(var n=this.position,i=0,r=this.tweens.length;i<r;i++)this.tweens[i].setPosition(n,!0,e)},t._runActionsRange=function(e,t,n,i){for(var r=this.position,o=0,s=this.tweens.length;o<s;o++)if(this.tweens[o]._runActions(e,t,n,i),r!==this.position)return!0},createjs.Timeline=createjs.promote(e,"AbstractTween")}(),this.createjs=this.createjs||{},function(){"use strict";function e(){throw"Ease cannot be instantiated."}e.linear=function(e){return e},e.none=e.linear,e.get=function(e){return e<-1?e=-1:e>1&&(e=1),function(t){return 0==e?t:e<0?t*(t*-e+1+e):t*((2-t)*e+(1-e))}},e.getPowIn=function(e){return function(t){return Math.pow(t,e)}},e.getPowOut=function(e){return function(t){return 1-Math.pow(1-t,e)}},e.getPowInOut=function(e){return function(t){return(t*=2)<1?.5*Math.pow(t,e):1-.5*Math.abs(Math.pow(2-t,e))}},e.quadIn=e.getPowIn(2),e.quadOut=e.getPowOut(2),e.quadInOut=e.getPowInOut(2),e.cubicIn=e.getPowIn(3),e.cubicOut=e.getPowOut(3),e.cubicInOut=e.getPowInOut(3),e.quartIn=e.getPowIn(4),e.quartOut=e.getPowOut(4),e.quartInOut=e.getPowInOut(4),e.quintIn=e.getPowIn(5),e.quintOut=e.getPowOut(5),e.quintInOut=e.getPowInOut(5),e.sineIn=function(e){return 1-Math.cos(e*Math.PI/2)},e.sineOut=function(e){return Math.sin(e*Math.PI/2)},e.sineInOut=function(e){return-.5*(Math.cos(Math.PI*e)-1)},e.getBackIn=function(e){return function(t){return t*t*((e+1)*t-e)}},e.backIn=e.getBackIn(1.7),e.getBackOut=function(e){return function(t){return--t*t*((e+1)*t+e)+1}},e.backOut=e.getBackOut(1.7),e.getBackInOut=function(e){return e*=1.525,function(t){return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},e.backInOut=e.getBackInOut(1.7),e.circIn=function(e){return-(Math.sqrt(1-e*e)-1)},e.circOut=function(e){return Math.sqrt(1- --e*e)},e.circInOut=function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},e.bounceIn=function(t){return 1-e.bounceOut(1-t)},e.bounceOut=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},e.bounceInOut=function(t){return t<.5?.5*e.bounceIn(2*t):.5*e.bounceOut(2*t-1)+.5},e.getElasticIn=function(e,t){var n=2*Math.PI;return function(i){if(0==i||1==i)return i;var r=t/n*Math.asin(1/e);return-e*Math.pow(2,10*(i-=1))*Math.sin((i-r)*n/t)}},e.elasticIn=e.getElasticIn(1,.3),e.getElasticOut=function(e,t){var n=2*Math.PI;return function(i){if(0==i||1==i)return i;var r=t/n*Math.asin(1/e);return e*Math.pow(2,-10*i)*Math.sin((i-r)*n/t)+1}},e.elasticOut=e.getElasticOut(1,.3),e.getElasticInOut=function(e,t){var n=2*Math.PI;return function(i){var r=t/n*Math.asin(1/e);return(i*=2)<1?e*Math.pow(2,10*(i-=1))*Math.sin((i-r)*n/t)*-.5:e*Math.pow(2,-10*(i-=1))*Math.sin((i-r)*n/t)*.5+1}},e.elasticInOut=e.getElasticInOut(1,.3*1.5),createjs.Ease=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(){throw"MotionGuidePlugin cannot be instantiated."}var t=e;t.priority=0,t.ID="MotionGuide",t.install=function(){return createjs.Tween._installPlugin(e),createjs.Tween.IGNORE},t.init=function(e,n,i){"guide"==n&&e._addPlugin(t)},t.step=function(e,n,i){for(var r in i)if("guide"===r){var o=n.props.guide,s=t._solveGuideData(i.guide,o);o.valid=!s;var a=o.endData;if(e._injectProp("x",a.x),e._injectProp("y",a.y),s||!o.orient)break;var l=void 0===n.prev.props.rotation?e.target.rotation||0:n.prev.props.rotation;if(o.startOffsetRot=l-o.startData.rotation,"fixed"==o.orient)o.endAbsRot=a.rotation+o.startOffsetRot,o.deltaRotation=0;else{var c=void 0===i.rotation?e.target.rotation||0:i.rotation,u=c-o.endData.rotation-o.startOffsetRot,d=u%360;switch(o.endAbsRot=c,o.orient){case"auto":o.deltaRotation=u;break;case"cw":o.deltaRotation=(d+360)%360+360*Math.abs(u/360|0);break;case"ccw":o.deltaRotation=(d-360)%360+-360*Math.abs(u/360|0)}}e._injectProp("rotation",o.endAbsRot)}},t.change=function(e,n,i,r,o,s){var a=n.props.guide;if(a&&n.props!==n.prev.props&&a!==n.prev.props.guide)return"guide"===i&&!a.valid||"x"==i||"y"==i||"rotation"===i&&a.orient?createjs.Tween.IGNORE:void t._ratioToPositionData(o,a,e.target)},t.debug=function(e,n,i){e=e.guide||e;var r=t._findPathProblems(e);if(r&&console.error("MotionGuidePlugin Error found: \n"+r),!n)return r;var o=e.path,s=o.length;for(n.save(),n.lineCap="round",n.lineJoin="miter",n.beginPath(),n.moveTo(o[0],o[1]),u=2;u<s;u+=4)n.quadraticCurveTo(o[u],o[u+1],o[u+2],o[u+3]);n.strokeStyle="black",n.lineWidth=4.5,n.stroke(),n.strokeStyle="white",n.lineWidth=3,n.stroke(),n.closePath();var a=i.length;if(i&&a){var l={},c={};t._solveGuideData(e,l);for(var u=0;u<a;u++)l.orient="fixed",t._ratioToPositionData(i[u],l,c),n.beginPath(),n.moveTo(c.x,c.y),n.lineTo(c.x+9*Math.cos(.0174533*c.rotation),c.y+9*Math.sin(.0174533*c.rotation)),n.strokeStyle="black",n.lineWidth=4.5,n.stroke(),n.strokeStyle="red",n.lineWidth=3,n.stroke(),n.closePath()}
58return n.restore(),r},t._solveGuideData=function(e,n){var i;if(i=t.debug(e))return i;var r=n.path=e.path;n.orient=e.orient;n.subLines=[],n.totalLength=0,n.startOffsetRot=0,n.deltaRotation=0,n.startData={ratio:0},n.endData={ratio:1},n.animSpan=1;var o,s,a,l,c,u,d,h,p,f=r.length,m={};for(o=r[0],s=r[1],d=2;d<f;d+=4){a=r[d],l=r[d+1],c=r[d+2],u=r[d+3];var g={weightings:[],estLength:0,portion:0},v=o,y=s;for(h=1;h<=10;h++){t._getParamsForCurve(o,s,a,l,c,u,h/10,!1,m);var _=m.x-v,x=m.y-y;p=Math.sqrt(_*_+x*x),g.weightings.push(p),g.estLength+=p,v=m.x,y=m.y}for(n.totalLength+=g.estLength,h=0;h<10;h++)p=g.estLength,g.weightings[h]=g.weightings[h]/p;n.subLines.push(g),o=c,s=u}p=n.totalLength;var b=n.subLines.length;for(d=0;d<b;d++)n.subLines[d].portion=n.subLines[d].estLength/p;var w=isNaN(e.start)?0:e.start,T=isNaN(e.end)?1:e.end;t._ratioToPositionData(w,n,n.startData),t._ratioToPositionData(T,n,n.endData),n.startData.ratio=w,n.endData.ratio=T,n.animSpan=n.endData.ratio-n.startData.ratio},t._ratioToPositionData=function(e,n,i){var r,o,s,a,l,c=n.subLines,u=0,d=e*n.animSpan+n.startData.ratio;for(o=c.length,r=0;r<o;r++){if(u+(a=c[r].portion)>=d){l=r;break}u+=a}void 0===l&&(l=o-1,u-=a);var h=c[l].weightings,p=a;for(o=h.length,r=0;r<o&&!(u+(a=h[r]*p)>=d);r++)u+=a;l=4*l+2,s=r/10+(d-u)/a*.1;var f=n.path;return t._getParamsForCurve(f[l-2],f[l-1],f[l],f[l+1],f[l+2],f[l+3],s,n.orient,i),n.orient&&(e>=.99999&&e<=1.00001&&void 0!==n.endAbsRot?i.rotation=n.endAbsRot:i.rotation+=n.startOffsetRot+e*n.deltaRotation),i},t._getParamsForCurve=function(e,t,n,i,r,o,s,a,l){var c=1-s;l.x=c*c*e+2*c*s*n+s*s*r,l.y=c*c*t+2*c*s*i+s*s*o,a&&(l.rotation=57.2957795*Math.atan2((i-t)*c+(o-i)*s,(n-e)*c+(r-n)*s))},t._findPathProblems=function(e){var t=e.path,n=t&&t.length||0;if(n<6||(n-2)%4){var i="\tCannot parse 'path' array due to invalid number of entries in path. ";return i+="There should be an odd number of points, at least 3 points, and 2 entries per point (x & y). ",i+="See 'CanvasRenderingContext2D.quadraticCurveTo' for details as 'path' models a quadratic bezier.\n\n",i+="Only [ "+n+" ] values found. Expected: "+Math.max(4*Math.ceil((n-2)/4)+2,6)}for(var r=0;r<n;r++)if(isNaN(t[r]))return"All data in path array must be numeric";var o=e.start;if(isNaN(o)&&void 0!==o)return"'start' out of bounds. Expected 0 to 1, got: "+o;var s=e.end;if(isNaN(s)&&void 0!==s)return"'end' out of bounds. Expected 0 to 1, got: "+s;var a=e.orient;return a&&"fixed"!=a&&"auto"!=a&&"cw"!=a&&"ccw"!=a?'Invalid orientation value. Expected ["fixed", "auto", "cw", "ccw", undefined], got: '+a:void 0},createjs.MotionGuidePlugin=e}(),this.createjs=this.createjs||{},function(){"use strict";var e=createjs.TweenJS=createjs.TweenJS||{};e.version="1.0.0",e.buildDate="Thu, 14 Sep 2017 19:47:47 GMT"}(),define("tween",function(){}),define("ikelos/360video",["ikelos","three","tween"],function(e,t,n){e("plugin","360video",function(e,i){i=void 0!==i?i:{};var r,o,s,a,l,c,u,d,h,p,f,m,g,v,y=this,_=!1,x=e.object(),b={},w=!1,T=0,S=0,E=0,M=0,A=0,R=0,C=0,L=0,P=50,I=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,k=window.cancelAnimationFrame||window.mozCancelAnimationFrame,D=!1;function O(e,t){return t=void 0!==t?t:0,isNaN(e)?0:parseInt(e)}function N(e,t){"function"==typeof t&&(null==b[e]&&(b[e]=[]),b[e].push(t))}function F(e,t){_&&console.log("<ikelos.360video:doCallback>",e,b[e],{data:t,_callbacks:b}),void 0!==b[e]&&$.each(b[e],function(e,n){"function"==typeof n&&n(t)})}function U(){e.src(),r=e.id,e.videoWidth(),e.videoHeight(),o=$("#"+r),o.attr("poster"),s=o.parent(),a=s[0],c=void 0!==(c=o.data("ikelospanooptions")||o.data("ikelos-pano-options"))?c:{},s.addClass("ikls_pano-wrap"),console.log("setup",{instanceSettings:c,options:i}),void 0!==c.callbacks&&$.each(c.callbacks,function(e,t){N(e,t)}),void 0!==i.callbacks&&$.each(i.callbacks,function(e,t){N(e,t)}),!0!==c.debug&&!0!==i.debug||(_=!0),void 0!==c.zoom&&q(c.zoom),void 0!==c.lat&&X(c.lat),void 0!==c.lon&&X(c.lon),void 0!==i.zoom&&q(i.zoom),void 0!==i.lat&&X(i.lat),void 0!==i.lon&&X(i.lon),function(){var t={},n=e.sourceStack.length>=1?e.sourceStack[0].src:o.attr("src");return t.src=n,t.ikls_id=r,t.volume=e.options().muted?0:1,t.poster=e.options().poster,t}(),c=$(x).data("ikelos-pano-options"),function(){try{var n=B();u=new t.PerspectiveCamera(75,n.aspect,1,1100),d=new t.Scene;var i=new t.SphereGeometry(500,60,40);i.scale(-1,1,1);var r=new t.VideoTexture(x),o=new t.MeshBasicMaterial({map:r}),s=new t.Mesh(i,o);d.add(s),(h=new t.WebGLRenderer).setPixelRatio(window.devicePixelRatio),h.setSize(n.width,n.height),$(h.domElement).addClass("ikls_pano"),a.appendChild(h.domElement),p=h.domElement,l=p,$(p).on("pointerdown",z).on("pointermove",G).on("pointerup blur pointerout",V),window.addEventListener("resize",H),e.on("ikls_fullscreenchange",function(){H()}).on("ikls_resize",function(){H()}).on("ikls_error",function(){j(),$(p).hide()}),F("onBind",{vid:e,canvas:p}),F("onInitThree",{camera:u,scene:d,geometry:i,mesh:s,renderer:h,canvas:p})}catch(e){ee(e,"initTHREE")}}(),F("onSetup",{options:i,instanceSettings:c,currentCoords:J()})}function B(){var e=x.getBoundingClientRect(),t={width:Math.round(e.width),height:Math.round(e.height),boundingRect:e,aspect:56.25};return t.aspect=t.height&&t.height>0?t.width/t.height:56.25,t}function H(t){clearTimeout(m);var n=function(){var t=B();u.aspect=t.aspect,u.updateProjectionMatrix(),h.setSize(t.width,t.height),F("onResize",{vid:e,canvas:p,size:t,renderer:h})};n(),m=setTimeout(n,120)}function z(e){w=!0,A=e.clientX,R=e.clientY,C=T,L=S}function G(e){if(!0===w){var t=J();T=.1*(A-e.clientX)+C,S=.1*(R-e.clientY)+L,Q(t,"onPointerMove")}}
58function V(){w=!1}function W(){try{f=I(W),function(){if(!D)return;try{n.update()}catch(e){console.warn("TWEEN:updateTween:error",e)}}(),S=Math.max(-85,Math.min(85,S)),E=t.MathUtils.degToRad(90-S),M=t.MathUtils.degToRad(T),u.position.x=P*Math.sin(E)*Math.cos(M),u.position.y=P*Math.cos(E),u.position.z=P*Math.sin(E)*Math.sin(M),u.lookAt(0,0,0),h.render(d,u)}catch(e){j(),ee(e,"animate")}}function j(){k(f)}function q(e){var t=J();P=O(e,50),Q(t,"setZoom ")}function X(e){var t=J();S=O(e,0),Q(t,"setLat")}function Y(e){var t=J();T=O(e,0),Q(t,"setLon")}function J(){return{lat:S,lon:T,zoom:P}}function Z(){try{D=!0,v.start()}catch(e){console.warn("TWEEN:start:error",e)}}function K(){if(D)try{clearTimeout(g),g=void 0,D=!1,v.stop(),v=void 0}catch(e){console.warn("TWEEN:stop:error",e)}}function Q(e,t){var n=J(),i=n.lat!=e.lat||n.lon!=e.lon,r=n.zoom!=e.zoom,o=i||r,s=n.lon>e.lon?"left":"right",a=n.lat>e.lat?"down":"up",l=n.zoom>e.zoom?"in":"out",c={caller:t,currentCoords:n,prevCoords:e,didMove:o,didPan:i,didZoom:r,panDirX:n.lon!=e.lon?s:"na",panDirY:n.lat!=e.lat?a:"na",zoomDir:r?l:"na"};return o&&F("onMove",c),i&&function(e){F("onPan",e)}(c),r&&function(e){F("onZoom",e)}(c),c}function ee(e,t){try{(void 0!==t||void 0!==e.detail&&0===e.detail[0].indexOf("THREE."))&&(F("onError",{error:e,context:t,detail:e.detail}),j(),y.destroy())}catch(e){console.log("handleError:error:lol",e)}}return this.init=function(t){window.addEventListener("onError",ee,!1),U(),W(),F("onInit",{vid:e,options:t})},this.pause360=function(){j()},this.resume360=function(){W()},this.resize=H,this.panLeft=function(e){var t=J();T+=O(e),Q(t,"panLeft")},this.panRight=function(e){var t=J();T-=O(e),Q(t,"panRight")},this.panUp=function(e){var t=J();S-=O(e),Q(t,"panUp")},this.panDown=function(e){var t=J();S+=O(e),Q(t,"panDown")},this.zoomIn=function(e){var t=J();P+=O(e),Q(t,"zoomIn")},this.zoomOut=function(e){var t=J();P-=O(e),Q(t,"zoomOut")},this.setZoom=q,this.setLat=X,this.setLon=Y,this.setCoords=function(e,t,i){console.log("TWEEN: >>>>> setCoords",t,{newCoords:e,duration:i});let r=J();if(t){K();const t=()=>{console.log("TWEEN: it!"),r=J(),function(e,t,i){try{i=void 0!==i?i:1e3,void 0===v?((v=new n.Tween(e)).to(t,i),v.onUpdate(e=>{const t=J();X(e.lat),Y(e.lon),q(e.zoom),Q(t,"setCoords")}),v.onComplete(()=>{console.log("TWEEN: onComplete ... boop",g)}),Z()):(D=!1,v.stop(),v.to(t,i),Z())}catch(e){console.warn("TWEEN:setTween:error",e)}}(r,e,i)};D||void 0!==g?(clearTimeout(g),g=setTimeout(t,300)):t()}else K(),X(e.lat),Y(e.lon),q(e.zoom),Q(r,"setCoords")},this.getCoords=J,this.on=function(e,t){return N("on"+(e.charAt(0).toUpperCase()+e.slice(1)),t)},this.off=function(e){return N("on"+(e.charAt(0).toUpperCase()+e.slice(1)),void 0)},this.setCallback=N,this.setDebug=function(e){_=e},this.toggleInteractive=function(e){this.interactive=e},this.toggleInterface=function(e){this.interface=e},this.destroy=function(){j(),l.remove(),F("onDestroy",{vid:e,options:i})},this})}),define("ikelos/mobile",["ikelos"],function(e){e("plugin","mobile",function(e,t){return{init:function(){},toggleInteractive:function(e){},toggleInterface:function(e){},destroy:function(){}}})}),define("radical/module/video",["jquery","ikelos","ikelos/360video","ikelos/ui","ikelos/mobile","radical/component/console","radical/component/lazyload"],function(e,t,n,i,r,o,s){return o.log("radical/module/video::loaded"),function(e,n){if(o.log("radical/module/video::init",e,n),"scroll"==n.loadOn){s.loadOnScroll(e,!0,function(e,t){if(e)throw e})}return n.loadNow&&t(e),{destroy:function(e,n){if(n.loadNow){t(e).destroy()}o.log("radical/module/video::destroy",e,n)}}}}),define("radical/module/navhandler",["jquery","radical/component/console","radical/component/aria-popup","radical/component/analytics"],function(e,t,n,i){return t.log("radical/module/navhandler::loaded"),function(r,o){t.log("radical/module/navhandler::init");var s=e("#main_nav_wrap"),a=e("#main_nav");let l=0;var c=n(a,{type:"menu",callbacks:{onExpand:function(){l++,s.addClass("menuOpen"),i.trackEvent("hamburger menu","opened"),e("html").addClass("menu-open"),2===l&&e("html").addClass("didOpenMenu")},onCollapse:function(){s.removeClass("menuOpen"),i.trackEvent("hamburger menu","closed"),e("html").removeClass("menu-open")}}});return e("#main_nav_wrap").on("click",function(){$openSubnavDropdown=e('.sub_nav_dropdown_list[aria-hidden="false"]'),$openSubnavDropdown.length>=1&&$openSubnavDropdown.attr("aria-hidden","true")}).on("click",".main_nav_item",function(){e("#main_nav_toggle").length>0&&i.trackEvent("hamburger menu","link click",e(this).text()),i.trackEvent("main nav","link click",e(this).text())}),e("#main_logo").on("click",function(){i.trackEvent("main nav","link click","RadicalMedia")}),e("#main_nav_curtain, #main_nav_wrap").on("click",function(t){if(!["main_nav_curtain","main_nav_wrap","main_nav"].includes(e(t.target).attr("id")))return!0;t.preventDefault(),t.stopPropagation(),void 0!==c&&c.collapse()}),{destroy:function(){}}}}),define("radical/module/searchForm",["jquery","radical/component/console","radical/component/fancyLoadIn","radical/component/analytics","radical/component/global"],function(e,t,n,i,r){return function(o,s){t.log("radical/module/searchForm::init",s);var a=e(o),l=(e("body").hasClass("pagetype_home"),r.getItem("UAjammer").Venue,a.find("form")),c=l.attr("action"),u=a.find(".search_field"),d=a.find(".search_submit"),h=a.hasClass("ajax_search"),p=""!==s.resultsWrap?e(s.resultsWrap):void 0,f=a.children(".search_autofill_wrap"),m="",g="",v=!1,y=!0;function _(e){return""===e.replace(/\s+/g,"")}function x(n){t.log("search_for : ",n,l),function(){a.addClass("searching"),a.attr("aria-busy","true"),void 0!==p&&p.addClass("searching");d.attr("disabled","disabled")}
58(),"true"===s.useFilters&&(g=M())&&g.length>=1&&(v=!0);var r={},o="";v?(o=c+"?s="+encodeURIComponent(n)+"&term="+encodeURIComponent(g),r={s:n,async:!0,term:encodeURIComponent(g)}):(o=c+"?s="+encodeURIComponent(n),r={s:n,async:!0}),i.trackPage(o),e.ajax({method:"GET",url:c,data:r,dataType:"json",success:function(e){t.log(e),w(e.markup),"history"in window&&"pushState"in history&&window.history.pushState("string","Search",o),b(),T(),S()},error:function(e){t.log("oops! something went wrong",e),w('<div class="fancy_fade_in fake_p">Oops! Something went wrong. Please adjust your search parameters and try again.</div>'),b(),T(),S()}})}function b(){a.removeClass("searching"),a.attr("aria-busy","false"),void 0!==p&&p.removeClass("searching"),d.removeAttr("disabled")}function w(e){!function(){p.height();p.addClass("loading").find(".fancy_fade_in").removeClass("loaded")}(),setTimeout(function(){p.html(e),p.removeClass("loading"),n.fancyLoadIn(),b()},300)}function T(){var t=e(".sub_nav_dropdown_current");t.length>0&&t.removeClass("subnav_loader")}function S(){console.log("removeAutoFillLoader"),f.removeClass("autofill_loader")}function E(t){var n,i=e(".search_autofill_wrap"),r=i.children(),o=i.children(".current");if(y=!1,0!==r.length)switch(0===o.length&&(y=!0),t){case"up":y||(0===(n=o.prev()).length?(u.val(m),o.removeClass("current"),y=!0):(n.addClass("current"),o.removeClass("current"),u.val(n.text()),y=!1));break;case"down":y?((n=r.first()).addClass("current"),u.val(n.text()),y=!1):(n=o.next()).length>0&&(n.addClass("current"),o.removeClass("current"),u.val(n.text()))}}function M(){var t="",n=e(".sub_nav_dropdown.search_filters");n.length>0&&(t=n.find(".sub_nav_dropdown_current .current_option").data("item"));return t}return d.on("click.search_submit touchstart.search_submit",function(e){_(u.val())&&(e.preventDefault(),u.focus(),T())}),u.on("keyup.search_field",function(e){switch(e.keyCode){case 38:E("up");break;case 40:E("down")}}),a.on("submit",function(n){if(u.val(e.trim(u.val())),S(),_(u.val()))return T(),S(),!1;t.log("searchForm submitted"),f.children().remove(),h?(n.preventDefault(),x(u.val())):"true"===s.useFilters&&((g=M())&&g.length>=1&&(v=!0),v?a.find("#_hiddenSearchFilterTerm").val(g):a.find("#_hiddenSearchFilterTerm").val(""))}),e("body").on("click",function(e){a.addClass("hide_autofill")}),e("#big_ol_search input").click(function(e){e.stopPropagation()}),e("#big_ol_search .search_autofill_wrap").click(function(e){e.stopPropagation()}),{destroy:function(e,t){a.off("submit"),u.off("keyup.search_field"),d.off("click.search_submit touchstart.search_submit")}}}}),define("radical/module/subnavhandler",["jquery","radical/component/console"],function(e,t){return function(n,i){var r=e("#sub_nav"),o=e("#sub_sub_nav"),s=e(".action-sub_nav_toggle");function a(e,t,n,i){(i=void 0!==i?i:!e.hasClass("open"))?(e.addClass("open"),n.attr({"aria-expanded":"true"}),t.attr({"aria-hidden":"false"})):(e.removeClass("open"),n.attr({"aria-expanded":"false"}),t.attr({"aria-hidden":"true"}))}if(void 0===r.data("initialtoggled")){r.data("initialtoggled",!0);var l=r.hasClass("default_open");a(r,o,s,l)}return e("body").on("click.subnavtoggle touchstart.subnavtoggle",".action-sub_nav_toggle",function(e){e.preventDefault(),a(r,o,s)}),{destroy:function(n,i){t.log("radical/module/subnavhandler::destroy"),e("body").off("click.subnavtoggle touchstart.subnavtoggle",".action-sub_nav_toggle")}}}}),define("radical/module/subnavDropdown",["jquery","radical/component/console","radical/component/module/registry","radical/component/analytics","radical/component/aria-popup"],function(e,t,n,i,r){return function(n,o){t.log("radical/module/subnavhandler::init",o,n);var s,a=e(n),l=a.parents(".sub_nav_dropdown").first(),c=l.find(".sub_nav_dropdown_current"),u=l.find(".sub_nav_dropdown_list"),d=(l.parent(),a.parent().find(".sub_nav_dropdown_curtain")),h=r(a,{callbacks:{onExpand:function(){},onCollapse:function(){}}});return d.on("click",function(){h.collapse()}),s=0===window.location.pathname.indexOf("/work")?"work section":window.location.pathname.indexOf("/directors")>=0?"directors section":0===window.location.pathname.indexOf("/search")?"search page":"other",a.on("click.sub_nav_dropdown_item touchstart.sub_nav_dropdown_item",".sub_nav_dropdown_item",function(t){t.preventDefault(),function(t){var n=e(t).children("a").text(),i=u.children(".current"),r=c.children(".current_option");if(void 0===o.noRedirect)c.text(n);else{var s=e(t).data("item");r.data("item",s),r.text(n),i.removeClass("current"),e(t).addClass("current")}}(this);var n=e(this).text();if(void 0===o.noRedirect){c.addClass("subnav_loader");var r=e(this).children("a"),a=e(r).attr("href");i.trackEvent("dropdown menu","selected",s,n),window.location=a}else{i.trackEvent("dropdown menu","search",s,n);var l=e("#big_ol_search");l.length>0&&(l.find("#big_ol_search-input").focus(),l.submit())}h.collapse()}),e("#big_ol_search .search_autofill_wrap").click(function(e){e.stopPropagation()}),{}}}),define("radical/module/caret",["jquery","radical/component/console","radical/component/global","radical/component/analytics"],function(e,t,n,i){return t.log("radical/module/caret::loaded"),function(n,r){t.log("radical/module/caret::init");var o=e(n);if(void 0!==r.sectionID){var s=e(window).height(),a=e("#"+r.sectionID);if(a.height()+a.offset().top<=s)return o.remove(),{}}return e(window).on("scroll.caret",function(){o.remove(),e(window).off("scroll.caret")}),o.on("click",function(t){t.preventDefault(),e("html, body").animate({scrollTop:e(window).scrollTop()+400},300),i.trackEvent("clicked caret","yarp")}),{destroy:function(e,n){t.log("radical/module/caret::destroy")}}}}),define("radical/module/gallery",["jquery","ikelos/ui","ikelos","radical/component/console","radical/component/global","radical/component/lazyload","radical/component/scrollJammer","radical/component/analytics","radical/component/debounce"],function(e,t,n,i,r,o,s,a,l){var c,u={attractTimer:void 0,isAutoplayTimer:void 0,autoplayAdvanceTimer:void 0,deepID:-1,closeTimeout:void 0,isAttract:!1,isStarted:!1,hasVids:!1,isPhone:!1,imgSingleton:!1,ikelosSingleton:!1,ikelosSingletonEl:void 0,currentIdx:0,currentEl:void 0,currentVidTitle:void 0,vidTracker:{galleryTitle:e("title").text(),vids:[],vidCount:0}},d="gallery:";return function(t,h){if(!0===r.getItem("edit_mode"))return{destroy:function(e,t){i.log("radical/module/gallery::destroy",e,t)}};i.log("radical/module/gallery::init",t,h),function(){for(var t=e(".gallery_nav_item .radical_module"),n=0;n<t.length;n++)o.load(t[n],!1,function(e,t){if(e)throw e})}(),v(),u.currentEl=e(t).find(".gallery_canvas_item:first");var p=e(t).find(".gallery_nav_item:first"),f=e("#gallery_canvas .gallery_canvas_poster.selected");if(f.length>0){var m=f.attr("id");u.deepID=m.split("_")[1];var g="#gallery_nav_"+u.deepID;(p=e(g)).length>0?(p.addClass("selected"),u.currentIdx=e(".gallery_nav_item").index(p)):p=e(t).find(".gallery_nav_item:first")}function v(){i.log(`${d} gallery::startAttract`);var t=e(".gallery_canvas_poster.selected");if(0===t.length&&(t=e(".gallery_canvas_poster:not(.lowres_parent):first")),0===t.length)return!1;o.load(t,!1,function(n){if(n)throw n;t.addClass("current"),$lowres=e(".gallery_canvas_poster.lowres_parent"),$lowres.removeClass("current"),setTimeout(function(){$lowres.remove()},2e3),e(".gallery_canvas_poster").length>1&&!h.deeplink&&(u.isAttract=!0,y(),_(t))})}function y(){clearTimeout(u.attractTimer),u.attractTimer=setTimeout(function(){if(u.isAttract){var t=e(".gallery_canvas_poster.current").next(".gallery_canvas_poster");0===t.length&&(t=e(".gallery_canvas_poster").first(".gallery_canvas_poster")),t.children(".poster_cover").hasClass("loaded")?(e(".gallery_canvas_poster.current").removeClass("current"),t.addClass("current")):t.hasClass("loading")||(t=e(".gallery_canvas_poster").first(".gallery_canvas_poster")).children(".poster_cover").hasClass("loaded")&&(e(".gallery_canvas_poster.current").removeClass("current"),t.addClass("current")),y()}},3500)}function _(t){o.load(t,!1,function(n){if(n)throw n;var i=t.next(".gallery_canvas_poster");0===i.length&&(i=e(".gallery_canvas_poster:not(.lowres_parent):first")),i.children(".poster_cover").hasClass("loaded")||i.children(".poster_cover").hasClass("loading")||_(i)})}function x(){if(!(void 0===u.currentEl||u.currentEl.length<=0)){var e=u.currentEl.data("media");-1!=e.indexOf("video")&&u.ikelosSingleton?u.ikelosSingleton.pause():-1!=e.indexOf("image")&&clearTimeout(u.autoplayAdvanceTimer)}}function b(t){switch(t.type){case"img":break;case"video":var n=e(u.ikelosSingleton.dom[0]).parent();null==n&&(n=t.$asset),u.ikelosSingleton.on("ikls_play",function(){clearTimeout(u.isAutoplayTimer),n.addClass("autoplaying").removeClass("probably_not_autoplaying")}),u.ikelosSingleton.on("ikls_pause",function(){u.isAutoplayTimeout=setTimeout(function(){u.ikelosSingleton&&!u.ikelosSingleton.isPlaying()&&n.addClass("probably_not_autoplaying")},500)}),u.ikelosSingleton.on("ikls_ended",function(){clearTimeout(u.autoplayAdvanceTimer),clearTimeout(u.isAutoplayTimer),n.removeClass("probably_not_autoplaying").addClass("autoplaying"),u.autoplayAdvanceTimer=setTimeout(function(){w()||n.addClass("probably_not_autoplaying")},50)})}}function w(){A(e(".gallery_nav_item.current").next(".gallery_nav_item"))}function T(){var e,t,n,i=(e=u.ikelosSingleton.emitterObject[0],t=e.currentTime,n=e.duration,Math.round(100*t/n));return 25*Math.round(i/25)}function S(){console.warn("setupAnalytics!!");var t=u.ikelosSingleton.plugins.ui.ui.options.ui_callbacks;u.vidTracker.vidCount=e(".gallery_nav_item.video_thumb").length;var n=/\/directors\//i.test(window.location.pathname)?"reel":"gallery";u.ikelosSingleton.on("ikls_play",function(t){var i,r;u.currentVidTitle=(i=e(".gallery_nav .gallery_nav_item:eq("+u.currentIdx+") .tile_title:first()").text().trim(),r
58=i.replace(/&/g,"&").replace(/ /g," ").replace(/\s+/g," "),console.log({itemName:r,itemTitle:i}),r.length>2?r:document.title),void 0===u.vidTracker.vids[u.currentIdx]&&(u.vidTracker.vids[u.currentIdx]={title:u.currentVidTitle,played:!0,completed:!1,maxViewed:0},a.trackEvent("video general","played"),a.trackEvent(n+" general","played "+u.vidTracker.vids.length),a.trackEvent("video detail",u.currentVidTitle,"played","in "+n),a.trackEvent(n+" detail",u.vidTracker.galleryTitle,"played "+u.vidTracker.vids.length+"/"+u.vidTracker.vidCount),u.vidTracker.vids.length===u.vidTracker.vidCount&&a.trackEvent(n+" general","played all"))}),u.ikelosSingleton.on("ikls_timeupdate",function(e){var t=T();t>0&&void 0!==u.vidTracker.vids[u.currentIdx]&&t>u.vidTracker.vids[u.currentIdx].maxViewed&&(u.vidTracker.vids[u.currentIdx].maxViewed=t,t>=90&&!u.vidTracker.vids[u.currentIdx].completed&&(u.vidTracker.vids[u.currentIdx].completed=!0,a.trackEvent("video general","completed")),a.trackEvent("video detail",u.currentVidTitle,"viewed % >= "+t,"in "+n))}),u.ikelosSingleton.on("ikls_fullscreenchange",function(t){e(".ikls_is-fullscreen").length>=1&&(a.trackEvent("video general","fullscreened"),a.trackEvent("video detail",u.currentVidTitle,"fullscreened","in "+n))}),t.setVolume=l(function(e){void 0!==u.vidTracker.vids[u.currentIdx]&&(u.vidTracker.vids[u.currentIdx].initialVolumeChange&&(a.trackEvent("video general","volume change"),a.trackEvent("video detail",u.currentVidTitle,"volume change")),u.vidTracker.vids[u.currentIdx].initialVolumeChange=!0)},500,!1),e("body").on("click",".ikls_btn[download]",function(e){a.trackEvent("video general","downloaded"),a.trackEvent("video detail",u.currentVidTitle,"downloaded","in "+n)}).on("click",".ikls_settings_toggle",function(){a.trackEvent("video general","settings opened"),a.trackEvent("video detail",u.currentVidTitle,"settings opened","in "+n)}).on("click",".ikls_quality_option",function(){var t=e(this).text().replace("video quality","");a.trackEvent("video general","quality changed",t),a.trackEvent("video detail",u.currentVidTitle,"quality changed : "+t,"in "+n)}).on("click",".ikls_scrubber_wrap",function(){a.trackEvent("video general","scrubbed"),a.trackEvent("video detail",u.currentVidTitle,"scrubbed")})}function E(){i.warn(`${d}:GOOSE`,{test:u.isPhone&&u.hasVids,el:u.ikelosSingletonEl}),u.isPhone&&u.hasVids&&u.ikelosSingletonEl.css({opacity:1}).addClass("ikls-phone-inited")}function M(r,o){if(i.log(`${d}populateIkelosSingleton: ...`),c.Mobile||r.attr("poster",""),u.ikelosSingleton)i.log(`${d}populateIkelosSingleton: NO need to populate the singleton!`);else{i.log(`${d}populateIkelosSingleton: we need to populate the singleton!`),u.ikelosSingletonEl=e('<div class="gallery_canvas_item current ikelos_singleton loader" width="100%" height="100%" />');let r=u.isPhone?"":"ui";u.ikelosSingletonEl.append(`<video crossorigin="anonymous" id="ikelos_singleton-vid" class="ikelos_singleton-vid abs_fill" data-plugins="${r}" controls />`),e(t).find("#gallery_canvas_media").prepend(u.ikelosSingletonEl),u.ikelosSingletonEl.css({opacity:1}),u.ikelosSingleton=n("#ikelos_singleton-vid"),S(),u.ikelosSingleton.on("ikls_canplay",function(){u.ikelosSingletonEl.removeClass("loader"),u.ikelosSingleton.play()})}u.ikelosSingletonEl.addClass("current loader"),u.ikelosSingleton.destroyPlugins(),i.log(`${d}populateIkelosSingleton: [populateVideo]`,{html:r[0].outerHTML}),u.ikelosSingleton.cloneToObject(r[0].outerHTML,{add_attributes:["crossorigin"],add_data:["title","srcset","ikelosuioptions","type"],source:!0}),i.log(`${d}populateIkelosSingleton: <ikelosSingleton>`,u.ikelosSingleton),u.ikelosSingleton.parseConfig(r[0].outerHTML,{add_data:["title","srcset","ikelosuioptions","type"],source:!0}),u.ikelosSingleton.parseSource(null,{restart:!0}),u.isPhone&&(E(),console.warn(`${d}populateIkelosSingleton: Inhibit, ui and 360video for phone`),u.ikelosSingleton.disablePlugin("ui"),u.ikelosSingleton.disablePlugin("360video")),console.warn(`${d}populateIkelosSingleton: WE ARE CALLING INITPLUGINS RIGHT NOW`),u.ikelosSingleton.initPlugins(),u.ikelosSingleton.load(),u.ikelosSingleton.currentTime(0),u.ikelosSingleton.play(),u.isPhone&&u.ikelosSingleton.controls(!0),o.alreadyLoaded||h.deeplink||b(o)}function A(t){if(t.length<=0)return!1;i.log(`${d} loadItemFromNav`,{$navItem:t}),s.scrollTo("#rm_uber_wrap");var n=t.hasClass("current");u.currentIdx=e(".gallery_nav_item").index(t),i.log(`${d}
58 [Start Gallery]`,u.currentIdx),u.isStarted=!0,u.isAttract=!1,clearTimeout(u.attractTimer),e("#gallery_canvas_posters").addClass("hidden"),e("#gallery_canvas_media").addClass("active"),e(".gallery_canvas_poster").removeClass("current"),h.deeplink&&-1!=u.deepID&&a!=u.deepID&&(h.deeplink=!1);var r=!c.Mobile,a=t.attr("id").split("_")[2],l="#media_"+a;u.currentEl=e(".gallery_canvas_item"+l),e(".gallery_canvas_item.current-item").removeClass("current-item"),u.currentEl.addClass("current-item"),e(".gallery_nav_item.current").removeClass("current"),e(".gallery_nav_item.selected").removeClass("selected"),t.addClass("current");var p=e(".gallery_nav_item.current").next(".gallery_nav_item"),f=e(".gallery_nav_item.current").prev(".gallery_nav_item");R(p,"#gallery_right","hide_button"),R(f,"#gallery_left","hide_button"),n||x();let m="video"===t.data("config").type,g=!0===u.currentEl.data("template-loaded"),v=!!u.ikelosSingleton;return function(t){try{if(e(".gallery_nav figure").length<=1)return;var n=t.find(".asset_href").attr("href"),i=t.find("h2.tile_title");if(i.length<=0)return;var r=i.html(),o=void 0===r?"":r.replace(/<br ?\/?>/gi," ").replace(/<br>/gi," ").replace(/&/g,"&").replace(/ /g," ").replace(/\s+/g," ").trim();if(console.log("myTitleText",o),o.length<=0)return;var s=document.title.split(" : ");s[0]='"'+o+'"',s=s.join(" : "),e("title").html(s),history.pushState(null,s,n)}catch(e){}}(t),m&&n&&g&&v?(i.log(`${d} loadItemFromNav:[1]`),u.ikelosSingleton.play()):m&&g?(i.log(`${d} loadItemFromNav:[2] already loaded template!`,u.currentEl.find("video")),M(u.currentEl.find("video"),u.currentEl)):m&&!g?(i.log(`${d} loadItemFromNav:[3] need to load the template!`),o.load(u.currentEl,r,function(e,t){if(e)throw e;M(t.$asset,t)},!1)):(i.log(`${d} loadItemFromNav:[4] not video or whatever`),o.load(u.currentEl,r,function(e,t){if(e)throw e;t.alreadyLoaded||h.deeplink||b(t)})),!1}function R(t,n,i){0===t.length?e(n).addClass(i):e(n).removeClass(i)}return c=r.getItem("UAjammer"),i.log(`${d} UAjammer`,c),u.isPhone="phone"===c.Venue,u.hasVids=e(t).find(".gallery_nav_item.video_thumb").length>=1,u.isPhone&&u.hasVids&&(i.log(`${d} mobile:phone`),u.ikelosSingletonEl=e('<video id="ikelos-placeholder-vid" class="abs_fill ikls-phone" data-plugins="mobile" tabindex="-1" width="100%" height="100%" controls style="opacity:0;z-index:100;" />'),e("#gallery_canvas_posters").after(u.ikelosSingletonEl),u.ikelosSingleton=n("#ikelos-placeholder-vid"),e("body").on("click","#ikelos-placeholder-vid:not(.ikls-phone-inited)",function(t){i.log(`${d}:click:!!!!!!!!`,t.target.id,t.target.classList),e(this).addClass("ikls-phone-inited"),E(),A(e(".gallery_nav_item").eq(u.currentIdx))}),u.ikelosSingletonEl.on("touchstart",function(t){e(this).data("touchstarted",Date.now())}).on("touchend",function(t){Date.now()-e(this).data("touchstarted")<250&&u.ikelosSingletonEl.trigger("click")})),1==e(".gallery_nav_item").length&&e(".gallery_nav#view").hide(),e(".gallery_nav_item").on("click",function(t){i.log(`${d} .gallery_nav_item:click`),t.preventDefault(),clearTimeout(u.autoplayAdvanceTimer),A(e(this))}),e(".gallery_start").on("click",function(t){i.log(`${d} .gallery_start:click`),A(e(".gallery_nav_item").eq(u.currentIdx))}),e("#gallery_close").on("click",function(t){u.isStarted=!1,i.log("galleryStop"),x(),e("#gallery_canvas_posters").removeClass("hidden"),e("#gallery_canvas_media").removeClass("active"),e(".play_reel_cta-copy").text("resume reel"),v()}),e("#gallery_right").on("click",function(e){w()}),e("#gallery_left").on("click",function(t){A(e(".gallery_nav_item.current").prev(".gallery_nav_item"))}),e(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",function(){document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement||e("body").removeClass("fullscreen_gallery")}),e("#gallery_canvas_media").mousemove(function(t){clearTimeout(u.closeTimeout),e(".gallery_overlay").addClass("show_button"),u.closeTimeout=setTimeout(function(){e(".gallery_overlay").removeClass("show_button")},2500)}),{destroy:function(e,t){i.log("radical/module/gallery::destroy",e,t)}}}}),define("radical/component/fingaFingaz",["jquery","radical/component/console"],function(e,t){"use strict";var n,i,r,o,s,a,l,c,u,d,h,p,f,m,g,v,y,_;return g={inited:!1,start:{x:0,y:0},prevPos:{x:0,y:0},pos:{x:0,y:0},step:{x:0,y:0},dist:{x:0,y:0},startTime:0,endTime:0,duration:0,firstTouch:!0,threshold:75,speed:0,fingers:1,tap:!1,swipe:!1,swipeH:!1,swipeV:!1,scollTimer:void 0},v=document,y=!!("ontouchstart"in window)||!!("onmsgesturechange"in window),_="msPointerEnabled"in window.navigator&&!v.implementation.hasFeature("Event","4.0"),g.getCoords=function(e){switch(!0){case void 0!==e.pageX:return{x:e.pageX,y:e.pageY};case void 0!==e.originalEvent&&void 0!==e.originalEvent.pageX:return{x:e.originalEvent.pageX,y:e.originalEvent.pageY};case void 0!==e.touches&&void 0!==e.touches[0]:return{x:e.touches[0].pageX,y:e.touches[0].pageY};case void 0!==e.originalEvent&&void 0!==e.originalEvent.touches:return{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY};default:return{x:0,y:0}}},g.trigger=function(t,n){v.dispatchEvent(n),void 0!==e&&e(t.target).trigger(n.type)},g.init=function(e){if(!g.inited&&(g.inited=!0,y&&v.addEventListener))return v.addEventListener("touchstart",n,!1),v.addEventListener("touchmove",i,!1),v.addEventListener("touchend",r,!1),v.addEventListener("gesturestart",o,!1),v.addEventListener("gestureend",s,!1),window.navigator.msPointerEnabled&&(v.addEventListener("MSPointerDown",n,!1),v.addEventListener("MSPointerMove",i,!1),v.addEventListener("MSPointerUp",r,!1)),_&&m(),a=new CustomEvent("swipeup"),l=new CustomEvent("swiperight"),c=new CustomEvent("swipedown"),u=new CustomEvent("swipeleft"),v.addEventListener("swipeup",d,!1),v.addEventListener("swiperight",h,!1),v.addEventListener("swipedown",p,!1),v.addEventListener("swipeleft",f,!1),e=void 0!==e?e:jQuery,g},n=function(e){if(!_||"touch"==e.pointerType){var t=g.getCoords(e);g.fingers=1,g.start.y=t.y,g.start.x=t.x,g.prevPos.y=1*g.start.y,g.prevPos.x=1*g.start.x,g.pos.y=1*g.start.y,g.pos.x=1*g.start.x,g.startTime=(new Date).getTime()}},i=function(e){if(!_||"touch"==e.pointerType){var t=g.getCoords(e);if(void 0===t.y)return!0;g.pos.y=t.y,g.pos.x=t.x,g.step.y=g.prevPos.y-g.pos.y,g.step.x=g.prevPos.x-g.pos.x,g.prevPos.y=1*g.pos.y,g.prevPos.x=1*g.pos.x}},r=function(e){_&&"touch"!=e.pointerType||(g.endTime=(new Date).getTime(),g.duration=g.endTime-g.startTime,g.fingers<2&&(g.firstTouch&&(g.firstTouch=!1),g.dist.y=g.start.y-g.pos.y,g.dist.x=g.start.x-g.pos.x,g.tap=Math.abs(g.dist.x)>g.threshold&&Math.abs(g.dist.y)>g.threshold,g.swipe=!g.tap,Math.abs(g.dist.x)>g.threshold?(g.swipeH=g.dist.x>0?"left":"right","left"==g.swipeH&&g.trigger(e,u),"right"==g.swipeH&&g.trigger(e,l)):g.swipeH=!1,Math.abs(g.dist.y)>g.threshold?(g.swipeV=g.dist.y>0?"up":"down","up"==g.swipeV&&g.trigger(e,a),"down"==g.swipeV&&g.trigger(e,c)):g.swipeV=!1))},o=function(e){g.fingers=2},s=function(e){g.fingers=2},d=function(e){},h=function(e){},p=function(e){},f=function(e){},m=function(){!function(){function e(e,t){t=t||{bubbles:!0,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");
58return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}()},g}),define("radical/component/sliderBasic",["jquery","radical/component/console","radical/component/global","radical/component/fingaFingaz"],function(e,t,n,i){t.log("=> radical/component/sliderBasic::loaded");window;var r=window.fingaFingaz;void 0!==r?r.init(e):r={};var o,s,a=(s='<div class="_sb_nav_wrap"><div class="_sb_slide_indicator_wrap"><span class="_sb_slide_indicator _sb_current_slide"></span> / <span class="_sb_slide_indicator _sb_total_slide"></span></div><div class="_sb_nav clearfix">[NAV_CONTENT]</div></div>',(o={}).buildMe=function(t,n){n=void 0!==n?n:{};var i,o,a,l,c,u,d,h,p=t,f=p.find("._sliderBasic_wrap"),m=f.find("> *").length,g=m,v={onIdx:0,maxIdx:g-1,navWidth:0,navPageWidth:0,navPages:1,onNavPage:0},y=(void 0===n.buildNextPrev||n.buildNextPrev,void 0!==n.navType?n.navType:"thumbs"),_=void 0!==n.buttonPrevMarkup?n.buttonPrevMarkup:"",x=void 0!==n.buttonNextMarkup?n.buttonNextMarkup:"",b=void 0!==n.navMarkup?n.navMarkup:"",w=void 0!==n.navContentMarkup?n.navContentMarkup:"";g<2||(u=function(){if("thumbs"===y)for(var e=0;e<g;e++)w+='<div class="_sb_thumb [CLASS]" style="background-image:url([SRC]);"></div>'.replace("[SRC]","").replace("[CLASS]","");b=s.replace("[NAV_CONTENT]",w),p.append(b),i=p.find("._sb_nav_wrap"),(c=p.find("._sb_current_slide")).text(v.onIdx+1),p.find("._sb_total_slide").text(g),setTimeout(function(){i.addClass("showMe")},10),o=i.find("._sb_nav"),a=o.find("._sb_thumb"),l=a.outerWidth()+2.5*parseInt(a.css("margin-left")),v.navWidth=l*(m+1),a.first().addClass("showMe"),p.append('<span class="_sb_prev _sb_nextPrev">'+_+'</span><span class="_sb_next _sb_nextPrev">'+x+"</span>"),i.append('<span class="_sb_prev _sb_nav_nextPrev">'+_+'</span><span class="_sb_next _sb_nav_nextPrev">'+x+"</span>"),p.addClass("_sb_items_"+m),d()},d=function(){a.on("click",function(t){t.preventDefault(),v.showSlide(e(this).index())}),p.find("._sb_nextPrev").on("click",function(t){t.preventDefault(),e(this).hasClass("_sb_next")?v.next():v.prev()}),e(window).on("keyup",function(e){var t=e.keyCode||e.which;39==t&&v.next(),37==t&&v.prev()}),f.on("swiperight",function(e){v.prev()}).on("swipeleft",function(e){v.next()}).on("touchstart",function(e){f.addClass("touched")}).on("touchmove",function(e){"right"!=r.swipeH&&"left"!=r.swipeH||e.preventDefault();var t=1*f.css("margin-left").replace("px","")-r.step.x;f.css({"margin-left":t+"px"})}).on("touchend",function(e){f.removeClass("touched")}),p.find("._sb_nav_nextPrev").on("click",function(t){t.preventDefault(),e(this).hasClass("_sb_next")?v.navNext():v.navPrev()}),i.on("swiperight",function(e){v.navPrev()}).on("swipeleft",function(e){v.navNext()}).on("touchstart",function(e){o.addClass("touched")}).on("touchmove",function(e){"right"!=r.swipeH&&"left"!=r.swipeH||e.preventDefault()}).on("touchend",function(e){o.removeClass("touched")}),h(),e(window).on("resize",function(){h()}),p.addClass("_sb_ready")},h=function(){v.navWidth>p.width()?(i.removeClass("no_nav"),v.navPages=Math.ceil(v.navWidth/p.width())-1,v.navPageWidth=v.navWidth/(v.navPages+1)):i.addClass("no_nav")},v.showSlide=function(e){var t=100*e*-1,n=e*l;v.onIdx=e,f.css({"margin-left":t+"%"}),c.text(v.onIdx+1),a.removeClass("showMe"),a.eq(e).addClass("showMe");for(var i=1;i<100;i++)if(v.navPageWidth*i>n){v.onNavPage=i-1;break}},v.next=function(){var e=v.onIdx+1>v.maxIdx?0:v.onIdx+1;v.showSlide(e)},v.prev=function(){var e=v.onIdx-1<0?v.maxIdx:v.onIdx-1;v.showSlide(e)},v.navNext=function(){var e=v.onNavPage+1>v.navPages?0:v.onNavPage+1;v.onNavPage=e,o.css({"margin-left":e*v.navPageWidth*-1+"px"})},v.navPrev=function(){var e=v.onNavPage-1<0?v.navPages:v.onNavPage-1;v.onNavPage=e,o.css({"margin-left":e*v.navPageWidth*-1+"px"})},u(),this.gal=v)},o);return{init:function(){return t.log("radical/component/sliderBasic::init",e.fn.jquery),a},destroy:function(){t.log("radical/component/sliderBasic::destroy",e.fn.jquery)}}}),define("radical/module/slider",["jquery","radical/component/console","radical/component/sliderBasic"],function(e,t,n){return t.log("radical/module/slider::loaded"),function(i,r){return t.log("radical/module/slider::init"),(n=n.init()).buildMe(e(i),{navType:"none",buttonPrevMarkup:'<svg role="presentation" class="rm_icon rm_icon_leftchevron"><use xlink:href="/img/icons/symbol/svg/sprite.symbol.svg#rm_icon_leftchevron"/></svg>',buttonNextMarkup:'<svg role="presentation" class="rm_icon rm_icon_rightchevron"><use xlink:href="/img/icons/symbol/svg/sprite.symbol.svg#rm_icon_rightchevron"/></svg>'}),{destroy:function(e,n){t.log("radical/module/slider::destroy")}}}}),define("radical/component/faderBasic",["jquery","radical/component/console","radical/component/global","radical/component/fingaFingaz"],function(e,t,n,i){t.log("=> radical/component/faderBasic::loaded");window;var r=i;void 0!==r?r.init(e):r={};var o,s,a=(s='<div class="_fb_nav_wrap"><div class="_fb_slide_indicator_wrap"><span class="_fb_slide_indicator _fb_current_slide"></span> / <span class="_fb_slide_indicator _fb_total_slide"></span></div><div class="_fb_nav clearfix">[NAV_CONTENT]</div></div>',(o={}).buildMe=function(t,n){n=void 0!==n?n:{};var i,o,a,l,c,u,d,h,p=t,f=p.find("._faderBasic_wrap"),m=f.find("> *"),g=m.length,v=g,y={onIdx:0,maxIdx:v-1,navWidth:0,navPageWidth:0,navPages:1,onNavPage:0,hasFocus:!1},_=(void 0===n.buildNextPrev||n.buildNextPrev,void 0!==n.navType?n.navType:"thumbs"),x=void 0!==n.buttonPrevMarkup?n.buttonPrevMarkup:"",b=void 0!==n.buttonNextMarkup?n.buttonNextMarkup:"",w=void 0!==n.navMarkup?n.navMarkup:"",T=void 0!==n.navContentMarkup?n.navContentMarkup:"";v<2||(u=function(){if(m.eq(y.onIdx).addClass("_fb_activeSlide"),"thumbs"===_)for(var e=0;e<v;e++)T+='<div class="_fb_thumb [CLASS]" style="background-image:url([SRC]);"></div>'.replace("[SRC]","").replace("[CLASS]","");w=s.replace("[NAV_CONTENT]",T),p.append(w),i=p.find("._fb_nav_wrap"),c=p.find("._fb_current_slide"),m.eq(y.onIdx).hasClass("theme_dark")?c.addClass("light_numbers"):c.removeClass("light_numbers"),c.text(y.onIdx+1),p.find("._fb_total_slide").text(v),setTimeout(function(){i.addClass("showMe")},10),o=i.find("._fb_nav"),a=o.find("._fb_thumb"),l=a.outerWidth()+2.5*parseInt(a.css("margin-left")),y.navWidth=l*(g+1),a.first().addClass("showMe"),p.append(`\n\t\t\t\t\t\t<span class="_fb_prev _fb_nextPrev" role="button" aria-label="previous slide">${x}</span>\n\t\t\t\t\t\t<span class="_fb_next _fb_nextPrev" role="button" aria-label="next slide">${b}</span>\n\t\t\t\t\t`),i.append(`\n\t\t\t\t\t\t<span class="_fb_prev _fb_nav_nextPrev" role="button" aria-label="nav previous">${x}</span>\n\t\t\t\t\t\t<span class="_fb_next _fb_nav_nextPrev" role="button" aria-label="nav next">${b}</span>\n\t\t\t\t\t`),p.addClass("_fb_items_"+g),d(),"function"==typeof n.onBuild&&n.onBuild()},d=function(){a.on("click",function(t){t.preventDefault(),y.showSlide(e(this).index())}),p.find("._fb_nextPrev").on("click",function(t){t.preventDefault(),e(this).hasClass("_fb_next")?y.next():y.prev()}),e(window).on("keyup",function(e){if(y.hasFocus){var t=e.keyCode||e.which;39==t&&y.next(),37==t&&y.prev()}}),f.on("mouseenter focus click",function(){y.hasFocus=!0}).on("mouseleave blur",function(){y.hasFocus=!1}).on("swiperight",function(e){y.prev()}).on("swipeleft",function(e){y.next()}).on("touchmove",function(e){"right"!=r.swipeH&&"left"!=r.swipeH||e.preventDefault()}),p.find("._fb_nav_nextPrev").on("click",function(t){t.preventDefault(),e(this).hasClass("_fb_next")?y.navNext():y.navPrev()}),i.on("swiperight",function(e){y.navPrev()}).on("swipeleft",function(e){y.navNext()}).on("touchstart",function(e){o.addClass("touched")}).on("touchmove",function(e){"right"!=r.swipeH&&"left"!=r.swipeH||e.preventDefault()}).on("touchend",function(e){o.removeClass("touched")}),h(),e(window).on("resize",function(){h()}),p.addClass("_fb_ready")},h=function(){y.navWidth>p.width()?(i.removeClass("no_nav"),y.navPages=Math.ceil(y.navWidth/p.width())-1,y.navPageWidth=y.navWidth/(y.navPages+1)):i.addClass("no_nav")},y.showSlide=function(e){y.onIdx=e,f.find("._fb_activeSlide").removeClass("_fb_activeSlide");const t=m.eq(y.onIdx),n=`${t.width()}/${t.height()}`;f.css({"aspect-ratio":n}),f.find("._fb_activeSlide").removeClass("_fb_activeSlide"),t.addClass("_fb_activeSlide"),m.eq(y.onIdx).hasClass("theme_dark")?p.find("._fb_current_slide").addClass("light_numbers"):p.find("._fb_current_slide").removeClass("light_numbers"),c.text(y.onIdx+1),a.removeClass("showMe"),a.eq(e).addClass("showMe")},y.next=function(){var e=y.onIdx+1>y.maxIdx?0:y.onIdx+1;y.showSlide(e)},y.prev=function(){var e=y.onIdx-1<0?y.maxIdx:y.onIdx-1;y.showSlide(e)},y.navNext=function(){var e=y.onNavPage+1>y.navPages?0:y.onNavPage+1;y.onNavPage=e,o.css({"margin-left":e*y.navPageWidth*-1+"px"})},y.navPrev=function(){var e=y.onNavPage-1<0?y.navPages:y.onNavPage-1;y.onNavPage=e,o.css({"margin-left":e*y.navPageWidth*-1+"px"})},u(),this.gal=y)},o);return{init:function(){return t.log("radical/component/faderBasic::init",e.fn.jquery),a},destroy:function(){t.log("radical/component/faderBasic::destroy",e.fn.jquery)}}}),define("radical/module/fader",["jquery","radical/component/console","radical/component/faderBasic","radical/component/global","radical/component/analytics"],function(e,t,n,i,r){return t.log("radical/module/fader::loaded"),function(o,s){t.log("<fader> radical/module/fader::init",e(o));var a=i.getItem("cssTs"),l=e(o).height(),c={navType:"none",buttonPrevMarkup:'<svg role="presentation" class="rm_icon rm_icon_leftchevron"><use xlink:href="/img/icons/symbol/svg/sprite.symbol.svg?t='+a+'#rm_icon_leftchevron"/></svg>',buttonNextMarkup:'<svg role="presentation" class="rm_icon rm_icon_rightchevron"><use xlink:href="/img/icons/symbol/svg/sprite.symbol.svg?t='+a+'#rm_icon_rightchevron"/></svg>'};return n.init().buildMe(e(o),c),e(o).on("DOMSubtreeModified",function(t){l=e(o).height(),e(o).data("myHeight",l)}).one("click","._fb_nextPrev",function(){r.trackEvent("slideshow","clicked")}),{destroy:function(e,n){t.log("radical/module/fader::destroy")}}}}),define("radical/module/backgroundSlideshow",["jquery","radical/component/console","radical/component/sliderBasic","radical/component/lazyload","radical/component/throttle","radical/component/debounce"],function(e,t,n,i,r,o){return t.log("radical/module/backgroundSlideshow::loaded"),function(n,r){t.log("radical/module/backgroundSlideshow::init",r);var s,a=e("body").hasClass("pagetype_home"),l=e(window).width(),c=e(n),u=c.children("noscript"),d=[],h={holdFor:void 0!==r.holdFor?r.holdFor:3500,autoPlay:void 0===r.autoPlay||r.autoPlay},p={autoPlaying:h.autoPlay,count:u.length,current:c.find(".active").index()},f=10,m={},g=0,v=function(){t.log("radical/module/backgroundSlideshow::loadNextImage()"),g=++g>=u.length?0:g,$poster=u[g],d.length<=f&&i.load($poster,!1,function(e,t){if(e)throw e;t.alreadyLoaded&&t.$asset.insertBefore($poster),d.push(t.$asset)})},y=function(){if(f<=3&&(f=4),0===u.length)return!1;var e=u[0];_(e,!0)},_=function(n,r){var o=e(n).attr("id"),s=e('[data-template-id="'+o+'"]');if(t.log("<loadSlide:loadSlide> ",o),s.length>0)return s.addClass("active"),e('[data-template-id="'+o+'"]:not(:first)').remove(),!1;
58i.load(n,!1,function(n,i){if(n)throw n;t.log("<loadSlide:lazyloaded> ::::::: ",o),i.$asset.addClass("active"),d.length<f&&d.push(i.$asset);var s=e(".homepage_link.lowres_parent");if(s.removeClass("active"),setTimeout(function(){s.remove()},1e3),r&&u.length>1){e("#"+o).hasClass("emphasized")?(t.log("Starting with 'emphasized' asset -- will hold 11s first time"),setTimeout(function(){T(!0)},11e3)):(t.log("No 'emphasized' asset -- normal cycles"),T(!0));for(var a=0;a<f&&a<u.length;a++)v()}})},x=function(){e.each(u,function(n,i){var r=e(i).attr("id");t.log("<loadSlide:go> : ",r),_(i,!1)})},b=function(){t.log("radical/module/backgroundSlideshow::startTimer() was called",s,m,r),h.autoPlay&&p.count>1&&(w(),m=Date.now(),s=setInterval(function(){var e,n,i=Date.now()-m;m=Date.now(),t.log("radical/module/backgroundSlideshow::interval --\x3e calling showNext() now. elapsed : ",i),t.log("radical/module/backgroundSlideshow::showNext()"),d.length<3?(e=d[0],n=d[1]):(e=d[1],n=d[2],d.shift().remove()),void 0!==n&&void 0!==e&&(e.removeClass("active"),n.addClass("active")),v()},h.holdFor))},w=function(){try{clearInterval(s),s=null}catch(e){}},T=function(e){!s||e?(t.log("starting slideshow"),b()):(t.log("stopping slideshow"),w())};return a?(l>=560?y():x(),e(window).on("resize",o(function(){l=e(window).width(),w(),l>=560?b():x()},250))):y(),{info:p,toggle:T,destroy:function(e,n){t.log("radical/module/backgroundSlideshow::destroy")}}}}),define("radical/module/award",["jquery","radical/component/console","radical/component/lazyload"],function(e,t,n){return function(e,i){return t.log("radical/module/award::init"),n.loadOnScroll(e),{destroy:function(){t.log("radical/module/award::destroy")}}}}),define("radical/module/loadMore",["jquery","radical/component/console","radical/component/fancyLoadIn","radical/component/analytics"],function(e,t,n,i){return function(r,o){t.log("radical/module/loadMore::init",o);var s=e(r),a=e(o.target);return s.on("click.loadMore touchstart.loadMore",function(r){if(r.preventDefault(),!s.hasClass("loading")){s.addClass("loading");var o=s.attr("href");e.ajax({url:o,data:{async:!0},dataType:"json",success:function(t,r){i.trackPage(o),e.each(t.data,function(e,t){a.append(t.markup)}),n.fancyLoadIn(),t.remaining>0?s.attr("href",t.nextPagePath).removeClass("loading").blur():(s.off("click.loadMore touchstart.loadMore"),s.remove())},error:function(e,n){t.log("error : ",e,n),s.off("click.loadMore touchstart.loadMore").removeClass("loading")}})}}),{destroy:function(e,n){s.off("click.loadMore touchstart.loadMore"),t.log("radical/module/loadMore::destroy")}}}}),define("radical/module/eTrig",["jquery","radical/component/console","radical/component/egg/loader"],function(e,t,n){return t.log("radical/module/eTrig::loaded"),function(i,r){function o(){n.getEggified(function(){r.command&&egg.run(r.command)}),r.auto||e(i).off("click")}return t.log("radical/module/eTrig::init"),r.auto?(t.log("radical/module/eTrig::bind (auto)"),o()):(t.log("radical/module/eTrig::bind (click)"),e(i).on("click",function(){t.log("you found something!"),o()})),{destroy:function(){t.log("radical/module/eTrig::destroy"),e(i).off("click")}}}}),define("radical/module/directorsIndex",["jquery","radical/component/console","radical/component/UAjammer","radical/component/scrollJammer","radical/component/analytics","radical/component/global"],function(e,t,n,i,r,o){e(window).width();var s,a,l,c,u,d=!1,h=window.scrollY||0,p=!1,f="history"in window&&"pushState"in history,m=!!window.IntersectionObserver,g=null,v={},y=!1,_=function(){if(clearTimeout(u),y){var t=0,n=null;console.log(">> intersecting",v),e.each(v,function(e,i){t<=i&&(t=i,n=e)}),null!==n&&w(n,!1),v={}}},x=function(){clearTimeout(u),v={}},b=function(){if(!m||null!=g)return;const t=parseInt(e("#main_nav_wrap").height())+(e("#sub_nav_wrap").length<=0?0:parseInt(e("#sub_nav_wrap").outerHeight()));return g=new IntersectionObserver(function(t,n){e.each(t,function(e,t){t.isIntersecting&&(v[t.target.dataset.reelkey]=t.intersectionRatio,clearTimeout(u),u=setTimeout(_,350))})},{threshold:[.33,.66,1],rootMargin:`-${t}px 0px -20px 0px`}),e(".directorsindex_list").each(function(){var t=e(this)[0];g.observe(t)}),g};function w(t,n){if(void 0!==t&&void 0!==c&&void 0!==l&&c!==t){var i=l[t];if(c=t,e("a[data-reelkey].selected").removeClass("selected").removeAttr("aria-current"),e('a[data-reelkey="'+c+'"]').addClass("selected").attr("aria-current","category"),e("section[data-reelkey][aria-current]").removeAttr("aria-current"),e('section[data-reelkey="'+c+'"]').attr("aria-current","section"),n&&T(c),f){var r=a.pageTitleTemplate;r=r.replace(/\[CATEGORY\_LABEL\]/," : "+i.label),history.replaceState({categoryDetails:i,title:r},r,i.path),document.title=r}x()}}function T(t,n,o){y=!1;var s=`directors-${t}`,a=function(){const t=e(window).width(),n=window.getComputedStyle(document.body),i=parseInt(n.getPropertyValue("--rm-nav-h")),r=t>
58=756?parseInt(n.getPropertyValue("--pad-base")||0):e(".directorsindex_categories").outerHeight(!0)+2*parseInt(n.getPropertyValue("--pad-body")||0);let o=parseInt(n.getPropertyValue("--rm-subnav-h"));o<=0&&(o=e("#sub_nav_wrap").outerHeight(!0));const s=i+o+r;return Math.ceil(s)}();n=void 0===n||n,o="function"==typeof o?o:function(){y=!0,x(),w(t);var e=l[t];r.trackPage(e.path)},i.scrollTo("#"+s,a,n,o)}return function(i,r){const o=n.init();if(console.log("UAjammer",o),o.Mobile,d="phone"==o.Venue,s=e(i),a=r,l=r.categoryDetails,c=void 0!==r.currentCategory&&null!=r.currentCategory?r.currentCategory:"commercial",console.log(">> _currentCategory <<",c),b(),setTimeout(function(){T(c,!0)},250),s.on("click","a[data-reelkey]",function(t){t.preventDefault();var n=e(this).data("reelkey");l[n],x(),w(n,!0)}),d)return e("body").addClass("scroll-not-at-top"),{};var u,f,m=s,g=[],v={},y=m.find(".director-link"),_="objectFit"in document.documentElement.style!=!1,S=e('<div id="bgImgJammer" class="hidden" />'),E=e('<img id="bgImgJammer1" alt="" />'),M=e('<img id="bgImgJammer2" alt="" />'),A=[E,M],R=!0,C=0;function L(){var e,t,n=(e=0,t=g.length-1,Math.floor(Math.random()*(t-e+1))+e),i=g[n];i!==u?P(i,!0):L()}function P(e,t,n){u=e,C=0===C?1:0,S.removeClass("hidden"),_?A[C].attr({src:v[e].src,srcset:v[e].srcset}):(S.css({"background-image":"url("+v[e].src+")"}),R&&I()),(n=void 0!==n&&n)||(m.find(".director-link.link_underline").removeClass("link_underline"),m.find('.director-link[href="'+e+'"]').addClass("link_underline"))}function I(){R=!0,clearTimeout(f),f=setTimeout(L,3e3)}function k(){h<=0?e("body").addClass("scroll-at-top").removeClass("scroll-not-at-top"):e("body").addClass("scroll-not-at-top").removeClass("scroll-at-top")}function D(){p=!1,k()}return _&&(S.append(E),S.append(M),S.find("img").on("load",function(){var t=S.find("img").index(e(this)),n=0===t?1:0;A[t].addClass("showtime"),A[n].removeClass("showtime"),R&&I()}).on("error",function(){R&&I()})),e("body").prepend(S),y.each(function(){var t=e(this).attr("href"),n=e(this).data("srcset");void 0!==n&&(v[e(this).attr("href")]={src:e(this).data("default-src"),srcset:n},g.push(t))}),y.on("focus mouseover",function(){clearTimeout(f),R=!1,P(e(this).attr("href"),!1,!0),m.find(".director-link.link_underline").removeClass("link_underline")}).on("blur mouseout",function(){I()}),L(),I(),k(),e(window).on("scroll.directorsIndexAtTop",function(){h=window.scrollY,function(){p||requestAnimationFrame(D);p=!0}()}),{destroy:function(e,n){t.log("radical/module/directorsIndex::destroy")}}}}),define("radical/module/fullscreenText",["jquery","radical/component/console"],function(e,t){return t.log("radical/module/fullscreenText::loaded"),function(n,i){t.log("radical/module/fullscreenText::init");var r=i.name,o=e(n);if("dismissed"!==function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return null}(r)){var s=setTimeout(function(){s=!1,a()},3e5);setTimeout(function(){o.on("keyup click",function(e){e.preventDefault(),function(e,t,n){var i="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),i="; expires="+r.toUTCString()}document.cookie=e+"="+(t||"")+i+"; path=/"}(r,"dismissed",7),a()}).addClass("fs-fade-in").removeAttr("style"),e("html").addClass("fs_overflow_hidden")},1e3)}function a(){s&&clearTimeout(s),e("html").removeClass("fs_overflow_hidden"),o.removeClass("fs-fade-in").addClass("fs-fade-out"),o.off("keyup click")}return{destroy:function(){t.log("radical/module/fullscreenText::destroy"),a()}}}}),define("radical/module/scrollDownLink",["jquery","radical/component/console","radical/component/scrollJammer"],function(e,t,n){return t.log("radical/module/scrollDownLink::loaded"),function(t,i){var r=e(t).next();return r=r.length>0?r:e(t),e(t).on("click.scrolldown",function(e){e.preventDefault(),n.scrollTo(r,void 0,!0)}),{destroy:function(){e(t).off("click.scrolldown")}}}}),define("radical/module/masonry",["jquery","radical/component/console","radical/component/throttle"],function(e,t,n){return t.log("radical/module/masonry::loaded"),function(t,i){var r,o={};function s(e){e.style.removeProperty("margin-top"),e.classList.remove("masonry-brick"),e.dataset.masonryDiff=0}function a(){var n=getComputedStyle(t),i=parseInt(n.getPropertyValue("--masonry-cols")||1),a=parseInt(n.getPropertyValue("--masonry-offset-idx")||0)+i;console.log(">>> masonry",{cols:i,offsetIdx:a});var l=a;r=e(t).find(" > *"),r.each(function(t,n){t<=l||i<=1||function(t,n,i){clearTimeout(o[t]);var a=e(r[t-i]),l=(parseInt(a[0].dataset.masonryDiff||0),a.find(">
58 *:nth-child(1)")),c=a[0].offsetHeight,u=Math.round(l.innerHeight()),d=c<=0||u<=0?0:c-u,h=n.dataset.masonryDiff;if(d.toString()!==h)if(d<=0)s(n);else{n.dataset.masonryDiff=d;var p=Math.round(-100*d/n.offsetWidth*100)/100;n.style.marginTop=p+"%",n.classList.add("masonry-brick")}}(t,n,i)})}if(!e("html").hasClass("groowm_edit_mode")){setTimeout(a,250);var l=n(a,500);e(window).on("resize.masonryThrottled",l)}return{destroy:function(){e(t).find(" > *.masonry-brick").forEach(function(e,t){s(t)}),e(window).off("resize.masonryThrottled"),e(window).off("scroll.masonryThrottled")}}}}),define("radical/module/deferload",["jquery","radical/component/console","radical/component/lazyload"],function(e,t,n){return function(n,i){return e(n).find("noscript").each(function(t,n){var i=e(n),r=i.text();i.after(r),i.remove()}),{destroy:function(){t.log("radical/component/deferload::destroy")}}}}),define("radical/module/loopyvideo",["jquery","radical/component/lazyload","radical/component/console"],function(e,t,n){return function(t,n){let i=!1,r=-1;const o=e(t).parents(".modules");if(o.length>0){var s=o.data("config")||{};r=void 0!==s.maxLoopyVids?parseInt(s.maxLoopyVids):-1,i=r>0}var a=function(){if(!i)return!1;return(o.find(".loopyVideoAdded").length||0)>=r},l=a();if(l)return c;var c={destroy:function(){}};if("IntersectionObserver"in window==!1)return c;var u=function(t,n){var i=[];return n=!!n,e(t).find('noscript, script[type="text/template"]').each(function(t,r){var o=e(r),s=o.text();n||o.remove(),i.push(s)}),i}(t),d=("matchMedia"in window?window.matchMedia("(prefers-reduced-motion: reduce)"):{matches:!1}).matches;if(u.length<=0)return c;var h=1e-4,p=void 0!==n.immediately&&n.immediately,f=u[0],m=e(f),g=m[0],v=m.find("source"),y=!1,_=window.innerWidth,x=void 0!==n.mobileSrcTarget?n.mobileSrcTarget:"480p",b=void 0!==n.midSrcTarget?n.midSrcTarget:"720p",w=(void 0!==n.highSrcTarget&&n.highSrcTarget,0),T=null,S=null,E=function(){if(a())return;if(y)return;if(d&&(g.autoplay=!1),y=!0,_<=960&&v.length>1){v.length;var n={};v.each(function(t){n[e(this).data("group")]=e(this).attr("src")});var i=n[x],r=n[b];_<=560&&void 0!==i&&g.currentSrc!==i?(m.find("source").remove(),m.attr("src",i)):_<=960&&void 0!==r&&g.currentSrc!==r?(m.find("source").remove(),m.attr("src",r)):(m.find("source").remove(),m.attr("src",highSrc))}g.oncanplay=function(){e(t).addClass("loopyVideoCanPlay")};(e(t).find(".video_placeholder").length>0?e(t).find(".video_placeholder"):e(t)).append(m).addClass("loopyVideoAdded"),S||(S=setTimeout(()=>{e(t).addClass("loopyVideoCanPlay")},500))},M=function(){if(null!==g)if(d)console.log("playVideo - play aborted due to reduect motion settings");else try{var e=g.play();void 0!==e&&e.then(function(){}).catch(function(e){})}catch(e){clearTimeout(T),w<20&&(w++,T=setTimeout(M,250))}},A={root:null,rootMargin:"0px",threshold:[0,.2,.4,.6,.8,1]},R=function(e,t){e.forEach(e=>{e.intersectionRatio>h?(e.intersectionRatio,E(),M()):e.intersectionRatio})},C=function(){new IntersectionObserver(R,A).observe(t)};return!l&&p?(E(),M(),setTimeout(C,1e3)):l||C(),c}}),define("radical/module/video-bg-clips",["jquery","radical/component/console"],function(e,t){return function(n,i){const r=!0===window.matchMedia("(prefers-reduced-motion: reduce)")||!0===window.matchMedia("(prefers-reduced-motion: reduce)").matches,o={};function s(...e){1==window._debug&&console.log(...e)}function a(...e){1==window._debug&&console.warn(...e)}let l=0,c=0,u={};const d=4e3,h=d,p={};let f=[];const m=[],g=[],v=e=>void 0!==p[e]?p[e]:void 0!==o[e]&&(p[e]=new y(e),p[e]);function y(t){return this.vaultID=t,this.$markup=o[t],this.video=o[t][0],this.$parent=function(t){return e(`.video_bg_clip-template[data-vid-id="${t}"]`).parents(".tile")}(t),this.isVisible=()=>f.includes(t),this.isShowing=()=>m.includes(t),this.lastShown=Date.now()-36e5,this.wasShown=()=>g.includes(t),this.shouldShow=!1,this.show=()=>{s("show",this.vaultID),this.shouldShow=!0,this.play()},this.hide=()=>{t!=l&&t!=c&&(this.shouldShow=!1,a("hide",this.vaultID),S(t,m),this.clearHideTimer(),this.$parent.removeClass("showVideoClip"),this.$markup.removeAttr("data-playing"),this.video.addEventListener("transitionend",()=>{this.shouldShow||this.pause()},{once:!0}))},this.play=async()=>
58{if(this.$markup)try{this.clearHideTimer(),await this.video.play(),this.shouldShow?(s("play",this.vaultID),m.push(t),g.includes(t)||g.push(t),this.lastShown=Date.now(),this.$parent.addClass("showVideoClip"),this.$markup.attr("data-playing",!0),this.startHideTimer()):(s("took too long! get out of here!"),this.hide())}catch(e){this.$markup.removeAttr("data-playing")}},this.pause=async()=>{this.$markup&&void 0!==this.$markup.attr("data-playing")&&(this.$markup.removeAttr("data-playing"),this.video.pause())},this.hideTimer=null,this.startHideTimer=()=>{this.clearHideTimer();this.hideTimer=setTimeout(()=>{this.hide()},h)},this.clearHideTimer=()=>{clearTimeout(this.hideTimer)},this}function _(){x();for(let e=0;e<2;e++){const t=2e3*e;setTimeout(()=>{const n=()=>{a(`>> pickerInterval: ${e} (${t})`),b()};n(),clearInterval(u[e]),u[e]=setInterval(n,d)},t)}}function x(){for(let e in u)clearInterval(u[e])}function b(){if(2==window._clipMode&&x(),f.length<=0)return;const e=f.length<=0?[]:f.filter(e=>l!=e&&c!=e&&!m.includes(e)),t=e.length;if(t<=0)return;if(1==t)return void w(e[0]);let n=!1,i={};const r=Date.now();e.sort(()=>Math.random()-.5);for(let o=0;o<t;o++){const s=e[o];if(o===t-1){w(s);break}const a=v(s);if(!a)return;const l=parseFloat(`${r-a.lastShown}.${s.toString().padStart(10,"0")}`);if(i[l]=a,!n&&!a.wasShown()||r-a.lastShown>16e3){n=!0,a.show();break}}if(n||Object.keys(i).length<=0)return;if(1==Object.keys(i).length)return void i[Object.keys(i)[0]].show();const o=Object.keys(i).sort(function(e,t){return t-e}).reduce((e,t)=>(e[t]=i[t],e),{});o[Object.keys(o)[0]].show()}function w(e){const t=v(e);t&&t.show()}function T(e){const t=v(e);t&&t.hide()}function S(e,t){const n=t.indexOf(e);-1!=n&&t.splice(n,1)}function E(){f=[],e(".video_bg_clip-template").each(function(t){const n=e(this).data("vid-id");e(this).parents(".tile").inView(10)?(!function(t,n){if(n.hasClass("loaded"))return;n.addClass("loaded");let i=o[t];void 0===i&&(i=e(n.text()),i.attr("inert","true"),i[0].addEventListener("canplaythrough",e=>{i.attr("data-canplaythrough",!0)}),i[0].addEventListener("canplay",e=>{i.attr("data-canplay",!0)}));n.after(i),void 0===o[t]&&(o[t]=i);void 0===p[t]&&v(t)}(n,e(this)),f.push(n)):function(e,t){if(!t.hasClass("loaded"))return;const n=v(e);n&&n.hide();S(e,f)}(n,e(this))})}return r||(window.location.search.includes("?tag=studio")?(s("initing clip loader!"),E(),_(),e(window).on("scrollThrottled.videoBgClips resizeStopped.videoBgClips",function(){E(),m.length<=0||m.forEach(e=>{T(e)})}).on("scrollStopped.videoBgClips resizeStopped.videoBgClips",function(){_()}),e("body").on("mouseover",".tile",function(t){c=e(this).find(".video_bg_clip-template").data("vid-id"),w(c)}).on("mouseout",".tile_grid",function(t){c=0;const n=e(this).find(".video_bg_clip-template").data("vid-id");n!=l&&T(n)}).on("focus",'.tile[data-has-vid="yarp"] a',function(t){l=e(this).find(".video_bg_clip-template").data("vid-id"),w(l)}).on("blur",'.tile[data-has-vid="yarp"] a',function(t){l=0;const n=e(this).find(".video_bg_clip-template").data("vid-id");n!=c&&T(n)})):s("skipping clip loader...")),{destroy:function(){t.log("radical/module/video-bg-clips::destroy")}}}}),define("radical/component/fancyToolTips",["radical/component/console","radical/component/global"],function(e,t){e.log("radical/component/fancyToolTips::loaded");let n={},i=document.querySelector('[data-fancy-mouse="tooltip"]'),r=document.querySelectorAll("[data-tip]");if(null===i&&r.length<=0)return;null===i&&(i=document.body,i.setAttribute("data-fancy-mouse","tooltip"));window.innerWidth;function o(e){const t=this,n=e.clientX,i=e.clientY,r=n<=.5*window.innerWidth;requestAnimationFrame(()=>{t.style.setProperty("--x",n),t.style.setProperty("--y",i),t.setAttribute("data-on-l",r?"1":"0")})}null!==i&&(i.addEventListener("mouseenter",o,!1),i.addEventListener("mousemove",o,!1));const s=()=>{void 0===n&&(n={"--tip":"","--tip-bg":"white","--tip-color":"black","--tip-chars":0,"--tip-speed":"0s"});for(const[e,t]of Object.entries(n))i.style.setProperty(e,t)};return{setUpTip:function(e){if(void 0!==e.dataset.tipSetup)return;e.dataset.tipSetup=!0;const t=e.getAttribute("data-tip-content")||e.getAttribute("title");e.dataset.tip=t,e.removeAttribute("title"),e.dataset.tipBg=e.dataset.tipBg||"white",e.dataset.tipColor=e.dataset.tipColor||"black",e.dataset.tipChars=e.dataset.tip.length,e.dataset.tipSpeed=e.dataset.tipSpeed||"3s",function(e){e.addEventListener("mouseenter",t=>{n={"--tip":`"${e.dataset.tip}"`,"--tip-bg":e.dataset.tipBg,"--tip-color":e.dataset.tipColor,"--tip-chars":e.dataset.tipChars,"--tip-speed":e.dataset.tipSpeed},requestAnimationFrame(s)}),e.addEventListener("mouseleave",e=>{n=void 0,requestAnimationFrame(s)})}(e)}}}),define("radical/module/fancyToolTips",["jquery","radical/component/console","radical/component/fancyToolTips"],function(e,t,n){return t.log("radical/module/fancyToolTips::loaded"),function(e,i){return document.querySelectorAll("[data-tip]").forEach(e
58=>{n.setUpTip(e)}),{destroy:function(){t.log("radical/module/fancyToolTips::destroy")}}}}),define("radical/module/hscroller",["jquery","radical/component/console","radical/component/throttle"],function(e,t,n){t.log("radical/module/hscroller::loaded");const i=window.navigator.vendor.includes("Apple");let r=i&&document.querySelectorAll(".hscroll-row").length>0;return function(o,s){const a=e(o);t.log("radical/module/hscroller::init",e.fn.jquery),a.find(".hscroll-row:not(.hscroll_inited)").each(function(){const t=e(this),n=e(this)[0],i=e(this).find(".hscroll-row-inner"),r=n.querySelectorAll(".hscroll-item").length;t.attr("data-items",r),t.css("--items",r),t.append(i.clone()),t.append(i.clone()),t.addClass("hscroll_inited")});const l=function(){r=i&&document.querySelectorAll(".hscroll-row").length>0,r&&function(){const e=getComputedStyle(document.querySelector(".hscroll-row-inner")).getPropertyValue("--gap");document.querySelectorAll(".hscroll-row").forEach(t=>{let n=0;t.querySelectorAll(".hscroll-row-inner:first-child > *").forEach(e=>{n+=e.offsetWidth}),t.querySelectorAll(".hscroll-row-inner").forEach(t=>{const i=t.querySelectorAll(".hscroll-item").length||0;t.style.width=`calc(${n}px + (${i} * ${e}))`})})}()};if(l(),!e("html").hasClass("groowm_edit_mode")){setTimeout(l,250);let t=n(l,500);e(window).on("resize.gooseHscollsResizeThrottled",t)}return{destroy:function(){e(o).removeClass("inited"),t.log("radical/module/hscroller::destroy")}}}}),define("radical/module/capabilities",["jquery","radical/component/console","radical/component/throttle"],function(e,t,n){return t.log("radical/module/capabilities::loaded"),function(n,i){const r=e(n),o=r.find(".capabilities-list li"),s=r.find("#capabilities-list-highlightbox"),a=e("#capabilities-bg-glow");if(o.length<=0)return{destroy:()=>{}};o.each(function(t,n){!function(t,n){const i=e(n),r=e(i.find('script[data-rel="hover_image_markup"]'));void 0!==r&&s.append(`<div data-idx="${t}" class="abs_fill">${e(r).html()}</div>`)}(t,n)});let l=[];return r.on("mouseenter",".capabilities-list li",function(t){const n=`[data-idx="${e(this).index()}"]`,i=r.find(`#capabilities-list-highlightbox ${n}`);let o=l.indexOf(n);o>=0&&l.splice(o,1),l.push(n),l.forEach((e,t)=>{document.querySelector(`#capabilities-list-highlightbox ${e}`).style.setProperty("z-index",100+10*t)}),i.removeClass("showMe"),i[0].offsetWidth,i.addClass("showMe");const s=e(this).data("bg-hover");a.attr("style",`--_from-c:${s}`)}).on("mouseleave",".capabilities-list",function(e){r.find("#capabilities-list-highlightbox > *").removeClass("showMe"),a.attr("style","--_from-c:#000")}),{destroy:function(){t.log("radical/module/capabilities::destroy"),r.off("mouseenter mouseleave"),s.empty()}}}}),define("radical/module/featuredCard",["jquery","radical/component/console","radical/component/throttle","radical/component/scrollInstance"],function(e,t,n,i){t.log("radical/module/featuredCard::loaded");let r,o,s=!1;function a(){const e=r.querySelectorAll("video");null!==e&&(console.warn("pause vidsz!"),e.forEach(e=>{try{e.pause()}catch(e){console.warn("error pausing video",{e:e})}}));let t=i();t.hasScroller&&t.scroller.resume(),r.close()}return function(n,l){!function(){if(s)return;s=!0,r=document.createElement("dialog"),r.classList.add("featured-modal"),document.querySelector("body").appendChild(r),console.log("ADDED FEATURED WORK MODAL"),r.addEventListener("click",function(e){(e.target===e.currentTarget||e.target.classList.contains("dialog-pad-wrap"))&&a()})}();const c=e(n);async function u(){console.log("getGallery...");const t=`gallery=${l.moduleID}`,n=window.location.search;let i=n.includes("?")?`${n}&${t}`:`?${t}`;try{const t=await fetch(`${window.location.pathname}${i}`);if(!t.ok)throw new Error(`Response status: ${t.status}`);const n=await t.json();l.hasGallery=n.length>0,l.galleryItems=n,l.galleryContent=l.galleryItems.join("\n"),e(`#dialog-${l.moduleID}`).length>0&&e(`#dialog-${l.moduleID} .dialog-gallery`).html(l.galleryContent).removeAttr("aria-busy")}catch(e){console.error("getGallery:error",e.message)}}function d(e){if(void 0===e||e.length<=0)return"";const t=e.split(/\,|\<br\>/);if(t.length<=0)return"";let n="";
58return t.forEach(e=>{n+=`<li>${e}</li>`}),n}return l.url=void 0===l.url?c.attr("href"):l.url,c.on("click",e=>{e.preventDefault(),r.innerHTML=function(e){console.log("MODAL",e),void 0===e.hasGallery&&u();let t="";if(e.hasCardClient||e.hasCardPartner){const n=e.hasCardClient?d(e.cardClient):"",i=e.hasCardClient?`\n\t\t\t\t\t<div class="dialog-metadata-chunk">\n\t\t\t\t\t\t<div class="dialog-metadata-label">CLIENT</div>\n\t\t\t\t\t\t<ul class="dialog-metadata-content debullet" aria-label="Client">\n\t\t\t\t\t\t\t${n}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>`:"",r=e.hasCardPartner?d(e.cardPartner):"";t=`\n\t\t\t\t\t<div class="dialog-metadata-primary">\n\t\t\t\t\t\t${i}\n\t\t\t\t\t\t${e.hasCardPartner?`\n\t\t\t\t\t<div class="dialog-metadata-chunk">\n\t\t\t\t\t\t<div class="dialog-metadata-label">PARTNERS</div>\n\t\t\t\t\t\t<ul class="dialog-metadata-content debullet" aria-label="Partners">\n\t\t\t\t\t\t\t${r}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>`:""}\n\t\t\t\t\t</div>\n\t\t\t\t`}const n=e.hasProjectRoles?d(e.projectRoles):"",i=e.hasProjectRoles?`\n\t\t\t\t<div class="dialog-metadata-secondary">\n\t\t\t\t\t<div class="dialog-metadata-chunk">\n\t\t\t\t\t\t<div class="dialog-metadata-label">PROJECT ROLE</div>\n\t\t\t\t\t\t<ul class="dialog-metadata-content debullet" aria-label="Project Role">\n\t\t\t\t\t\t\t${n}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`:"",r=void 0===e.hasGallery?'aria-busy="true"':"",o=void 0===e.hasGallery?'<div class="loader show_loading bg_trans-90-lt txt-center fnt-bold cc ar-16-9">loading media...</div>':e.galleryContent,s=e.hasCardSecondary?`<div class="dialog-subheadline">${e.cardSecondary}</div>`:"";return`\n\t\t\t\t<div class="dialog-pad-wrap">\n\t\t\t\t\t<div class="dialog-inner-wrap" id="dialog-${e.moduleID}">\n\t\t\t\t\t\t<div class="dialog-inner">\n\t\t\t\t\t\t\t<div class="dialog-content" tabindex>\n\t\t\t\t\t\t\t\t<div class="dialog-content-primary">\n\t\t\t\t\t\t\t\t\t<div class="dialog-headline">${e.cardTitle}</div>\n\t\t\t\t\t\t\t\t\t${s}\n\t\t\t\t\t\t\t\t\t<div class="dialog-copy">\n\t\t\t\t\t\t\t\t\t\t${e.projectSummary}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class="dialog-cta-main dialog-copy padU-lg padU-v">\n\t\t\t\t\t\t\t\t\t\t<a href="${e.url}" class="pill-arrow linky"><span>View Full Project Page</span></a>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="dialog-metadata dialog-content-secondary">\n\t\t\t\t\t\t\t\t\t${t}\n\t\t\t\t\t\t\t\t\t${i}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="dialog-gallery grid-full-w" ${r}>\n\t\t\t\t\t\t\t\t${o}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="dialog-close-wrap">\n\t\t\t\t\t\t\t<button type="button" class="dialog-close" aria-label="close modal"><img src="/img/icons/x-sm.svg" alt="close" width="60" height="60" /></button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`}(l),r.style.setProperty("--to-c",l.bgColor||"black"),r.showModal();let t=i();t.hasScroller&&t.scroller.pause(),clearTimeout(o),o=setTimeout(()=>{document.querySelector(".dialog-headline").scrollIntoView(!1)},150),r.querySelectorAll(".dialog-close").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),a()})})}),{destroy:function(){t.log("radical/module/featuredCard::destroy")}}}}),define("radical/component/observeInView",["radical/component/console","radical/component/maffs","radical/component/global"],function(e,t,n){e.log("radical/component/observeInView::loaded");const i=[0,.01,.1,.25,.5,.75,.9,1];i.join("_");const r=new IntersectionObserver(function(e,t){window.innerHeight,e.forEach(e=>{const t=void 0!==e.target.observerArgs&&void 0!==e.target.observerArgs.minRatio?parseFloat(e.target.observerArgs.minRatio):0;e.target.setAttribute("data-inview",e.isIntersecting&&e.intersectionRatio>=t?"yarp":"narp"),e.target.inView=e.isIntersecting,e.target.inViewRatio=e.isIntersecting?e.intersectionRatio:0})},{threshold:i});const o=new IntersectionObserver(function(e,t){e.forEach(e=>{e.isIntersecting&&(e.target.setAttribute("data-inview","yarp"),t.unobserve(e.target))})},{threshold:i});return{observe:(e,t)=>
58{(e=Array.isArray(e)?e:[e]).forEach(e=>{void 0!==t&&(e.observerArgs=t),r.observe(e)})},observeOnce:(e,t)=>{(e=Array.isArray(e)?e:[e]).forEach(e=>{void 0!==t&&(e.observerArgs=t),o.observe(e)})}}}),define("radical/module/fancyReveal",["jquery","radical/component/console","radical/component/observeInView"],function(e,t,n){return t.log("radical/module/fancyReveal::loaded"),function(e,i){const r="fancified",o=void 0===i.once||i.once,s=void 0!==i.minRatio?{minRatio:i.minRatio}:void 0;let a="blocks";switch(!0){case!!e.dataset.fancyLetters:a="letters",function(e){const t=c(e.innerText);let n=0,i=[];t.forEach(e=>{const t=e.split("");let r="";t.forEach(e=>{r+=function(e,t){return`<span class="letter" style="--idx:${t};">${" "===e?" ":e}</span>`}(e,n),n++}),i.push(`<span class="word">${r}</span>`)}),e.innerHTML=i.join(" "),l(e)}(e);break;case!!e.dataset.fancyWords:a="words",function(e){const t=c(e.innerText);let n=0,i=[];t.forEach(e=>{i.push(function(e,t){return`<span class="word" style="--idx:${t};">${e}</span>`}(e,n)),n++}),e.innerHTML=i.join(" "),e.classList.add(r)}(e);break;case!!e.dataset.fancyRows:a="rows",function(e){const t=e.querySelectorAll(":scope > * > *");let n=0;t.forEach(e=>{e.classList.add("row"),e.style.setProperty("--idx",n),n++}),l(e)}(e);break;default:!function(e){l(e)}(e)}function l(e){e.classList.add(r)}function c(e){return e.split(" ")}return o?n.observeOnce([e],s):n.observe([e],s),{destroy:function(){t.log("radical/module/fancyReveal::destroy")}}}}),define("radical/module/plax",["jquery","radical/component/console","radical/component/global","radical/component/maffs","radical/component/scrollRegistry","radical/component/resizeRegistry","radical/component/throttle"],function(e,t,n,i,r,o,s){t.log("radical/module/plax::loaded");const a={destroy:function(){t.log("radical/module/plax::destroy")}};return function(e,t){return!1!==n.getItem("prefersReducedMotion")||getComputedStyle(document.querySelector("body")).getPropertyValue("--supports-animation-timeline"),a}}),define("radical/module/hoverFun",["radical/component/maffs","radical/component/console"],function(e,t){t.log("radical/module/hoverFun::loaded");const n=["0","1"],i=["â
","â","â±","â¾","â ","â²","â ","âº","â»"];return function(r,o){const s=o.scrambleSteps||10,a=o.buildAfterFactor||.3,l=Math.ceil(s*a),c=s-l,u=o.flavor||el.dataset.hoverFun,d=r.innerText.trim();r.dataset.ogText=d;const h=d.split(""),p=d.length;return r.addEventListener("mouseenter",function(t){const r=this;void 0===r.scrambleVariants&&function(t){let r=[],o=Math.ceil(p/s),a=Math.ceil(p/c);for(let t=0;t<s;t++){let s="",c=!0,d=u.includes("Builder"),f=u.includes("Progressive")||d&&t>=l,m=d?(t-l)*a:t*o,g=d?p:m+o,v=[...h];switch(u){case"scrambleNumsBuilder":case"scrambleNumsProgressive":case"scrambleNums":v=n,c=!1;break;case"scrambleSymbolsBuilder":case"scrambleSymbolsProgressive":case"scrambleSymbols":v=i,c=!1}h.forEach((t,n)=>{const i=e.getRandomInt(0,v.length-1),r=v[i];c&&v.splice(i,1),s+=!f||n>=m&&n<=g?r:t}),r.push(s)}r.push(d),t.scrambleVariants=r,t.dataset.scrambleInited=!0,console.log({ogText:d,variants:r,progressiveChunkSize:o,buildRemainder:c,buildChunkSize:a,letterCount:p})}(r),r.dataset.isScrambling=!0;let o=0;const a=r.scrambleVariants,f=()=>{if(!r.dataset.isScrambling||o>=a.length)return clearTimeout(r.scrambleClock),r.scrambleClock=void 0,void(r.dataset.isScrambling=!1);r.innerHTML=a[o],o++,r.scrambleClock=setTimeout(f,50)};!0===r.dataset.scrambleInited?f():r.scrambleClock=setTimeout(f,50)},!1),r.addEventListener("mouseleave",function(e){const t=this,n=t.dataset.ogText;t.dataset.isScrambling=!1,void 0!==t.scrambleClock&&(clearTimeout(t.scrambleClock),t.innerHTML=n)},!1),{destroy:function(){t.log("radical/module/hoverFun::destroy")}}}}),define("radical/module/onPageNav",["jquery","radical/component/scrollRegistry","radical/component/resizeRegistry","radical/component/scrollJammer","radical/component/observeInView","radical/component/maffs","radical/component/console","radical/component/scrollInstance"],function(e,t,n,i,r,o,s,a){return s.log("radical/module/onPageNav::loaded"),function(i,l){const c=e(i).find('a[href^="#"]'),u=[];let d=[];const h={};function p(e){const t=h[e].$el,n=t[0].getBoundingClientRect();if(h[e].rect=n,h[e].isAtTop=n.top<=h[e].stickyTop,h[e].isPastBottom=window.scrollY>h[e].height,h[e].isInView=t[0].inView,h[e].isInView)if(t[0].inViewRatio>=1)h[e].viewCoverage=1;else{const t=Math.max(n.top,0),i=Math.min(n.bottom,window.innerHeight)-t,r=o.roundToDec(i/window.innerHeight,2);h[e].viewCoverage=r}else h[e].viewCoverage=0}function f(){e(i).find('a[href^="#"].currentSection').removeClass("currentSection")}return c.each(function(){const t=e(this).attr("href");u.push(t);const n=e(t);h[`${t}`]={$link:e(this),$el:n,isSticky:n.hasClass("sticky"),stickyTop:parseInt(getComputedStyle(n[0]).getPropertyValue("top")),originalTop:n.offset().top,height:n[0].offsetHeight,isAtTop:!1,isPastBottom:!1,isInView:!1,viewCoverage:0,rect:{}},r.observe(n[0])}),t.onScrollThrottled("onPageNavScrollThrottled",async()=>{let t;
58if(d=[],u.forEach(e=>{p(e),h[e].isInView&&h[e].viewCoverage>=.2&&d.push(e)}),d.length<=0)f();else{if(1==d.length){const e=d[0];if(h[e].isSticky&&h[e].isAtTop&&h[e].isPastBottom)return void f();t=e}else{let e=0;d.forEach(n=>{if(h[n].isSticky&&h[n].isAtTop&&h[n].isPastBottom)return;const i=h[n].viewCoverage;i>e&&(e=i,t=n)})}void 0===t&&(t=d.pop()),t?(e(i).find(`a.currentSection:not([href="${t}"])`).removeClass("currentSection"),e(i).find(`a[href="${t}"]`).addClass("currentSection")):f()}}),n.onResizeThrottled("onPageNavResizeThrottled",async()=>{u.forEach(e=>{h[e].height=h[e].$el[0].offsetHeight})}),e(i).on("click","a",function(t){t.preventDefault();const n=e(this).attr("href");if(void 0===n||"#"!==n.substring(0,1))return void console.warn("anchor link missing href");if($target=e(n),$target.length<=0)return void console.warn("anchor link cannot find target on page. ",n);console.log("radical/module/onPageNav::click",n,$target);let i=a();if(i.hasScroller){let e=i.scroller;e.pause(),$target[0].scrollIntoView({behavior:"smooth"}),scrollTimeout=setTimeout(()=>e.resume(),400)}else $target[0].scrollIntoView({behavior:"smooth"});p(n),function(e){h[e].isSticky&&h[e].isAtTop&&h[e].isPastBottom&&window.scrollTo({top:h[e].originalTop,left:0,behavior:"smooth"})}(n)}),{destroy:function(){s.log("radical/module/onPageNav::destroy")}}}}),define("radical/module/expando",["jquery","radical/component/console"],function(e,t){return t.log("radical/module/expando::loaded"),function(n,i){const r=i.collapseOthers||!0;return e(n).on("change",".expando-toggle",function(t){const i=e(this)[0],o=e(this).attr("value")||i.innerText;console.warn("expando!",o),r&&function(e){n.querySelectorAll(`.expando-toggle:not([value="${e.value}"])`).forEach(e=>{e.checked=!1})}(i)}),{destroy:function(){t.log("radical/module/expando::destroy")}}}}),define("radical/module/fancyScrollOut",["radical/component/scrollRegistry","radical/component/resizeRegistry","radical/component/maffs","radical/component/console"],function(e,t,n,i){return i.log("radical/module/fancyScrollOut::loaded"),function(r,o){const s=r.querySelector(".mpv-media");if(null!=s){const i=r.closest("section");if(null==i)return void console.warn("fancyScrollOut: could not find parent section ...");const o=i.nextSibling;if(null==o)return void console.warn("fancyScrollOut: could not find next section ...");let a,l,c=t.screenMetrics.vH;const u=()=>{const n=o.getBoundingClientRect();c=t.screenMetrics.vH,a=n.y+e.scrollMetrics.docScrollTop,l=a+c};u();const d=async()=>{const i=e.scrollMetrics.docScrollTop,r=t.screenMetrics.vH;u();if(i>a-r&&i<l+r){const t=100*(e.scrollMetrics.docScrollBottom-a)/c,i=Math.min(100,Math.max(0,t))/100,r=n.roundToDec(i,3);s.style.setProperty("--shrink",r)}},h="shrinkMidPageVideo-"+Date.now();e.onScroll(h,d),t.onResizeThrottled(h,u),d()}return{destroy:function(){i.log("radical/module/fancyScrollOut::destroy")}}}}),define("radical/module/fancyScrollIn",["radical/component/global","radical/component/scrollRegistry","radical/component/resizeRegistry","radical/component/maffs","radical/component/console"],function(e,t,n,i,r){r.log("radical/module/fancyScrollIn::loaded");const o={destroy:function(){r.log("radical/module/fancyScrollIn::destroy")}};return function(r,s){if(!1!==e.getItem("prefersReducedMotion"))return console.log("<> fancyScrollIn: prefersReducedMotion"),o;const a=r.querySelector(s.childSelector);let l=void 0!==s.modifier?1*s.modifier:1;isNaN(l)&&(l=1);let c=void 0!==s.padModifier?1*s.padModifier:0;isNaN(c)&&(c=0);const u=r;let d=null;if(null==u||null==a)console.warn("fancyScrollIn: module misconfigured");else{let e,r,o=n.screenMetrics.vH;const s=()=>{const n=u.getBoundingClientRect();o=n.height,e=n.y+t.scrollMetrics.docScrollTop,r=e+o};s();const a=async()=>{const a=t.scrollMetrics.docScrollTop,l=n.screenMetrics.vH;s();if(a>e-l&&a<r+l){let r=t.scrollMetrics.docScrollBottom-e;r-=.75*n.screenMetrics.vH;let s=100*r/o;s*=1.75;const a=Math.min(100,Math.max(0,s))/100,l=i.roundToDec(a,3);d!=l&&(d=l,u.style.setProperty("--in-view-perc",l))}},l="trackCoverage-"+Date.now();t.onScroll(l,a),n.onResizeThrottled(l,s),a()}return o}}),define("radical/module/mediaModal",["jquery","radical/component/console","radical/component/scrollInstance"],function(e,t,n){t.log("radical/module/mediaModal::loaded");let i,r=!1,o=!1;const s=[];return function(a,l){function c(e){return document.querySelectorAll(`[data-trigger="MediaModal"][aria-controls="${e}"]`)}r||(r=!0,i=document.createElement("dialog"),i.classList.add("media-modal"),document.querySelector("body").appendChild(i),i.addEventListener("click",function(e){(e.target===e.currentTarget||e.target.classList.contains("dialog-pad-wrap"))&&e.currentTarget.close(),o=!1,s.length>
580&&s.forEach(e=>{"function"==typeof e&&e()})}));const u=l.ar||"16/9",d=e(a),h=d.attr("aria-controls");d.on("click",function(e){e.preventDefault(),p(h)});const p=e=>{o?g(e):f(e)},f=e=>{t.log("radical/module/mediaModal::openMediaModal",e);let r=n();r.hasScroller&&r.pause(),o=!0,i.setAttribute("data-video-id",e);const s=d.find("noscript").html();i.innerHTML=`\n\t\t\t\t<div class="modal-inner-wrap">\n\t\t\t\t\t<div class="modal-close-wrap">\n\t\t\t\t\t\t<button type="button" class="modal-close" aria-label="close modal"><img src="/img/icons/x-sm.svg" alt="close" width="60" height="60" /></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="modal-inner">\n\t\t\t\t\t\t<div class="modal-content modal-media-containScreen" style="aspect-ratio:${u};">\n\t\t\t\t\t\t\t${s}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`,i.querySelectorAll(".modal-close").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),i.close()})}),i.showModal();try{const e=i.querySelector("video");e.focus(),e.play()}catch(e){console.warn("error playing video",{e:e})}!function(e){c(e).forEach(e=>{e.setAttribute("aria-expanded","true")})}(e)};function m(){let e=n();e.hasScroller&&e.resume();const t=i.querySelectorAll("video");null!==t&&t.forEach(e=>{try{e.pause()}catch(e){console.warn("error pausing video",{e:e})}}),c(h).forEach(e=>{e.setAttribute("aria-expanded","false")})}s.push(m);const g=e=>{o=!1,i.close(),m()};return{destroy:function(){t.log("radical/module/mediaModal::destroy")}}}}),define("radical/module/clock",["jquery","radical/component/console","radical/component/analytics"],function(e,t,n){function i(e,t){return e.toString().padStart(t||2,"0")}return t.log("radical/module/clock::loaded"),function(r,o){o.timezone=o.timezone||"UTC",o.precise=o.precise||!1,o.precision=2,o.interval=500,o.intervalAgressive=10,t.log("radical/module/clock::init -> "+o.timezone);const s=e(r),a=s.text();let l,c=!1;function u(){!function(){try{clearTimeout(l)}catch(e){t.error("radical/module/clock::reset -> "+e.message)}}(),s.off("click"),s.text(a)}return s.on("click",function(e){e.preventDefault(),n.trackEvent("footer clock","click")}).on("mouseover",function(){c=!0}).on("mouseout",function(){c=!1}),l=setTimeout(function e(){let t=new Date((new Date).toLocaleString("en-US",{timeZone:o.timezone})),n=i(t.getHours()),r=i(t.getMinutes()),a=i(t.getSeconds());if(o.precise||a>50){let e=i(Date.now()-1e3*parseInt(Date.now()/1e3),3).substring(0,o.precision),t=a%2==0?'<span style="color:#eee">:</span>':":";s.html(`${n}${t}${r}${t}${a}.${e}`)}else s.html(`${n}:${r}`);l=setTimeout(e,o.precise||a>50?o.intervalAgressive:o.interval)},o.interval),{destroy:function(){t.log("radical/module/clock::destroy"),u()}}}});class InertialScroll{constructor(e={}){this.config={targetElement:e.targetElement||window,friction:void 0!==e.friction?e.friction:.8,maxVel:void 0!==e.maxVel?e.maxVel:60,minVel:void 0!==e.minVel?e.minVel:.05,wheelMultiplier:void 0!==e.wheelMultiplier?e.wheelMultiplier:.4,dragMultiplier:void 0!==e.dragMultiplier?e.dragMultiplier:2,maxDragSamples:void 0!==e.maxDragSamples?e.maxDragSamples:5,enableKeyboard:void 0===e.enableKeyboard||e.enableKeyboard,keyboardArrowKeyVelocity:void 0!==e.ke
58yboardArrowKeyVelocity?e.keyboardArrowKeyVelocity:30,keyboardPageKeyVelocity:void 0!==e.keyboardPageKeyVelocity?e.keyboardPageKeyVelocity:70,keyboardHomeEndVelocity:void 0!==e.keyboardHomeEndVelocity?e.keyboardHomeEndVelocity:50,keyboardStepPageFactor:void 0!==e.keyboardStepPageFactor?e.keyboardStepPageFactor:.85,preventTextSelection:void 0!==e.preventTextSelection&&e.preventTextSelection,enableWheel:void 0===e.enableWheel||e.enableWheel,enableDrag:void 0!==e.enableDrag&&e.enableDrag,dragHoldThreshold:void 0!==e.dragHoldThreshold?e.dragHoldThreshold:160,cursorGrabbing:e.cursorGrabbing||"grabbing",onUpdate:"function"==typeof e.onUpdate?e.onUpdate:()=>{}},this.vx=0,this.vy=0,this.currentScrollX=0,this.currentScrollY=0,this.lastUpdateTime=0,this.isAnimating=!1,this.isDragging=!1,this.lastMouseX=0,this.lastMouseY=0,this.isTargetScrolling=!1,this.targetScrollX=0,this.targetScrollY=0,this.potentialVxFromDrag=0,this.potentialVyFromDrag=0,this.dragVelocitySamplesX=[],this.dragVelocitySamplesY=[],this.clientHeight=0,this.scrollHeight=0,this.maxScrollTop=-100,this.clientWidth=0,this.scrollWidth=0,this.maxScrollLeft=0,this.isWindowScroll=this.config.targetElement===window||this.config.targetElement===document.documentElement||this.config.targetElement===document.body,this.scrollableElement=this.isWindowScroll?window:this.config.targetElement,this.eventTargetForWheel=this.isWindowScroll?window:this.scrollableElement,this.eventTargetForMouseDown=this.isWindowScroll?window:this.scrollableElement,this.eventTargetForKeyboard=window,this.dragHoldThreshold=e.dragHoldThreshold,this._dragHoldTimer=null,this._pendingDragEvent=null,this.boundUpdate=this.update.bind(this),this.boundHandleWheel=this.handleWheel.bind(this),this.boundHandleMouseDown=this.handleMouseDown.bind(this),this.boundHandleMouseMove=this.handleMouseMove.bind(this),this.boundHandleMouseUp=this.handleMouseUp.bind(this),this.boundHandleMouseLeave=this.handleMouseLeave.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.originalStyles={bodyUserSelect:"",bodyCursor:"",targetUserSelect:"",targetCursor:""},this.TARGET_FRAME_DURATION_MS=1e3/60}_clamp(e,t,n){return Math.max(t,Math.min(n,e))}_updateScrollDimensions(){this.clientHeight=this.isWindowScroll?window.innerHeight:this.scrollableElement.clientHeight,this.scrollHeight=this.isWindowScroll?document.documentElement.scrollHeight||document.body.scrollHeight:this.scrollableElement.scrollHeight,this.maxScrollTop=Math.max(0,this.scrollHeight-this.clientHeight),this.clientWidth=this.isWindowScroll?window.innerWidth:this.scrollableElement.clientWidth,this.scrollWidth=this.isWindowScroll?document.documentElement.scrollWidth||document.body.scrollWidth:this.scrollableElement.scrollWidth,this.maxScrollLeft=Math.max(0,this.scrollWidth-this.clientWidth)}_getActualScrollPosition(){return this.isWindowScroll?{x:window.pageXOffset,y:window.pageYOffset}:{x:this.scrollableElement.scrollLeft,y:this.scrollableElement.scrollTop}}_scrollTo(e,t){const n=Math.round(e),i=Math.round(t);this.isWindowScroll?window.scrollTo(n,i):this.scrollableElement&&("function"==typeof this.scrollableElement.scrollTo?this.scrollableElement.scrollTo(n,i):(this.scrollableElement.scrollLeft=n,this.scrollableElement.scrollTop=i)),this.config.onUpdate({x:n,y:i})}_scrollBy(e,t){const n=this.currentScrollX+e,i=this.currentScrollY+t;this._scrollTo(n,i),this.currentScrollX=n,this.currentScrollY=i}_syncWithActualScroll(e=!1){if(e||!this.isAnimating||!this.isDragging&&0===this.vx&&0===this.vy){const e=this._getActualScrollPosition();this.currentScrollX=e.x,this.currentScrollY=e.y}}ensureAnimationLoopIsRunning(){this.isAnimating||(this._syncWithActualScroll(!0),this.isAnimating=!0,this.lastUpdateTime=Date.now(),requestAnimationFrame(this.boundUpdate))}update(){this._updateScrollDimensions();const e=Date.now(),t=this._clamp(e-this.lastUpdateTime,0,50);this.lastUpdateTime=e;const n=t/this.TARGET_FRAME_DURATION_MS;let i=this.vy,r=this.vx;if(this.isTargetScrolling){const e=this.targetScrollY-this.currentScrollY,t=this.targetScrollX-this.currentScrollX,n=2;if(Math.abs(e)<n&&Math.abs(t)<n)this.currentScrollY=this.targetScrollY,this.currentScrollX=this.targetScrollX,this.vy=0,this.vx=0,this.isTargetScrolling=!1;else{const n=.1;i+=e*n,r+=t*n,i=this._clamp(i,-this.config.maxVel,this.config.maxVel),r=this._clamp(r,-this.config.maxVel,this.config.maxVel)}}this.currentScrollY+=i*n;const o=this._clamp(this.currentScrollY,0,this.maxScrollTop);o!==this.currentScrollY&&(0===o&&i<0||o===this.maxScrollTop&&i>0)&&(i=0,this.isTargetScrolling&&(this.isTargetScrolling=!1)),this.currentScrollY=o,this.vy=i*this.config.friction,this.currentScrollX+=r*n;const s=this._clamp(this.currentScrollX,0,this.maxScrollLeft);
58s!==this.currentScrollX&&(0===s&&r<0||s===this.maxScrollLeft&&r>0)&&(r=0,this.isTargetScrolling&&(this.isTargetScrolling=!1)),this.currentScrollX=s,this.vx=r*this.config.friction,this._scrollTo(this.currentScrollX,this.currentScrollY);const a=Math.abs(this.vy)>this.config.minVel,l=Math.abs(this.vx)>this.config.minVel,c=this.isTargetScrolling;l||a||c?requestAnimationFrame(this.boundUpdate):(this.isAnimating=!1,this.isTargetScrolling=!1)}handleWheel(e){if(!this.config.enableWheel)return;if(e.preventDefault(),this.isDragging)return;this._syncWithActualScroll(!0);let t=Math.sign(e.deltaX)*Math.min(Math.abs(e.deltaX),100),n=Math.sign(e.deltaY)*Math.min(Math.abs(e.deltaY),100);const i=e=>{const t=Math.abs(e);return t<=5?1.2*this.config.wheelMultiplier:t<=20?this.config.wheelMultiplier:.7*this.config.wheelMultiplier};this.vx=this._clamp(this.vx+t*i(t),-this.config.maxVel,this.config.maxVel),this.vy=this._clamp(this.vy+n*i(n),-this.config.maxVel,this.config.maxVel),this.ensureAnimationLoopIsRunning()}_startDrag(e){this.isDragging=!0,this._syncWithActualScroll(!0),this.vx=0,this.vy=0,this.potentialVxFromDrag=0,this.potentialVyFromDrag=0,this.dragVelocitySamplesX=[],this.dragVelocitySamplesY=[],this.lastMouseX=e.clientX,this.lastMouseY=e.clientY,this.config.preventTextSelection&&(this.originalStyles.bodyUserSelect=document.body.style.userSelect,document.body.style.userSelect="none",!this.isWindowScroll&&this.scrollableElement.style&&(this.originalStyles.targetUserSelect=this.scrollableElement.style.userSelect,this.scrollableElement.style.userSelect="none")),this.originalStyles.bodyCursor=document.body.style.cursor,document.body.style.cursor=this.config.cursorGrabbing,!this.isWindowScroll&&this.scrollableElement.style&&(this.originalStyles.targetCursor=this.scrollableElement.style.cursor,this.scrollableElement.style.cursor=this.config.cursorGrabbing),window.addEventListener("mousemove",this.boundHandleMouseMove,{passive:!1}),window.addEventListener("mouseup",this.boundHandleMouseUp,{passive:!1}),window.addEventListener("mouseleave",this.boundHandleMouseLeave,{passive:!1})}_endDrag(){if(this.isDragging){if(this.isDragging=!1,this.config.preventTextSelection&&(document.body.style.userSelect=this.originalStyles.bodyUserSelect,!this.isWindowScroll&&this.scrollableElement.style&&(this.scrollableElement.style.userSelect=this.originalStyles.targetUserSelect)),document.body.style.cursor=this.originalStyles.bodyCursor,!this.isWindowScroll&&this.scrollableElement.style&&(this.scrollableElement.style.cursor=this.originalStyles.targetCursor),window.removeEventListener("mousemove",this.boundHandleMouseMove),window.removeEventListener("mouseup",this.boundHandleMouseUp),window.removeEventListener("mouseleave",this.boundHandleMouseLeave),this.dragVelocitySamplesX.length>0){const e=this.dragVelocitySamplesX.reduce((e,t)=>e+t,0)/this.dragVelocitySamplesX.length,t=this.dragVelocitySamplesY.reduce((e,t)=>e+t,0)/this.dragVelocitySamplesY.length;this.potentialVxFromDrag=-e*this.config.dragMultiplier,this.potentialVyFromDrag=-t*this.config.dragMultiplier}this.vx=this._clamp(this.potentialVxFromDrag,-this.config.maxVel,this.config.maxVel),this.vy=this._clamp(this.potentialVyFromDrag,-this.config.maxVel,this.config.maxVel),this.potentialVxFromDrag=0,this.potentialVyFromDrag=0,this.ensureAnimationLoopIsRunning()}}_immediateStop(){this._syncWithActualScroll(!0),this.vx=0,this.vy=0,this.isAnimating=!1,this.isTargetScrolling=!1}handleMouseDown(e){if(this.config.enableDrag&&0===e.button){if(this._updateScrollDimensions(),!this.isWindowScroll&&this.scrollableElement){const t=this.scrollableElement.getBoundingClientRect(),n=this.scrollableElement.offsetWidth-this.scrollableElement.clientWidth,i=this.scrollableElement.offsetHeight-this.scrollableElement.clientHeight;if(n>0&&e.clientX>=t.right-n&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom-i)return;if(i>0&&e.clientY>=t.bottom-i&&e.clientY<=t.bottom&&e.clientX>=t.left&&e.clientX<=t.right-n)return}(this.isWindowScroll||e.target===this.scrollableElement||this.scrollableElement.contains(e.target))&&(this._pe
58ndingDragEvent=e,this._dragHoldTimer=setTimeout(()=>{this._startDrag(this._pendingDragEvent),this._pendingDragEvent=null,this._dragHoldTimer=null},this.dragHoldThreshold),e.preventDefault())}}handleMouseMove(e){if(this._dragHoldTimer&&(Math.abs(e.clientX-this._pendingDragEvent.clientX)>2||Math.abs(e.clientY-this._pendingDragEvent.clientY)>2)&&(clearTimeout(this._dragHoldTimer),this._dragHoldTimer=null,this._startDrag(this._pendingDragEvent),this._pendingDragEvent=null),!this.isDragging)return;if(0===e.buttons&&this.isDragging)return void this._endDrag();this._updateScrollDimensions();let t=e.clientX-this.lastMouseX,n=e.clientY-this.lastMouseY,i=-t,r=-n;this._scrollBy(i,r),this.dragVelocitySamplesX.push(t),this.dragVelocitySamplesY.push(n),this.dragVelocitySamplesX.length>this.config.maxDragSamples&&(this.dragVelocitySamplesX.shift(),this.dragVelocitySamplesY.shift()),this.lastMouseX=e.clientX,this.lastMouseY=e.clientY}handleMouseLeave(e){this.isDragging&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&this._endDrag()}handleMouseUp(e){if(this._dragHoldTimer)return clearTimeout(this._dragHoldTimer),this._dragHoldTimer=null,void(this._pendingDragEvent=null);0===e.button&&this._endDrag()}handleKeyDown(e){if(!this.config.enableKeyboard)return;const t=e.target.nodeName;if(e.target.isContentEditable||["INPUT","TEXTAREA","SELECT","A","BUTTON","VIDEO"].includes(t))return;let n=this.isWindowScroll;if(!n&&this.scrollableElement&&"function"==typeof this.scrollableElement.contains&&(this.scrollableElement===document.activeElement||this.scrollableElement.contains(document.activeElement))&&(n=!0),n||document.activeElement!==document.body&&document.activeElement!==document.documentElement||!this.isWindowScroll||(n=!0),!n)return;this._updateScrollDimensions(),this._syncWithActualScroll(!0);let i=!1;const r=this.clientHeight*this.config.keyboardStepPageFactor;switch(e.key){case"ArrowUp":e.metaKey?this._immediateStop():e.metaKey||(this.vy-=this.config.keyboardArrowKeyVelocity,i=!0);break;case"ArrowDown":e.metaKey?this._immediateStop():e.metaKey||(this.vy+=this.config.keyboardArrowKeyVelocity,i=!0);break;case"ArrowLeft":e.metaKey||(this.vx-=this.config.keyboardArrowKeyVelocity,i=!0);break;case"ArrowRight":e.metaKey||(this.vx+=this.config.keyboardArrowKeyVelocity,i=!0);break;case"PageUp":this.currentScrollY=this.currentScrollY-r,this.vy=-this.config.keyboardPageKeyVelocity,i=!0;break;case"PageDown":this.currentScrollY=this.currentScrollY+r,this.vy=this.config.keyboardPageKeyVelocity,i=!0;break;case" ":e.shiftKey?(this.currentScrollY=this.currentScrollY-r,this.vy=-this.config.keyboardPageKeyVelocity):(this.currentScrollY=this.currentScrollY+r,this.vy=this.config.keyboardPageKeyVelocity),i=!0;break;case"Home":case"End":this._immediateStop()}i&&(e.preventDefault(),this.ensureAnimationLoopIsRunning())}scrollTo(e,t=!1){this.scrollToPosition({y:e},t)}scrollToPosition(e,t=!1){this._updateScrollDimensions(),this._syncWithActualScroll(!0);const n=void 0!==e.x?e.x:this.currentScrollX,i=void 0!==e.y?e.y:this.currentScrollY,r=this._clamp(n,0,this.maxScrollLeft),o=this._clamp(i,0,this.maxScrollTop);if(t)return this.currentScrollX=r,this.currentScrollY=o,this.vx=0,this.vy=0,this._scrollTo(r,o),void(this.isAnimating=!1);this.targetScrollX=r,this.targetScrollY=o,this.isTargetScrolling=!0;const s=this._getActualScrollPosition(),a=o-s.y,l=r-s.x,c=e=>{if(Math.abs(e)<1)return 0;const t=Math.min(60,Math.max(10,Math.abs(e)/5)),n=Math.pow(this.config.friction,t),i=e*(1-this.config.friction)/(1-n);return this._clamp(i,.8*-this.config.maxVel,.8*this.config.maxVel)};this.vx=c(l),this.vy=c(a),this.currentScrollX=s.x,this.currentScrollY=s.y,(Math.abs(l)>.5||Math.abs(a)>.5)&&this.ensureAnimationLoopIsRunning()}scrollToView(e,t={}){if(!(e&&e instanceof HTMLElement))return void console.warn("InertialScroll.scrollIntoView() requires a valid HTMLElement as first argument.");let n="auto",i="start",r="nearest";"boolean"==typeof t?n=t?"smooth":"auto":"object"==typeof t&&(n=t.behavior||"auto",i=t.block||"start",r=t.inline||"nearest"),this._updateScrollDimensions(),this._syncWithActualScroll(!0);const o=this.isWindowScroll?{top:0,left:0,width:window.innerWidth,height:window.innerHeight}:this.scrollableElement.getBoundingClientRect(),s=e.getBoundingClientRect();let a=this.currentScrollY,l=this.currentScrollX;if("start"===i)a+=s.top-o.top;else if("center"===i)a+=s.top-o.top-o.height/2+s.height/2;else if("end"===i)a+=s.bottom-o.bottom;else{const e=s.top<o.top,t=s.bottom>o.bottom;e&&!t?a+=s.top-o.top:t&&!e&&(a+=s.bottom-o.bottom)}if("start"===r)l+=s.left-o.left;else if("center"===r)l+=s.left-o.left-o.width/2+s.width/2;else if("end"===r)l+=s.right-o.right;else{const e=s.left<o.left,t=s.right>o.right;e&&!t?l+=s.left-o.left:t&&!e&&(l+=s.right-o.right)}a=this._clamp(a,0,this.maxScrollTop),l=this._clamp(l,0,this.maxScrollLeft);const c="smooth"!==n;this.scrollToPosition({x:l,y:a},c)}init(){this.destroy(),this._updateScrollDimensions(),this._syncWithActualScroll(!0),this.config.enableWheel&&this.eventTargetForWheel&&this.eventTargetForWheel.addEventListener("wheel",this.boundHandleWheel,{passive:!1}),this.config.enableDrag&&this.eventTargetForMouseDown&&this.eventTargetForMouseDown.addEventListener("mousedown",this.boundHandleMouseDown,{passive:!1}),this.config.enableKeyboard&&this.eventTargetForKeyboard&&this.eventTargetForKeyboard.addEventListener("keydown",this.boundHandleKeyDown,!1)}stop(){this._immediateStop()}destroy(){this.eventTargetForWheel&&this.eventTargetForWheel.removeEventListener("wheel",this.boundHandleWheel),this.eventTargetForMouseDown&&this.eventTargetForMouseDown.removeEventListener("mousedown",this.boundHandleMouseDown),this.eventTargetForKeyboard&&this.eventTargetForKeyboard.removeEventListener("keydown",this.boundHandleKeyDown),window.removeEventListener("mousemove",this.boundHandleMouseMove),window.removeEventListener("mouseup",this.boundHandleMouseUp),window.removeEventListener("mouseleave",this.boundHandleMouseLeave),this.isAnimating=!1,this.vx=0,this.vy=0,this.isDragging&&this._endDrag(
58),this.config.preventTextSelection&&this.originalStyles.bodyUserSelect&&(document.body.style.userSelect=this.originalStyles.bodyUserSelect),this.originalStyles.bodyCursor&&(document.body.style.cursor=this.originalStyles.bodyCursor),!this.isWindowScroll&&this.scrollableElement&&this.scrollableElement.style&&(this.config.preventTextSelection&&this.originalStyles.targetUserSelect&&(this.scrollableElement.style.userSelect=this.originalStyles.targetUserSelect),this.originalStyles.targetCursor&&(this.scrollableElement.style.cursor=this.originalStyles.targetCursor))}pause(){this.destroy()}resume(){this.init()}}"function"==typeof define&&define.amd&&define("InertialScroll",[],function(){return InertialScroll}),define("radical/component/scrollInertia",["InertialScroll"],function(e){return e}),define("radical/module/scrollInertia",["radical/component/console","radical/component/scrollInertia","radical/component/scrollProxy","radical/component/global"],function(e,t,n,i){return e.log("radical/module/scrollInertia::loaded"),function(r,o){e.log("radical/module/scrollInertia::init",r,o);const s=i.getItem("prefersReducedMotion")||!1,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);if(s||a)return e.log("radical/module/scrollInertia::init -> skipping animations due to user preference!"),n;$(r);const l=new t(o=o||{});return setTimeout(()=>{l.init(),e.log("radical/module/scrollInertia::init -> instance initialized")},250),{pause:function(){return e.log("radical/module/scrollInertia::pause()"),l.pause()},resume:function(){return e.log("radical/module/scrollInertia::resume()"),l.resume()},scrollTo:function(t,n){return e.log("radical/module/scrollInertia::scrollTo()",t,n),l.scrollTo(t,n)},scrollToView:function(t,n){return e.log("radical/module/scrollInertia::scrollToView()",t,n),l.scrollToView(t,n)},stop:function(){return e.log("radical/module/scrollInertia::stop()"),l.stop()},destroy:function(){return e.log("radical/module/scrollInertia::destroy()"),l.destroy()}}}}),define("radical/module/nextSectionTracker",["jquery","radical/component/console","radical/component/scrollRegistry","radical/component/resizeRegistry","radical/component/maffs"],function(e,t,n,i,r){t.log("radical/module/nextSectionTracker::loaded");const o={destroy:function(){t.log("radical/module/nextSectionTracker::destroy")}};return function(t,s){const a=void 0!==s.id?s.id:void 0!==t.id?t.id:`nst_${Date.now()}`,l=(void 0!==s.once&&s.once,void 0!==s.attr?s.attr:"--ns-peek"),c=void 0!==s.nextSectionSelector?e(s.nextSectionSelector):t.nextElementSibling;if(null===c||c.length<=0)return console.warn("nextSectionTracker: unable to find next section"),o;let u=0;const d=()=>{const e=c.getBoundingClientRect().top;if(e<=0)return void(100!=u&&(u=100,t.style.setProperty(l,u)));if(e>=n.scrollMetrics.docScrollBottom)return void(0!=u&&(u=0,t.style.setProperty(l,u)));let o=100-100*e/i.screenMetrics.vH;o=r.roundToDec(o,2),u=o,t.style.setProperty(l,u)};return d(),n.onScroll(`nst_${a}`,d),i.onResizeThrottled(`nst_${a}`,d),o}}),define("radical/module/mpv",["jquery","radical/component/console","ikelos","radical/component/scrollInstance","radical/component/global","radical/component/UAjammer"],function(e,t,n,i,r,o){return t.log("radical/module/mpv::loaded"),function(s,a){let l=!1;const c=a.idBase;void 0===c&&console.warn("mpv : missing idBase"),a.ar;const u=e(s),d=(u.attr("aria-controls"),u.parents(".mpv-section")),h=`anchorFor-${c}`,p=`anchorBottomFor-${c}`;d.before(`<div id="${h}"></div>`),d.after(`<div id="${p}"></div>`);let f=n(`#${c}-video`);const m=d.find("[data-tip]");let g=document.querySelector('[data-fancy-mouse="tooltip"]'),v=void 0===a.scrollToPlay||a.scrollToPlay;v="phone"!==o.Venue&&v,u.on("click",function(e){e.preventDefault(),function(){if(f=void 0!==f?f:n(`#${c}-video`),l){if(void 0===f)return;f.isPlaying()?function(){try{f.pause(),S("PLAY")}catch(e){console.warn("unable to pause vid")}}():T(!0)}else!function(){if(l)return;l=!0,u.addClass("showVid"),T(!0)}()}()});let y,_=!1,x=!1,b=window;!function(){if(_)return b;const e=i();x=e.hasScroller,b=x?e.scroller:window,_=!0}();let w=r.getItem("navHeight");function T(e=!0){e&&function(){if(v){isNaN(w)&&(w=r.setItem("navHeight"));var e=document.querySelector(`#${p}`).offsetTop-(window.innerHeight-(isNaN(w)?0:w));x?(clearTimeout(y),b.pause(),window.scrollTo({top:e,behavior:"smooth"}),y=setTimeout(()=>b.resume(),400)):b.scrollTo(0,e)}}();try{f.play(),S("PAUSE")}catch(e){console.warn("unable to play vid")}}function S(e){m.length<=0||null===g||(e=e.toString(),m.attr({"data-tip-content":e,"data-tip":e,"aria-label":e}),g.style.setProperty("--tip",`"${e}"`))}return{destroy:function(){t.log("radical/module/mpv::destroy")}}}}),require(["jquery","ikelos","audia","radical/component/module/registry","radical/component/global","radical/component/console","radical/component/UAjammer","radical/component/debounce","radical/component/endedevents","radical/component/analytics","radical/component/lazyload","radical/component/inView","radical/component/fancyLoadIn","radical/component/flagWhenStuck","radical/component/resizeRegistry","radical/component/scrollRegistry","radical/component/scrollJammer","radical/component/oldBrowserWarning","radical/component/egg/loader","radical/module/aria-popup","radical/module/image","radical/module/backgroundImage","radical/module/video","radical/module/navhandler","radical/module/searchForm","radical/module/subnavhandler","radical/module/subnavDropdown","radical/module/caret","radical/module/gallery","radical/module/slider","radical/module/fader","radical/module/backgroundSlideshow","radical/module/award","radical/module/loadMore","radical/module/eTrig","radical/module/directorsIndex","radical/module/fullscreenText","radical/module/scrollDownLink","radical/module/masonry","radical/module/deferload","radical/module/loopyvideo","radical/module/video-bg-clips","radical/component/maffs","radical/module/fancyToolTips","radical/module/hscroller","radical/module/capabilities","radical/module/featuredCard","radical/module/fancyReveal","radical/module/plax","radical/module/hoverFun","radical/module/onPageNav","radical/module/expando","radical/module/fancyScrollOut","radical/module/fancyScrollIn","radical/module/mediaModal","radical/module/clock","radical/module/scrollInertia","radical/module/nextSectionTracker","radical/module/mpv"],function(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m,g,v){var y;y=window.location.href.indexOf("-cs.radops.io")>=1?"stage":window.location.href.indexOf("-dev.radops.co")>=1?"dev":"prod";const _=!0===window.matchMedia("(prefers-reduced-motion: reduce)")||!0===window.matchMedia("(prefers-reduced-motion: reduce)").matches;var x;
58switch(r.setItem("prefersReducedMotion",_),m.init(),r.setItem("version","4.6.0"),r.setItem("environment",y),r.setItem("debug","dev"==r.getItem("environment")),r.setItem("ga-code","dev"==r.getItem("environment")?"UA-48389343-2":"UA-2327273-6"),r.getItem("environment")){case"dev":x="G-24DRBF4JRW";break;case"stage":x="G-EPR496BLWD";break;default:x="G-WRWMCF42M6"}o.log("GA4 - "+x),r.setItem("ga4-code",x),r.setItem("UAjammer",s),r.setItem("edit_mode",e("html").hasClass("groowm_edit_mode")),r.setItem("cssTs",e("body").data("cssts")),d.init(),l.init();const b={root:null,threshold:.01};(document.querySelectorAll('img[loading="lazy"]').forEach(e=>{new IntersectionObserver(function(t,n){t.forEach(t=>{t.isIntersecting&&e.removeAttribute("loading"),n.unobserve(e)})},b).observe(e)}),t("option","verbose",!0),window.hasOwnProperty("MediaSource")&&"function"==typeof MediaSource)?(t("option","enable_dash",!1),t("option","disabled_groups",["auto"]),t("option","default_group","720p HQ")):(o.log("main - config video NO DASH"),t("option","enable_dash",!1),t("option","disabled_groups",["auto"]),r.getItem("UAjammer").Mobile?(o.log("main - MOBILE SOURCES - 480 prefered"),t("option","default_group","480p")):(o.log("main - OTHER SOURCES (DESKTOP etc) - 720 prefered"),t("option","default_group","720p HQ")));t("option","imgDir","/img/ikelosui/symbol/svg/"),t("option","hideControlsAfter",2e3),t("option","ui_callbacks",{addMarkup:function(e){var t=e._inst,n=t.$els.wrap.parents("figure").find("figcaption.bottom_third_src"),i=e._vid.options();if(n.length>0)t.$els.bottomThird.html(n.html());else if(void 0!==i.title&&i.title.length>0){var r=i.title;r=r.replace("<br>"," "),t.$els.bottomThird.html('<div class="title_wrapper">'+r+"</div>")}},ended:function(t){if(o.log("<<< ended: ",t),!(e("#"+t._vid.id).parents(".gallery_wrap").length>0)){var n=t._inst;void 0!==n.state.poster&&n.setPoster(n.state.poster)}},fullscreenExit:function(t){o.log("<<< fullscreenExit : ",t._vid.id);var n=e("#"+t._vid.id).parents(".gallery_wrap").length>0;o.log("<<< inGallery : ",n),n&&e("body").removeClass("fullscreen_gallery")},fullscreenEnter:function(t){o.log(">>> fullscreenEnter : ",t._vid.id);var n=e("#"+t._vid.id).parents(".gallery_wrap").length>0;o.log(">>> inGallery : ",n),n&&(e("body").hasClass("fullscreen_gallery")?e("body").removeClass("fullscreen_gallery"):e("body").addClass("fullscreen_gallery"))},fullscreenToggle_pre:function(t){return o.log("fullscreenToggle_pre : ",t._vid.id),{fullscreenEl:e("#"+t._vid.id).parents(".gallery_wrap").length>0?e(".gallery_wrap")[0]:void 0}}}),e(function(){o.log("main - env:",r.getItem("environment")),o.log("main - edit:",r.getItem("edit_mode")),i.init({live:!0}),u.init(),h.init(),g.init(),c.trackPage();var t=window.location.protocol+"//"+window.location.host,n=e(".related_section").length>0,s=n?-.75*e(".related_section").height():0,a=e("._faderBasic_uber_wrap").length>0,l=document.body.scrollHeight,d=window.innerHeight,f=(e("#main_footer").height(),d+e(window).scrollTop()),x=function(){l=document.body.scrollHeight;var e=Math.round(100*f/l);return e>=100?100:25*Math.round(e/25)},b={pageTitle:e("title").text(),path:window.location.pathname,fullPath:window.location.pathname+(window.location.search.length>0?"?"+window.location.search:""),maxViewedPerc:x()},w={relatedProjectsInView:!1,didScroll:!1};"/"===window.location.pathname?b.section="home page":0===window.location.pathname.indexOf("/work")?b.section="work section":window.location.pathname.indexOf("/directors")>=0?b.section="directors section":0===window.location.pathname.indexOf("/studio")?b.section="studio page":0===window.location.pathname.indexOf("/about")?b.section="about page":0===window.location.pathname.indexOf("/news")?b.section="news page":0===window.location.pathname.indexOf("/contact")?b.section="contact page":0===window.location.pathname.indexOf("/search")?b.section="search page":b.section="other",b.maxViewedPerc>0&&c.trackEvent("page viewed % >= ",b.maxViewedPerc,b.section,void 0,!0),e("body").on("click",'[href^="mailto:"]',function(t){var n=e(this).hasClass("contact_name")?e(this).text():e(this).parents(".contact_card").find(".contact_name").first().text();c.trackEvent("contact",n,"email",void 0,!1,"beacon")}).on("click",'[href^="tel:"]',function(t){var n=e(this).hasClass("contact_name")?e(this).text():e(this).parents(".contact_card").find(".contact_name").first().text();c.trackEvent("contact",n,"phone",void 0,!1,"beacon")}).on("mousedown touchstart",'a[href^="http"]:not([href^="'+t+'"])',function(t){c.trackEvent("external",e(this).attr("href"),void 0,!1,"beacon")}).on("click",".related_links_wrap a",function(){c.trackEvent("related projects","clicked",e(this).attr("href"),void 0,!1,"beacon")});const T=document.documentElement,S=()=>{const t=parseInt(e("#main_nav_wrap").height());if(void 0===t)return void setTimeout(S,100);const n=e("#sub_nav_wrap").length<=0?0:parseInt(e("#sub_nav_wrap").outerHeight());
58T.style.setProperty("--rm-nav-h",`${t}px`),T.style.setProperty("--rm-subnav-h",`${n}px`),r.setItem("navHeight",t),r.setItem("subNavHeight",n)};S(),e(window).on("resizeStopped.navUnits",S);var E=0;function M(t){E=document.documentElement.scrollTop,e(window).off("scroll.scrollListener")}window._scrollDir=null,e(window).on("scroll.scrollListener",M),e(window).on("scrollStopped.scrollListener",function(t){const n=document.documentElement.scrollTop,i=Math.abs(n-E),r=n>E?"Down":"Up",o={direction:r,isDown:"Down"===r,isUp:"Up"===r,distance:i,startY:E,endY:n};if(window._scrollDir=r,i>=200){const e=new CustomEvent(`scroll${r}`,{detail:o});window.dispatchEvent(e)}e(window).on("scroll.scrollListener",M)}),e(window).on("resizeStopped.analytics",function(t){l=document.body.scrollHeight,d=window.innerHeight,e("#main_footer").height(),f=d+e(window).scrollTop()}).on("scrollThrottled.analytics scrollStopped.analytics",function(){!function(){f=d+e(window).scrollTop();var t=x();t>b.maxViewedPerc&&(b.maxViewedPerc=t,c.trackEvent("page viewed % >
58= ",b.maxViewedPerc,b.section)),w.didScroll||(w.didScroll=!0,c.trackEvent("scroll","did scroll",b.section)),n&&!w.relatedProjectsInView&&e(".related_section").inView(s)&&(w.relatedProjectsInView=!0,c.trackEvent("related projects","on screen",b.section,void 0,!0)),a&&e("._faderBasic_uber_wrap:not(.onScreenTracked)").each(function(){var t=-.75*e(this).data("myHeight");e(this).inView(t)&&(e(this).addClass("onScreenTracked"),c.trackEvent("slideshow","on screen"))})}()}),v.init(),e("body").removeClass("no-transitions").addClass("js-ready"),e("body").on("keydown",function(t){e(this).addClass("keyboardUser")}),"phone"!==r.getItem("UAjammer").Venue&&"tablet"!==r.getItem("UAjammer").Venue||(setTimeout(function(){window.scrollTo(0,1)},0),e(window).on("load",function(){setTimeout(function(){window.scrollTo(0,1)},0)})),_&&(console.warn("prefersReducedMotion ... "),document.querySelectorAll("video[autoplay]").forEach(e=>{e.removeAttribute("autoplay")}));const A=document.querySelector("body");let R=!1;const C=async()=>{m.scrollMetrics.docScrollTop>=10&&!R?(R=!0,A.setAttribute("data-off-top","yarp"),A.setAttribute("data-was-off-top","yarp")):m.scrollMetrics.docScrollTop<10&&R&&(R=!1,A.removeAttribute("data-off-top")),p.flagEls()};m.onScrollThrottled("trackOffTop",C),m.onScrollStopped("trackOffTop",C),"prod"===y&&e.ajax({url:"https://fast.fonts.net/lt/1.css?apiType=css&c=df85f3d0-4eeb-41b4-b22c-de69649c484f&fontids=1488928",headers:{Accept:"text/css"}})})}),define("radical/main",function(){})})(),__had$&&window.hasOwnProperty("$")&&$.noConflict(),delete __had$;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.