!function(t){function e(e){for(var n,r,o=e[0],a=e[1],s=0,l=[];s ");else if("object"==typeof e){var o=[];for(var a in e)if(e.hasOwnProperty(a)){var s=e[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):F(s)))}r="{"+o.join(", ")+"}"}return n+(i?"("+i+")":"")+"["+r+"]: "+t.replace(dt,"\n ")} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Ct,At,Tt,Ot={"ɵɵdefineInjectable":O,"ɵɵdefineInjector":P,"ɵɵinject":vt,"ɵɵgetFactoryOf":function t(e){var n=e;if(H(e))return function(){var e=t(G(n));return e?e():null};var i=I(n)||D(n);return i&&void 0!==i.factory?i.factory:null} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */,"ɵɵinvalidFactoryDep":yt},_t=function(){},Pt=function(){}; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function It(t,e){"number"!=typeof t&&zt(e,typeof t,"number","===")}function kt(t,e,n){It(t,"Expected a number"),Ft(t,n,"Expected number to be less than or equal to"),function(t,e,n){t>=e||zt("Expected number to be greater than or equal to",t,e,">=")}(t,e)}function Dt(t,e){"string"!=typeof t&&zt(e,null===t?"null":typeof t,"string","===")}function Rt(t,e,n){t!=e&&zt(n,t,e,"==")}function Lt(t,e,n){t==e&&zt(n,t,e,"!=")}function Nt(t,e,n){t!==e&&zt(n,t,e,"===")}function jt(t,e,n){t===e&&zt(n,t,e,"!==")}function Vt(t,e,n){te||zt(n,t,e,">")}function Bt(t,e){null==t&&zt(e,t,null,"!=")}function zt(t,e,n,i){throw new Error("ASSERTION ERROR: "+t+(null==i?"":" [Expected=> "+n+" "+i+" "+e+" <=Actual]"))}function Gt(t){Rt("undefined"!=typeof Node&&t instanceof Node||"object"==typeof t&&null!=t&&"WebWorkerRenderNode"===t.constructor.name,!0,"The provided value must be an instance of a DOM Node but got "+F(t))}function Ht(t,e){var n=t?t.length:0;Vt(e,n,"Index expected to be less than "+n+" but got "+e)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Wt(t,e){for(var n=0;n=t.length?t.push(n):t.splice(e,0,n)}function Yt(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Zt(t,e){for(var n=[],i=0;i=0?t[1|i]=n:function(t,e,n,i){ngDevMode&&Ft(e,t.length,"Can't insert past array end.");var r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;){var o=r-2;t[r]=t[o],r--}t[e]=n,t[e+1]=i}}(t,i=~i,e,n),i}function Qt(t,e){var n=$t(t,e);if(n>=0)return t[1|n]}function $t(t,e){return function(t,e,n){ngDevMode&&Rt(Array.isArray(t),!0,"Expecting an array");for(var i=0,r=t.length>>n;r!==i;){var o=i+(r-i>>1),a=t[o<e?r=o:i=o+1}return~(r<0;)ngDevMode&&Bt(e[15],"Declaration view should be defined if nesting level is greater than 0."),e=e[15],t--;return e}(t,tn.lFrame.contextLView))[8]}function kn(){return tn.lFrame.selectedIndex}function Dn(t){tn.lFrame.selectedIndex=t}function Rn(){var t=tn.lFrame;return He(t.tView,t.selectedIndex)}function Ln(){tn.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function Nn(){tn.lFrame.currentNamespace="http://www.w3.org/1998/MathML/"}function jn(){tn.lFrame.currentNamespace=null}function Vn(t,e){ngDevMode&&ke(t);for(var n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[a]<0&&(t[18]+=65536),(o>11>16&&(3&t[2])===e&&(t[2]+=2048,o.call(a)):o.call(a)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Hn=function(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */};function Wn(t,e){Bt(t,"should be called with a TNode"),Rt(t.type,e,"should be a "+Kn(e))}function qn(t){for(var e=[],n=1;n"}function Xn(t,e,n){for(var i=Ve(t),r=0;re){a=o-1;break}}}for(;o>16}function ni(t,e){for(var n=ei(t),i=e;n>0;)i=i[15],n--;return i} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function ii(t){return"string"==typeof t?t:null==t?"":""+t}function ri(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():ii(t)}var oi=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(J);function ai(t){return{name:"window",target:t.ownerDocument.defaultView}}function si(t){return{name:"document",target:t.ownerDocument}}function ci(t){return{name:"body",target:t.ownerDocument.body}}function li(t){return t instanceof Function?t():t} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var ui=!0;function di(t){var e=ui;return ui=t,e}var pi=0;function hi(t,e){var n=gi(t,e);if(-1!==n)return n;var i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,fi(i.data,t),fi(e,null),fi(i.blueprint,null));var r=mi(t,e),o=t.injectorIndex;if($n(r))for(var a=ti(r),s=ni(r,e),c=s[1].data,l=0;l<8;l++)e[o+l]=s[a+l]|c[a+l];return e[o+8]=r,o}function fi(t,e){t.push(0,0,0,0,0,0,0,0,e)}function gi(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+8]?-1:t.injectorIndex}function mi(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=e[6],i=1;n&&-1===n.injectorIndex;)n=(e=e[15])?e[6]:null,i++;return n?n.injectorIndex|i<<16:-1}function vi(t,e,n){!function(t,e,n){ngDevMode&&Rt(e.firstCreatePass,!0,"expected firstCreatePass to be true");var i="string"!=typeof n?n[ot]:n.charCodeAt(0)||0;null==i&&(i=n[ot]=pi++);var r=255&i,o=1<0?255&e:e}(n);if("function"==typeof o){En(e,t);try{var a=o();if(null!=a||i&v.Optional)return a;throw new Error("No provider for "+ri(n)+"!")}finally{_n()}}else if("number"==typeof o){if(-1===o)return new Ai(t,e);var s=null,c=gi(t,e),l=-1,u=i&v.Host?e[16][6]:null;for((-1===c||i&v.SkipSelf)&&(l=-1===c?mi(t,e):e[c+8],Ci(i,!1)?(s=e[1],c=ti(l),e=ni(l,e)):c=-1);-1!==c;){l=e[c+8];var d=e[1];if(Ei(o,c,d.data)){var p=Si(c,e,n,s,i,u);if(p!==wi)return p}Ci(i,e[1].data[c+8]===u)&&Ei(o,c,e)?(s=d,c=ti(l),e=ni(l,e)):c=-1}}}if(i&v.Optional&&void 0===r&&(r=null),0==(i&(v.Self|v.Host))){var h=e[9],f=gt(void 0);try{return h?h.get(n,r,i&v.Optional):wt(n,r,i&v.Optional)}finally{gt(f)}}if(i&v.Optional)return r;throw new Error("NodeInjector: NOT_FOUND ["+ri(n)+"]")}var wi={};function Si(t,e,n,i,r,o){var a=e[1],s=a.data[t+8],c=xi(s,a,n,null==i?xe(s)&&ui:i!=a&&3===s.type,r&v.Host&&o===s);return null!==c?Mi(e,a,c,s):wi}function xi(t,e,n,i,r){for(var o=t.providerIndexes,a=e.data,s=65535&o,c=t.directiveStart,l=t.directiveEnd,u=o>>16,d=r?s+u:l,p=i?s:s+u;p=c&&h.type===n)return p}if(r){var f=a[c];if(f&&Ee(f)&&f.type===n)return c}return null}function Mi(t,e,n,i){var r=t[n],o=e.data;if(r instanceof Hn){var a=r;if(a.resolving)throw new Error("Circular dep for "+ri(o[n]));var s=di(a.canSeeViewProviders);a.resolving=!0;var c=void 0;a.injectImpl&&(c=gt(a.injectImpl)),En(t,i);try{r=t[n]=a.factory(void 0,o,t,i),e.firstCreatePass&&n>=i.directiveStart&&(ngDevMode&&function(t){void 0!==t.type&&null!=t.selectors&&void 0!==t.inputs||zt("Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.")}(o[n]), /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function(t,e,n){ngDevMode&&ke(n);var i=e.onChanges,r=e.onInit,o=e.doCheck;i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)),r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(-t,r),o&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,o))}(n,o[n],e))}finally{a.injectImpl&>(c),di(s),a.resolving=!1,_n()}}return r}function Ei(t,e,n){var i=1<',!e.querySelector||e.querySelector("svg")?(e.innerHTML='

',e.querySelector&&e.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */()?this.getInertBodyElement=this.getInertBodyElement_DOMParser:this.getInertBodyElement=this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return t.prototype.getInertBodyElement_XHR=function(t){t=""+t+"";try{t=encodeURI(t)}catch(t){return null}var e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(void 0);var n=e.response.body;return n.removeChild(n.firstChild),n},t.prototype.getInertBodyElement_DOMParser=function(t){t=""+t+"";try{var e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(t){return null}},t.prototype.getInertBodyElement_InertDocument=function(t){var e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=t,e;var n=this.inertDocument.createElement("body");return n.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n},t.prototype.stripCustomNsAttrs=function(t){for(var e=t.attributes,n=e.length-1;0"),!0},t.prototype.endElement=function(t){var e=t.nodeName.toLowerCase();fr.hasOwnProperty(e)&&!cr.hasOwnProperty(e)&&(this.buf.push(""))},t.prototype.chars=function(t){this.buf.push(Er(t))},t.prototype.checkClobberedElement=function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e},t}(),xr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mr=/([^\#-~ |!])/g;function Er(t){return t.replace(/&/g,"&").replace(xr,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Mr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function Cr(t,e){var n=null;try{ar=ar||new $i(t);var i=e?String(e):"";n=ar.getInertBodyElement(i);var r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=n.innerHTML,n=ar.getInertBodyElement(i)}while(i!==o);var a=new Sr,s=a.sanitizeChildren(Ar(n)||n);return Ji()&&a.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var c=Ar(n)||n;c.firstChild;)c.removeChild(c.firstChild)}}function Ar(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(t)?t.content:null}!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(sr||(sr={})); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var Tr=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:attr|calc|var))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Or=/^url\(([^)]+)\)$/;function _r(t){if(!(t=String(t).trim()))return"";var e=t.match(Or);return e&&nr(e[1])===e[1]||t.match(Tr)&&function(t){for(var e=!0,n=!0,i=0;i=0){var f;Kr(f=Ue(i[h]),c=Wr(i,h,f)),n=c;break}}}}return n||null}function Wr(t,e,n){return{lView:t,nodeIndex:e,native:n,component:void 0,directives:void 0,localRefs:void 0}}function qr(t){var e,n=Ke(t);if(Array.isArray(n)){var i=Zr(n,t);(r=Wr(n,i,(e=qe(i,n))[0])).component=t,Kr(t,r),Kr(r.native,r)}else{var r;e=qe((r=n).nodeIndex,r.lView)}return e}function Kr(t,e){t.__ngContext__=e}function Xr(t,e){for(var n=t[1].firstChild;n;){if(Ge(n,t)===e)return n.index;n=Yr(n)}return-1}function Yr(t){if(t.child)return t.child;if(t.next)return t.next;for(;t.parent&&!t.parent.next;)t=t.parent;return t.parent&&t.parent.next}function Zr(t,e){var n=t[1].components;if(n)for(var i=0;io?d="":(ngDevMode&&Lt(r[u],0,"We do not match directives on namespaced attributes"),d=r[u+1].toLowerCase());var p=8&i?d:null;if(p&&-1!==eo(p,l,0)||2&i&&l!==d){if(ao(i))return!1;a=!0}}}}else{if(!a&&!ao(i)&&!ao(c))return!1;if(a&&ao(c))continue;a=!1,i=c|1&i}}return ao(i)||a}function ao(t){return 0==(1&t)}function so(t,e,n,i){if(null===e)return-1;var r=0;if(i||!n){for(var o=!1;r-1)for(n++;n0?'="'+s+'"':"")+"]"}else 8&i?r+="."+a:4&i&&(r+=" "+a);else""===r||ao(a)||(e+=uo(o,r),r=""),i=a,o=o||!ao(i);n++}return""!==r&&(e+=uo(o,r)),e} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var ho="undefined"==typeof ngDevMode||ngDevMode?{__brand__:"NO_CHANGE"}:{}; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function fo(t){ngDevMode&&Ie(t);var e=t[3];return we(e)?e[3]:e}function go(t){var e=function(t){ngDevMode&&Bt(t,"component");for(var e=be(t)?t:Xe(t);e&&!(512&e[2]);)e=fo(e);return ngDevMode&&Ie(e),e}(t);return ngDevMode&&Bt(e[8],"RootView has no context. Perhaps it is disconnected?"),e[8]}function mo(t){return yo(t[13])}function vo(t){return yo(t[4])}function yo(t){for(;null!==t&&!we(t);)t=t[4];return t} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function bo(t){ngDevMode&&Ut(t,0,"Can only advance forward"),So(an(),on(),kn()+t,pn())}function wo(t){So(an(),on(),t,pn())}function So(t,e,n,i){if(ngDevMode&&Ut(n,-1,"Invalid index"),ngDevMode&&Ht(e,n+20),!i)if(3==(3&e[2])){var r=t.preOrderCheckHooks;null!==r&&Fn(e,r,n)}else{var o=t.preOrderHooks;null!==o&&Un(e,o,0,n)}Dn(n)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var xo={marker:"element"},Mo={marker:"comment"}; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Eo(t,e){return ngDevMode&&kt(t,0,32767),ngDevMode&&kt(e,0,32767),t<<17|e<<2}function Co(t){return ngDevMode&&It(t,"expected number"),t>>17&32767}function Ao(t){return ngDevMode&&It(t,"expected number"),2==(2&t)}function To(t){return ngDevMode&&It(t,"expected number"),2|t}function Oo(t){return ngDevMode&&It(t,"expected number"),(131068&t)>>2}function _o(t,e){return ngDevMode&&It(t,"expected number"),ngDevMode&&kt(e,0,32767),-131069&t|e<<2}function Po(t){return ngDevMode&&It(t,"expected number"),1==(1&t)}function Io(t){return ngDevMode&&It(t,"expected number"),1|t} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function ko(t,e){Object.defineProperty(t,"debug",{value:e,enumerable:!1})} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Do,Ro,Lo,No=("undefined"==typeof ngDevMode||!!ngDevMode)&&at();function jo(t){if(null==t)return"";var e=t.lastIndexOf("_Template");return"_"+(-1===e?t:t.substr(0,e))}var Vo=function(){function t(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m,v,y,b,w,S,x,M,E,C,A,T,O,_,P){this.type=t,this.id=e,this.blueprint=n,this.template=i,this.queries=r,this.viewQuery=o,this.node=a,this.data=s,this.bindingStartIndex=c,this.expandoStartIndex=l,this.expandoInstructions=u,this.firstCreatePass=d,this.firstUpdatePass=p,this.staticViewQueries=h,this.staticContentQueries=f,this.preOrderHooks=g,this.preOrderCheckHooks=m,this.contentHooks=v,this.contentCheckHooks=y,this.viewHooks=b,this.viewCheckHooks=w,this.destroyHooks=S,this.cleanup=x,this.contentQueries=M,this.components=E,this.directiveRegistry=C,this.pipeRegistry=A,this.firstChild=T,this.schemas=O,this.consts=_,this.incompleteFirstPass=P}return Object.defineProperty(t.prototype,"template_",{get:function(){var t=[];return Bo(this.firstChild,t),t.join("")},enumerable:!0,configurable:!0}),t}(),Fo=function(){function t(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m,v,y,b,w,S,x,M,E,C,A,T,O,_,P){this.tView_=t,this.type=e,this.index=n,this.injectorIndex=i,this.directiveStart=r,this.directiveEnd=o,this.directiveStylingLast=a,this.propertyBindings=s,this.flags=c,this.providerIndexes=l,this.tagName=u,this.attrs=d,this.mergedAttrs=p,this.localNames=h,this.initialInputs=f,this.inputs=g,this.outputs=m,this.tViews=v,this.next=y,this.projectionNext=b,this.child=w,this.parent=S,this.projection=x,this.styles=M,this.stylesWithoutHost=E,this.residualStyles=C,this.classes=A,this.classesWithoutHost=T,this.residualClasses=O,this.classBindings=_,this.styleBindings=P}return Object.defineProperty(t.prototype,"type_",{get:function(){switch(this.type){case 0:return"TNodeType.Container";case 3:return"TNodeType.Element";case 4:return"TNodeType.ElementContainer";case 5:return"TNodeType.IcuContainer";case 1:return"TNodeType.Projection";case 2:return"TNodeType.View";default:return"TNodeType.???"}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"flags_",{get:function(){var t=[];return 16&this.flags&&t.push("TNodeFlags.hasClassInput"),8&this.flags&&t.push("TNodeFlags.hasContentQuery"),32&this.flags&&t.push("TNodeFlags.hasStyleInput"),128&this.flags&&t.push("TNodeFlags.hasHostBindings"),2&this.flags&&t.push("TNodeFlags.isComponentHost"),1&this.flags&&t.push("TNodeFlags.isDirectiveHost"),64&this.flags&&t.push("TNodeFlags.isDetached"),4&this.flags&&t.push("TNodeFlags.isProjected"),t.join("|")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"template_",{get:function(){var t=[];if(t.push("<",this.tagName||this.type_),this.attrs)for(var e=0;e"),Bo(this.child,t),t.push(""),t.join("")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styleBindings_",{get:function(){return Uo(this,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classBindings_",{get:function(){return Uo(this,!0)},enumerable:!0,configurable:!0}),t}();function Uo(t,e){for(var n=t.tView_.data,i=[],r=e?t.classBindings:t.styleBindings,o=Co(r),a=Oo(r),s=0!==a,c=s?a:o;0!==c;){var l=n[c],u=n[c+1];i.unshift({key:l,index:c,isTemplate:s,prevDuplicate:Ao(u),nextDuplicate:Po(u),nextIndex:Oo(u),prevIndex:Co(u)}),c===o&&(s=!1),c=Co(u)}return i.push((e?t.residualClasses:t.residualStyles)||null),i}function Bo(t,e){for(;t;)e.push(t.template_),t=t.next}var zo,Go=No&&Ur("TViewData")||null,Ho=No&&Ur("LViewBlueprint")||null,Wo=No&&Ur("MatchesArray")||null,qo=No&&Ur("TViewComponents")||null,Ko=No&&Ur("TNodeLocalNames")||null,Xo=No&&Ur("TNodeInitialInputs")||null,Yo=(No&&Ur("TNodeInitialData"),No&&Ur("LCleanup")||null),Zo=No&&Ur("TCleanup")||null;function Jo(t){if(t){var e=t.debug;return Bt(e,"Object does not have a debug representation."),e}return t}function Qo(t,e){void 0===e&&(e=!1);var n=Ue(t);if(n){var i=n.nodeType===Node.TEXT_NODE,r=(i?n.textContent:n.outerHTML)||"";if(e||i)return r;var o=">"+n.innerHTML+"<";return r.split(o)[0]+">"}return null}var $o=function(){function t(t){this._raw_lView=t}return Object.defineProperty(t.prototype,"flags",{get:function(){var t=this._raw_lView[2];return{__raw__flags__:t,initPhaseState:3&t,creationMode:!!(4&t),firstViewPass:!!(8&t),checkAlways:!!(16&t),dirty:!!(64&t),attached:!!(128&t),destroyed:!!(256&t),isRoot:!!(512&t),indexWithinInitPhase:t>>11}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return Jo(this._raw_lView[3])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"host",{get:function(){return Qo(this._raw_lView[0],!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"html",{get:function(){return(this.nodes||[]).map(function(t){return Qo(t.native,!0)}).join("")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._raw_lView[8]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodes",{get:function(){var t=this._raw_lView;return ta(t[1].firstChild,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tView",{get:function(){return this._raw_lView[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cleanup",{get:function(){return this._raw_lView[7]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return this._raw_lView[9]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rendererFactory",{get:function(){return this._raw_lView[10]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this._raw_lView[11]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sanitizer",{get:function(){return this._raw_lView[12]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childHead",{get:function(){return Jo(this._raw_lView[13])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"next",{get:function(){return Jo(this._raw_lView[4])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childTail",{get:function(){return Jo(this._raw_lView[14])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"declarationView",{get:function(){return Jo(this._raw_lView[15])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queries",{get:function(){return this._raw_lView[19]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tHost",{get:function(){return this._raw_lView[6]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childViews",{get:function(){for(var t=[],e=this.childHead;e;)t.push(e),e=e.next;return t},enumerable:!0,configurable:!0}),t}();function ta(t,e){if(t){for(var n=[],i=t;i;)n.push(ea(i,e,i.index)),i=i.next;return n}return null}function ea(t,e,n){var i=e[n],r=Ue(i),o=Jo(function(t){for(;Array.isArray(t);){if(t.length>=19)return t;t=t[0]}return null}(i));return{html:Qo(r),native:r,nodes:ta(t.child,e),component:o}}var na=function(){function t(t){this._raw_lContainer=t}return Object.defineProperty(t.prototype,"hasTransplantedViews",{get:function(){return this._raw_lContainer[2]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"views",{get:function(){return this._raw_lContainer.slice(10).map(Jo)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return Jo(this._raw_lContainer[3])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"movedViews",{get:function(){return this._raw_lContainer[9]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"host",{get:function(){return this._raw_lContainer[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"native",{get:function(){return this._raw_lContainer[7]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"next",{get:function(){return Jo(this._raw_lContainer[4])},enumerable:!0,configurable:!0}),t}(),ia=function(){function t(t,e,n,i){this.__raw_opCode=t,this._lView=e,this.nodeIndex=n,this.type=i}return Object.defineProperty(t.prototype,"tNode",{get:function(){return He(this._lView[1],this.nodeIndex)},enumerable:!0,configurable:!0}),t}(),ra=function(){function t(t,e){this.__raw_opCodes=t,this.__lView=e}return Object.defineProperty(t.prototype,"operations",{get:function(){for(var t=this.__lView,e=this.__raw_opCodes,n=[],i=0;i>>17,"AppendChild");break;case 0:o=new ia(r,t,r>>>3,"Select");break;case 5:var a=r>>>3;o=new ia(r,t,a,"ElementEnd");break;case 4:(o=new ia(r,t,a=r>>>3,"Attr")).attrName=e[++i],o.attrValue=e[++i]}if(!o)switch(r){case Mo:o={__raw_opCode:r,type:"COMMENT_MARKER",commentValue:e[++i],nodeIndex:e[++i]};break;case xo:o={__raw_opCode:r,type:"ELEMENT_MARKER"}}o||(o={__raw_opCode:r,type:"Unknown Op Code",code:r}),n.push(o)}return n},enumerable:!0,configurable:!0}),t}(),oa=function(){function t(t,e,n){this.__raw_opCodes=t,this.icus=e,this.__lView=n}return Object.defineProperty(t.prototype,"operations",{get:function(){for(var t=this.__lView,e=this.__raw_opCodes,n=this.icus,i=[],r=0;r>>2,d=void 0,p=void 0;switch(3&l){case 1:var h=e[++c],f=e[++c];i.push({__raw_opCode:l,checkBit:o,type:"Attr",attrValue:s,attrName:h,sanitizeFn:f});break;case 0:i.push({__raw_opCode:l,checkBit:o,type:"Text",nodeIndex:u,text:s});break;case 2:p=n[d=e[++c]];var g=new ia(l,t,u,"IcuSwitch");g.tIcuIndex=d,g.checkBit=o,g.mainBinding=s,g.tIcu=p,i.push(g);break;case 3:p=n[d=e[++c]],(g=new ia(l,t,u,"IcuUpdate")).tIcuIndex=d,g.checkBit=o,g.tIcu=p,i.push(g)}}}r+=a}return i},enumerable:!0,configurable:!0}),t}(),aa=Promise.resolve(null);function sa(t,e){var n=t.contentQueries;if(null!==n)for(var i=0;i20&&So(t,e,0,pn()),n(i,r)}finally{Dn(o)}}function ga(t,e,n){if(Se(e))for(var i=e.directiveStart,r=e.directiveEnd,o=i;o-1)return!0}return!1}function Ta(t,e){console.warn("Can't bind to '"+t+"' since it isn't a known property of '"+e.tagName+"'.")}function Oa(t,e,n,i){ngDevMode&&ke(t);var r=!1;if(en()){var o=function(t,e,n){ngDevMode&&ke(t),ngDevMode&&qn(n,3,4,0);var i=t.directiveRegistry,r=null;if(i)for(var o=0;o0&&function t(e){for(var n=mo(e);null!==n;n=vo(n))for(var i=10;i0&&t(r)}var a=e[1].components;if(null!==a)for(i=0;i0&&t(s)}}(n)}}function Ha(t,e){ngDevMode&&Rt(Ye(t),!0,"Should be run in creation mode");var n=qe(e,t),i=n[1];!function(t,e){for(var n=e.length;n0&&(a+="�"+r.join("�")),t[i]=a}}var Qa=aa;function $a(t){return t[7]||(t[7]=ngDevMode?new Yo:[])}function ts(t){return t.cleanup||(t.cleanup=ngDevMode?new Zo:[])}function es(t,e,n){return(null===t||Ee(t))&&(n=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(n[e.index])),n[11]}function ns(t,e){var n=t[9],i=n?n.get(ki,null):null;i&&i.handleError(e)}function is(t,e,n,i,r){for(var o=0;o0&&(t[n-1][4]=i[4]);var o=Yt(t,10+e);ls(i[1],i,!1,null);var a=o[19];null!==a&&a.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function ps(t,e){if(!(256&e[2])){var n=e[11];Ve(n)&&n.destroyNode&&Cs(t,e,n,3,null,null),function(t){var e=t[13];if(!e)return fs(t[1],t);for(;e;){var n=null;if(be(e))n=e[13];else{ngDevMode&&_e(e);var i=e[10];i&&(n=i)}if(!n){for(;e&&!e[4]&&e!==t;)be(e)&&fs(e[1],e),e=hs(e,t);null===e&&(e=t),be(e)&&fs(e[1],e),n=e&&e[4]}e=n}}(e)}}function hs(t,e){var n;return be(t)&&(n=t[6])&&2===n.type?os(n,t):t[3]===e?null:t[3]}function fs(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){var n;if(null!=t&&null!=(n=t.destroyHooks))for(var i=0;i=0?i[c]():i[-c].unsubscribe(),r+=2}else{var l=i[n[r+1]];n[r].call(l)}e[7]=null}}(t,e);var n=e[6];n&&3===n.type&&Ve(e[11])&&(ngDevMode&&ngDevMode.rendererDestroy++,e[11].destroy());var i=e[17];if(null!==i&&we(e[3])){i!==e[3]&&us(i,e);var r=e[19];null!==r&&r.detachView(t)}}}function gs(t,e,n){for(var i=e.parent;null!=i&&(4===i.type||5===i.type);)i=(e=i).parent;if(null==i){var r=n[6];return 2===r.type?as(r,n):(ngDevMode&&qn(r,3),n[0])}if(e&&5===e.type&&4&e.flags)return ze(e,n).parentNode;if(ngDevMode&&Wn(i,3),2&i.flags){var o=t.data,a=o[o[i.index].directiveStart].encapsulation;if(a!==Tt.ShadowDom&&a!==Tt.Native)return null}return ze(i,n)}function ms(t,e,n,i){ngDevMode&&ngDevMode.rendererInsertBefore++,Ve(t)?t.insertBefore(e,n,i):e.insertBefore(n,i,!0)}function vs(t,e,n){ngDevMode&&ngDevMode.rendererAppendChild++,ngDevMode&&Bt(e,"parent node must be defined"),Ve(t)?t.appendChild(e,n):e.appendChild(n)}function ys(t,e,n,i){null!==i?ms(t,e,n,i):vs(t,e,n)}function bs(t,e){return Ve(t)?t.parentNode(e):e.parentNode}function ws(t,e){if(2===t.type){var n=os(t,e);return null===n?null:xs(n.indexOf(e,10)-10,n)}return 4===t.type||5===t.type?ze(t,e):null}function Ss(t,e,n,i){var r=gs(t,i,e);if(null!=r){var o=e[11],a=ws(i.parent||e[6],e);if(Array.isArray(n))for(var s=0;s) must have projection slots defined.");var g=h.projection[f];if(Array.isArray(g))o.push.apply(o,Object(i.h)(g));else{var m=fo(p);ngDevMode&&Bt(m,"Component views should always have a parent view (component's host view)"),t(m[1],m,g,o,!0)}}r=a?r.projectionNext:r.next}return o} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(t[1],t,e.child,[])}return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._lView[8]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 256==(256&this._lView[2])},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}ps(this._lView[1],this._lView)},t.prototype.onDestroy=function(t){var e,n,i;e=this._lView[1],i=t,$a(n=this._lView).push(i),e.firstCreatePass&&ts(e).push(n[7].length-1,null)},t.prototype.markForCheck=function(){qa(this._cdRefInjectingView||this._lView)},t.prototype.detach=function(){this._lView[2]&=-129},t.prototype.reattach=function(){this._lView[2]|=128},t.prototype.detectChanges=function(){Xa(this._lView[1],this._lView,this.context)},t.prototype.checkNoChanges=function(){!function(t,e,n){hn(!0);try{Xa(t,e,n)}finally{hn(!1)}}(this._lView[1],this._lView,this.context)},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t.prototype.detachFromAppRef=function(){var t;this._appRef=null,Cs(this._lView[1],t=this._lView,t[11],2,null,null)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t}(),Rs=function(t){function e(e){var n=t.call(this,e)||this;return n._view=e,n}return Object(i.c)(e,t),e.prototype.detectChanges=function(){Ya(this._view)},e.prototype.checkNoChanges=function(){!function(t){hn(!0);try{Ya(t)}finally{hn(!1)}}(this._view)},Object.defineProperty(e.prototype,"context",{get:function(){return null},enumerable:!0,configurable:!0}),e}(Ds);function Ls(t,e,n){return Ps||(Ps=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e}(t)),new Ps(ze(e,n))}function Ns(t,e,n,r){return Is||(Is=function(t){function e(e,n,i){var r=t.call(this)||this;return r._declarationView=e,r._declarationTContainer=n,r.elementRef=i,r}return Object(i.c)(e,t),e.prototype.createEmbeddedView=function(t){var e=this._declarationTContainer.tViews,n=la(this._declarationView,e,t,16,null,e.node),i=this._declarationView[this._declarationTContainer.index];ngDevMode&&_e(i),n[17]=i;var r=this._declarationView[19];return null!==r&&(n[19]=r.createEmbeddedView(e)),da(e,n,t),new Ds(n)},e}(t)),0===n.type?(ngDevMode&&Bt(n.tViews,"TView must be allocated"),new Is(r,n,Ls(e,n,r))):null}function js(t,e,n,r){var o;ks||(ks=function(t){function n(e,n,i){var r=t.call(this)||this;return r._lContainer=e,r._hostTNode=n,r._hostView=i,r}return Object(i.c)(n,t),Object.defineProperty(n.prototype,"element",{get:function(){return Ls(e,this._hostTNode,this._hostView)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"injector",{get:function(){return new Ai(this._hostTNode,this._hostView)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentInjector",{get:function(){var t=mi(this._hostTNode,this._hostView),e=ni(t,this._hostView),n=function(t,e,n){if(n.parent&&-1!==n.parent.injectorIndex){for(var i=n.parent.injectorIndex,r=n.parent;null!=r.parent&&i==r.parent.injectorIndex;)r=r.parent;return r}for(var o=ei(t),a=e,s=e[6];o>1;)s=(a=a[15])[6],o--;return s}(t,this._hostView,this._hostTNode);return $n(t)&&null!=n?new Ai(n,e):new Ai(null,this._hostView)},enumerable:!0,configurable:!0}),n.prototype.clear=function(){for(;this.length>0;)this.remove(this.length-1)},n.prototype.get=function(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null},Object.defineProperty(n.prototype,"length",{get:function(){return this._lContainer.length-10},enumerable:!0,configurable:!0}),n.prototype.createEmbeddedView=function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i},n.prototype.createComponent=function(t,e,n,i,r){var o=n||this.parentInjector;if(!r&&null==t.ngModule&&o){var a=o.get(_t,null);a&&(r=a)}var s=t.create(o,i,void 0,r);return this.insert(s.hostView,e),s},n.prototype.insert=function(t,e){var n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),we(n[3])){var r=this.indexOf(t);if(-1!==r)this.detach(r);else{var o=n[3];ngDevMode&&Rt(we(o),!0,"An attached view should have its PARENT point to a container.");var a=new ks(o,o[6],o[3]);a.detach(a.indexOf(t))}}var s=this._adjustIndex(e);return function(t,e,n,i){ngDevMode&&Ie(e),ngDevMode&&_e(n);var r=10+i,o=n.length;i>0&&(n[r-1][4]=e),i0)for(var r=0;r ")+" > "+s+".")}var c=-1!==n.indexOf(a);if(void 0!==o&&(r=D(o)),null==r)return!1;if(null!=r.imports&&!c){var l;ngDevMode&&e.push(a),n.push(a);try{Kt(r.imports,function(t){i.processInjectorType(t,e,n)&&(void 0===l&&(l=[]),l.push(t))})}finally{ngDevMode&&e.pop()}if(void 0!==l)for(var u=function(t){var e=l[t],n=e.ngModule,r=e.providers;Kt(r,function(t){return i.processProvider(t,n,r||dc)})},d=0;d0){var n=Zt(e,"?");throw new Error("Can't resolve all parameters for "+F(t)+": ("+n.join(", ")+").")}var i=function(t){var e=t&&(t[R]||t[j]||t[N]&&t[N]());if(e){var n=function(t){if(t.hasOwnProperty("name"))return t.name;var e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn('DEPRECATED: DI is instantiating a token "'+n+'" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in v10. Please add @Injectable() to the "'+n+'" class.'),e}return null}(t);return null!==i?function(){return i.factory(t)}:function(){return new t}}(t);throw new Error("unreachable")}function yc(t,e,n){var r,o=void 0;if(Sc(t)){var a=G(t);return ve(a)||vc(a)}if(wc(t))o=function(){return G(t.useValue)};else if((r=t)&&r.useFactory)o=function(){return t.useFactory.apply(t,Object(i.h)(St(t.deps||[])))};else if(function(t){return!(!t||!t.useExisting)}(t))o=function(){return vt(G(t.useExisting))};else{var s=G(t&&(t.useClass||t.provide));if(s||function(t,e,n){var i="";throw t&&e&&(i=" - only instances of Provider and Type are allowed, got: ["+e.map(function(t){return t==n?"?"+n+"?":"..."}).join(", ")+"]"),new Error("Invalid provider for the NgModule '"+F(t)+"'"+i)}(e,n,t),!function(t){return!!t.deps}(t))return ve(s)||vc(s);o=function(){return new(s.bind.apply(s,Object(i.h)([void 0],St(t.deps))))}}return o}function bc(t,e,n){return void 0===n&&(n=!1),{factory:t,value:e,multi:n?[]:void 0}}function wc(t){return null!==t&&"object"==typeof t&&pt in t}function Sc(t){return"function"==typeof t}function xc(t,e,n){return fc({name:n},e,t,n)}var Mc=xc,Ec=function(){function t(){}return t.create=function(t,e){return Array.isArray(t)?Mc(t,e,""):Mc(t.providers,t.parent,t.name||"")},t.THROW_IF_NOT_FOUND=ut,t.NULL=new xt,t.ɵprov=O({token:t,providedIn:"any",factory:function(){return vt(lt)}}),t.__NG_ELEMENT_ID__=-1,t}(),Cc=function(t){return t},Ac=[],Tc=Cc,Oc=function(){return Array.prototype.slice.call(arguments)};function _c(t){var e=function(t){var e=Ac,n=t.deps;if(n&&n.length){e=[];for(var i=0;i1?" ("+function(t){for(var e=[],n=0;n-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(function(t){return F(t.token)}).join(" -> ")+")":""}function Rc(t,e,n,i){var r=[e],o=n(r),a=i?function(t,e){var n=o+" caused by: "+(e instanceof Error?e.message:e),i=Error(n);return i.ngOriginalError=e,i} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(0,i):Error(o);return a.addKey=Lc,a.keys=r,a.injectors=[t],a.constructResolvingMessage=n,a.ngOriginalError=i,a}function Lc(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function Nc(t,e){for(var n=[],i=0,r=e.length;i=this._providers.length)throw function(t){return Error("Index "+t+" is out-of-bounds.")}(t);return this._providers[t]},t.prototype._new=function(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw this,Rc(this,t.key,function(t){return"Cannot instantiate cyclic dependency!"+Dc(t)});return this._instantiateProvider(t)},t.prototype._getMaxNumberOfObjects=function(){return this.objs.length},t.prototype._instantiateProvider=function(t){if(t.multiProvider){for(var e=[],n=0;n-1?to(t,e,e,o,i):{propName:o,oldValue:n,newValue:i};if(null===o){for(var a=e-1;"string"!=typeof r[a]&&null===r[a+1];)a--;var s=r[a];if("string"==typeof s){var c=s.match(new RegExp("�","g"));if(c&&c.length-1>e-a)return to(t,a,e,s,i)}}return{propName:void 0,oldValue:n,newValue:i}}(t,e,r,n);!function(t,e,n,i){var r="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value"+(i?" for '"+i+"'":"")+": '"+e+"'. Current value: '"+n+"'.";throw t&&(r+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook?"),new Error(r)}(i===ho,o.oldValue,o.newValue,o.propName)}return!1}return t[e]=n,!0}function Sl(t,e,n,i){var r=wl(t,e,n);return wl(t,e+1,i)||r}function xl(t,e,n,i,r){var o=Sl(t,e,n,i);return wl(t,e+2,r)||o}function Ml(t,e,n,i,r,o){var a=Sl(t,e,n,i);return Sl(t,e+2,r,o)||a} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function El(t,e,n,i){var r=on(),o=vn();if(wl(r,o,e)){var a=an(),s=Rn();Va(s,r,t,e,n,i),ngDevMode&&Ja(a.data,s,"attr."+t,o)}return El} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Cl(t,e){ngDevMode&&Vt(2,e.length,"should have at least 3 values"),ngDevMode&&Rt(e.length%2,1,"should have an odd number of values");for(var n=!1,i=gn(),r=1;r=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=i}function Kl(t){return We(tn.lFrame.contextLView,t)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Xl(t,e){void 0===e&&(e=v.Default);var n=on();return null==n?vt(t,e):bi(cn(),n,G(t),e)}function Yl(t){return yi(cn(),t)}function Zl(){var t=ngDevMode?"This constructor was not compatible with Dependency Injection.":"invalid";throw new Error(t)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Jl(t,e,n){var i=on(),r=vn();if(wl(i,r,e)){var o=an(),a=Rn();Ma(o,a,i,t,e,i[11],n,!1),ngDevMode&&Ja(o.data,a,t,r)}return Jl}function Ql(t,e,n,i,r){var o=r?"class":"style";is(t,n,e.inputs[o],o,i)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function $l(t,e,n,i){var r=on(),o=an(),a=20+t;ngDevMode&&Rt(gn(),o.bindingStartIndex,"elements should be created before any bindings"),ngDevMode&&ngDevMode.rendererCreateElement++,ngDevMode&&Ht(r,a);var s=r[11],c=r[a]=ca(e,s,tn.lFrame.currentNamespace),l=o.firstCreatePass?function(t,e,n,i,r,o,a){ngDevMode&&ke(e),ngDevMode&&ngDevMode.firstCreatePass++;var s=e.consts,c=Je(s,o),l=ua(e,n[6],t,3,r,c),u=Oa(e,n,l,Je(s,a));return ngDevMode&&function(t,e,n,i,r){if(null!==t.schemas){var o=i.tagName;if(!r&&null!==o&&("undefined"!=typeof HTMLUnknownElement&&HTMLUnknownElement&&n instanceof HTMLUnknownElement||"undefined"!=typeof customElements&&o.indexOf("-")>-1&&!customElements.get(o))&&!Aa(t,0,o)){var a="'"+o+"' is not a known element:\n";a+="1. If '"+o+"' is an Angular component, then verify that it is part of this module.\n",o&&o.indexOf("-")>-1?a+="2. If '"+o+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.":a+="2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",console.warn(a)}}} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(e,0,i,l,u),null!==l.attrs&&ul(l,l.attrs,!1),null!==l.mergedAttrs&&ul(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(t,o,r,c,e,n,i):o.data[a];ln(l,!0);var u=l.mergedAttrs;null!==u&&Xn(s,c,u);var d=l.classes;null!==d&&_s(s,c,d);var p=l.styles;null!==p&&Os(s,c,p),Ss(o,r,c,l),0===tn.lFrame.elementDepthCount&&Kr(c,r),tn.lFrame.elementDepthCount++,Me(l)&&(ma(o,r,l),ga(o,l,r)),null!==i&&va(r,l)}function tu(){var t=cn();ngDevMode&&Bt(t,"No parent node to close."),un()?dn():(ngDevMode&&Oe(cn()),ln(t=t.parent,!1));var e=t;ngDevMode&&Wn(e,3),tn.lFrame.elementDepthCount--;var n=an();n.firstCreatePass&&(Vn(n,t),Se(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&0!=(16&e.flags)&&Ql(n,e,on(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&0!=(32&e.flags)&&Ql(n,e,on(),e.stylesWithoutHost,!1)}function eu(t,e,n,i){$l(t,e,n,i),tu()}function nu(t,e,n){var i=on(),r=an(),o=t+20;ngDevMode&&Ht(i,o),ngDevMode&&Rt(gn(),r.bindingStartIndex,"element containers should be created before any bindings");var a=r.firstCreatePass?function(t,e,n,i,r){ngDevMode&&ngDevMode.firstCreatePass++;var o=e.consts,a=Je(o,i),s=ua(e,n[6],t,4,"ng-container",a);return null!==a&&ul(s,a,!0),Oa(e,n,s,Je(o,r)),null!==e.queries&&e.queries.elementStart(e,s),s}(t,r,i,e,n):r.data[o];ln(a,!0),ngDevMode&&ngDevMode.rendererCreateComment++;var s=i[o]=i[11].createComment(ngDevMode?"ng-container":"");Ss(r,i,s,a),Kr(s,i),Me(a)&&(ma(r,i,a),ga(r,a,i)),null!=n&&va(i,a)}function iu(){var t=cn(),e=an();un()?dn():(ngDevMode&&Oe(t),ln(t=t.parent,!1)),ngDevMode&&Wn(t,4),e.firstCreatePass&&(Vn(e,t),Se(t)&&e.queries.elementEnd(t))}function ru(t,e,n){nu(t,e,n),iu()}function ou(){return on()} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function au(t){return!!t&&"function"==typeof t.then}function su(t){return!!t&&"function"==typeof t.subscribe} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function cu(t,e,n,i){void 0===n&&(n=!1);var r=on(),o=an(),a=cn();return uu(o,r,r[11],a,t,e,n,i),cu}function lu(t,e,n,i){void 0===n&&(n=!1);var r=cn(),o=on(),a=an();return uu(a,o,es(Sn(a.data),r,o),r,t,e,n,i),lu}function uu(t,e,n,i,r,o,a,s){void 0===a&&(a=!1);var c=Me(i),l=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),u=$a(e);ngDevMode&&qn(i,3,0,4);var d=!0;if(3===i.type){var p=ze(i,e),h=s?s(p):ee,f=h.target||p,g=u.length,m=s?function(t){return s(Ue(t[i.index])).target}:i.index;if(Ve(n)){var v=null;if(!s&&c&&(v=function(t,e,n,i){var r=t.cleanup;if(null!=r)for(var o=0;oc?s[c]:null}"string"==typeof a&&(o+=2)}return null}(t,e,r,i.index)),null!==v)(v.__ngLastListenerFn__||v).__ngNextListenerFn__=o,v.__ngLastListenerFn__=o,d=!1;else{o=pu(i,e,o,!1);var y=n.listen(h.name||f,r,o);ngDevMode&&ngDevMode.rendererAddEventListener++,u.push(o,y),l&&l.push(r,m,g,g+1)}}else o=pu(i,e,o,!0),f.addEventListener(r,o,a),ngDevMode&&ngDevMode.rendererAddEventListener++,u.push(o),l&&l.push(r,m,g,a)}var b,w=i.outputs;if(d&&null!==w&&(b=w[r])){var S=b.length;if(S)for(var x=0;x=0} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ ("undefined"==typeof ngDevMode||ngDevMode)&&at()&&(Object.freeze({}),Object.freeze(_u) /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */);var ku={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Du(t){return t.substring(ku.key,ku.keyEnd)}function Ru(t){return t.substring(ku.value,ku.valueEnd)}function Lu(t,e){var n=ku.textEnd;return n===e?-1:Vu(t,e=ku.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,ku.key=e,n),n)}function Nu(t,e){var n=ku.textEnd,i=ku.key=Vu(t,e,n);return n===i?-1:(i=Fu(t,i=ku.keyEnd=function(t,e,n){for(var i;e=65&&(-33&i)<=90);)e++;return e}(t,i,n),n,58),i=ku.value=Vu(t,i,n),Fu(t,i=ku.valueEnd=function(t,e,n){for(var i=-1,r=-1,o=-1,a=e,s=a;a32&&(s=a),o=r,r=i,i=-33&c}return s}(t,i,n),n,59))}function ju(t){ku.key=0,ku.keyEnd=0,ku.value=0,ku.valueEnd=0,ku.textEnd=t.length}function Vu(t,e,n){for(;e>"+t.substring(n,n+1)+"<<]"+t.substr(n+1)+"'. Expecting '"+e+"'.")} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function zu(t){!function(t){tn.lFrame.currentSanitizer=t}(t)}function Gu(t,e,n){return Yu(t,e,n,!1),Gu}function Hu(t,e){return Yu(t,e,null,!0),Hu}function Wu(t){Zu(ed,qu,t,!1)}function qu(t,e){for(var n=function(t){return ju(t),Nu(t,Vu(t,0,ku.textEnd))}(e);n>=0;n=Nu(e,n))ed(t,Du(e),Ru(e))}function Ku(t){Zu(Jt,Xu,t,!0)}function Xu(t,e){for(var n=function(t){return ju(t),Lu(t,Vu(t,0,ku.textEnd))}(e);n>=0;n=Lu(e,n))Jt(t,Du(e),!0)}function Yu(t,e,n,i){var r,o=on(),a=an(),s=yn(2);if(a.firstUpdatePass&&Qu(a,t,s,i),e!==ho&&wl(o,s,e)){var c=void 0;null==n&&(c=null===(r=tn.lFrame)?null:r.currentSanitizer)&&(n=c),nd(a,a.data[kn()+20],o,o[11],t,o[s+1]=function(t,e){return null==t||("function"==typeof e?t=e(t):"string"==typeof e?t+=e:"object"==typeof t&&(t=F(Bi(t)))),t}(e,n),i,s)}}function Zu(t,e,n,i){var r=an(),o=yn(2);r.firstUpdatePass&&Qu(r,null,o,i);var a=on();if(n!==ho&&wl(a,o,n)){var s=r.data[kn()+20];if(od(s,i)&&!Ju(r,o)){if(ngDevMode){var c=r.data[o];Rt(Array.isArray(c)?c[1]:c,!1,"Styling linked list shadow input should be marked as 'false'")}var l=i?s.classesWithoutHost:s.stylesWithoutHost;ngDevMode&&!1===i&&null!==l&&Rt(l.endsWith(";"),!0,"Expecting static portion to end with ';'"),null!==l&&(n=U(l,n||"")),Ql(r,s,a,n,i)}else!function(t,e,n,i,r,o,a,s){r===ho&&(r=_u);for(var c=0,l=0,u=0=t.expandoStartIndex}function Qu(t,e,n,i){ngDevMode&&De(t);var r=t.data;if(null===r[n+1]){var o=r[kn()+20],a=Ju(t,n);od(o,i)&&null===e&&!a&&(e=!1),e=function(t,e,n,i){var r=Sn(t),o=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=td(n=$u(null,t,e,n,i),e.attrs,i),o=null);else{var a=e.directiveStylingLast;if(-1===a||t[a]!==r)if(n=$u(r,t,e,n,i),null===o){var s=function(t,e,n){var i=n?e.classBindings:e.styleBindings;if(0!==Oo(i))return t[Co(i)]}(t,e,i);void 0!==s&&Array.isArray(s)&&function(t,e,n,i){var r=n?e.classBindings:e.styleBindings;ngDevMode&&Lt(Oo(r),0,"Expecting to have at least one template styling binding."),t[Co(r)]=i}(t,e,i,s=td(s=$u(null,t,e,s[1],i),e.attrs,i))}else o=function(t,e,n){var i=void 0,r=e.directiveEnd;ngDevMode&&Lt(e.directiveStylingLast,-1,"By the time this function gets called at least one hostBindings-node styling instruction must have executed.");for(var o=1+e.directiveStylingLast;o0)&&(p=!0)}else l=n;if(r)if(0!==c){var f=Co(t[s+1]);t[i+1]=Eo(f,s),0!==f&&(t[f+1]=_o(t[f+1],i)),t[s+1]=(u=t[s+1],d=i,ngDevMode&&It(u,"expected number"),ngDevMode&&kt(d,0,32767),131071&u|d<<17)}else t[i+1]=Eo(s,0),0!==s&&(t[s+1]=_o(t[s+1],i)),s=i;else t[i+1]=Eo(c,0),ngDevMode&&Rt(0!==s&&0===c,!1,"Adding template bindings after hostBindings is not allowed."),0===s?s=i:t[c+1]=_o(t[c+1],i),c=i;p&&(t[i+1]=To(t[i+1])),Pu(t,l,i,!0),Pu(t,l,i,!1),function(t,e,n,i,r){var o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof e&&$t(o,e)>=0&&(n[i+1]=Io(n[i+1]))}(e,l,t,i,o),a=Eo(s,c),o?e.classBindings=a:e.styleBindings=a}(r,o,e,n,a,i)}}function $u(t,e,n,i,r){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var c=t[r],l=Array.isArray(c),u=l?c[1]:c,d=null===u,p=n[r+1];p===ho&&(p=d?_u:void 0);var h=d?Qt(p,i):u===i?p:void 0;if(l&&!rd(h)&&(h=Qt(c,i)),rd(h)&&(s=h,a))return s;var f=t[r+1];r=a?Co(f):Oo(f)}if(null!==e){var g=o?e.residualClasses:e.residualStyles;null!=g&&(s=Qt(g,i))}return s}function rd(t){return void 0!==t}function od(t,e){return 0!=(t.flags&(e?16:32))} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function ad(t,e){void 0===e&&(e="");var n=on(),i=an(),r=t+20;ngDevMode&&Rt(gn(),i.bindingStartIndex,"text nodes should be created before any bindings"),ngDevMode&&Ht(n,r);var o=i.firstCreatePass?ua(i,n[6],t,3,null,null):i.data[r],a=n[r]=cs(e,n[11]);Ss(i,n,a,o),ln(o,!1)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function sd(t){return cd("",t,""),sd}function cd(t,e,n){var i=on(),r=Al(i,t,e,n);return r!==ho&&rs(i,kn(),r),cd}function ld(t,e,n,i,r){var o=on(),a=Tl(o,t,e,n,i,r);return a!==ho&&rs(o,kn(),a),ld}function ud(t,e,n,i,r,o,a){var s=on(),c=Ol(s,t,e,n,i,r,o,a);return c!==ho&&rs(s,kn(),c),ud}function dd(t,e,n,i,r,o,a,s,c){var l=on(),u=_l(l,t,e,n,i,r,o,a,s,c);return u!==ho&&rs(l,kn(),u),dd}function pd(t,e,n,i,r,o,a,s,c,l,u){var d=on(),p=Pl(d,t,e,n,i,r,o,a,s,c,l,u);return p!==ho&&rs(d,kn(),p),pd}function hd(t,e,n,i,r,o,a,s,c,l,u,d,p){var h=on(),f=Il(h,t,e,n,i,r,o,a,s,c,l,u,d,p);return f!==ho&&rs(h,kn(),f),hd}function fd(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f){var g=on(),m=kl(g,t,e,n,i,r,o,a,s,c,l,u,d,p,h,f);return m!==ho&&rs(g,kn(),m),fd}function gd(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m){var v=on(),y=Dl(v,t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m);return y!==ho&&rs(v,kn(),y),gd}function md(t){var e=on(),n=Cl(e,t);return n!==ho&&rs(e,kn(),n),md} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function vd(t,e,n){Zu(Jt,Xu,Al(on(),t,e,n),!0)}function yd(t,e,n,i,r){Zu(Jt,Xu,Tl(on(),t,e,n,i,r),!0)}function bd(t,e,n,i,r,o,a){Zu(Jt,Xu,Ol(on(),t,e,n,i,r,o,a),!0)}function wd(t,e,n,i,r,o,a,s,c){Zu(Jt,Xu,_l(on(),t,e,n,i,r,o,a,s,c),!0)}function Sd(t,e,n,i,r,o,a,s,c,l,u){Zu(Jt,Xu,Pl(on(),t,e,n,i,r,o,a,s,c,l,u),!0)}function xd(t,e,n,i,r,o,a,s,c,l,u,d,p){Zu(Jt,Xu,Il(on(),t,e,n,i,r,o,a,s,c,l,u,d,p),!0)}function Md(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f){Zu(Jt,Xu,kl(on(),t,e,n,i,r,o,a,s,c,l,u,d,p,h,f),!0)}function Ed(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m){Zu(Jt,Xu,Dl(on(),t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m),!0)}function Cd(t){Zu(Jt,Xu,Cl(on(),t),!0)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ad(t,e,n){Wu(Al(on(),t,e,n))}function Td(t,e,n,i,r){Wu(Tl(on(),t,e,n,i,r))}function Od(t,e,n,i,r,o,a){Wu(Ol(on(),t,e,n,i,r,o,a))}function _d(t,e,n,i,r,o,a,s,c){Wu(_l(on(),t,e,n,i,r,o,a,s,c))}function Pd(t,e,n,i,r,o,a,s,c,l,u){Wu(Pl(on(),t,e,n,i,r,o,a,s,c,l,u))}function Id(t,e,n,i,r,o,a,s,c,l,u,d,p){Wu(Il(on(),t,e,n,i,r,o,a,s,c,l,u,d,p))}function kd(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f){Wu(kl(on(),t,e,n,i,r,o,a,s,c,l,u,d,p,h,f))}function Dd(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m){Wu(Dl(on(),t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m))}function Rd(t){Wu(Cl(on(),t))} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Ld(t,e,n,i,r){return Yu(t,Al(on(),e,n,i),r,!1),Ld}function Nd(t,e,n,i,r,o,a){return Yu(t,Tl(on(),e,n,i,r,o),a,!1),Nd}function jd(t,e,n,i,r,o,a,s,c){return Yu(t,Ol(on(),e,n,i,r,o,a,s),c,!1),jd}function Vd(t,e,n,i,r,o,a,s,c,l,u){return Yu(t,_l(on(),e,n,i,r,o,a,s,c,l),u,!1),Vd}function Fd(t,e,n,i,r,o,a,s,c,l,u,d,p){return Yu(t,Pl(on(),e,n,i,r,o,a,s,c,l,u,d),p,!1),Fd}function Ud(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f){return Yu(t,Il(on(),e,n,i,r,o,a,s,c,l,u,d,p,h),f,!1),Ud}function Bd(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m){return Yu(t,kl(on(),e,n,i,r,o,a,s,c,l,u,d,p,h,f,g),m,!1),Bd}function zd(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m,v,y){return Yu(t,Dl(on(),e,n,i,r,o,a,s,c,l,u,d,p,h,f,g,m,v),y,!1),zd}function Gd(t,e,n){return Yu(t,Cl(on(),e),n,!1),Gd} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Hd(t,e,n){var i=on(),r=vn();if(wl(i,r,e)){var o=an(),a=Rn();Ma(o,a,i,t,e,i[11],n,!0),ngDevMode&&Ja(o.data,a,t,r)}return Hd}function Wd(t,e,n){var i=on(),r=vn();if(wl(i,r,e)){var o=an(),a=Rn();Ma(o,a,i,t,e,es(Sn(o.data),a,i),n,!0),ngDevMode&&Ja(o.data,a,t,r)}return Wd} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function qd(t){np(t);var e,n,i,r,o=Qd(t,!1);return null===o?null:(void 0===o.component&&(o.component=(e=o.nodeIndex,r=(i=(n=o.lView)[1].data[e]).directiveStart,2&i.flags?n[r]:null)),o.component)}function Kd(t){np(t);var e=Qd(t,!1);return null===e?null:e.lView[8]}function Xd(t){var e=Qd(t,!1);if(null===e)return null;var n,i=e.lView;for(ngDevMode&&Ie(i);null===i[0]&&(n=fo(i));)i=n;return 512&i[2]?null:i[8]}function Yd(t){return Object(i.h)(go(t).components)}function Zd(t){var e=Qd(t,!1);if(null===e)return Ec.NULL;var n=e.lView[1].data[e.nodeIndex];return new Ai(n,e.lView)}function Jd(t){var e=Qd(t);return void 0===e.directives&&(e.directives=Jr(e.nodeIndex,e.lView,!1)),null===e.directives?[]:Object(i.h)(e.directives)}function Qd(t,e){void 0===e&&(e=!0);var n=Hr(t);if(!n&&e)throw new Error(ngDevMode?"Unable to find context associated with "+ri(t):"Invalid ng target");return n}function $d(t){return Hr(t).native}function tp(t){np(t);var e=Qd(t,!1);if(null===e)return[];var n=e.lView,i=n[1],r=n[7],o=i.cleanup,a=[];if(o&&r)for(var s=0;s=0?"dom":"output",g="boolean"==typeof h&&h;t==d&&a.push({element:t,name:u,callback:p,useCapture:g,type:f})}}return a.sort(ep),a}function ep(t,e){return t.name==e.name?0:t.name=0;i--){var r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=Jn(r.hostAttrs,n=Jn(n,r.hostAttrs))}}(i)}function gp(t){return t===ee?{}:t===ne?[]:t}function mp(t,e){var n=t.viewQuery;t.viewQuery=n?function(t,i){e(t,i),n(t,i)}:e}function vp(t,e){var n=t.contentQueries;t.contentQueries=n?function(t,i,r){e(t,i,r),n(t,i,r)}:e}function yp(t,e){var n=t.hostBindings;t.hostBindings=n?function(t,i){e(t,i),n(t,i)}:e} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var bp=["providersResolver"],wp=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function Sp(t){var e,n,r,o,a,s=hp(t.type);a=Ee(t)?s.ɵcmp:s.ɵdir;var c=t;try{for(var l=Object(i.j)(bp),u=l.next();!u.done;u=l.next())c[h=u.value]=a[h]}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}if(Ee(a))try{for(var d=Object(i.j)(wp),p=d.next();!p.done;p=d.next()){var h;c[h=p.value]=a[h]}}catch(t){r={error:t}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var xp=function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}(); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function Mp(t){t.type.prototype.ngOnChanges&&(t.setInput=Ep,t.onChanges=function(){var t=Cp(this),e=t&&t.current;if(e){var n=t.previous;if(n===ee)t.previous=e;else for(var i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}})}function Ep(t,e,n,i){var r=Cp(t)||function(t,e){return t.__ngSimpleChanges__=e} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(t,{previous:ee,current:null}),o=r.current||(r.current={}),a=r.previous,s=this.declaredInputs[n],c=a[s];o[s]=new xp(c&&c.currentValue,e,a===ee),t[i]=e}function Cp(t){return t.__ngSimpleChanges__||null}function Ap(t,e,n,i,r){if(t=G(t),Array.isArray(t))for(var o=0;o>16;if(Sc(t)||!t.multi){var f=new Hn(l,r,Xl),g=_p(c,e,r?d:d+h,p);-1===g?(vi(hi(u,s),a,c),Tp(a,t,e.length),e.push(c),u.directiveStart++,u.directiveEnd++,r&&(u.providerIndexes+=65536),n.push(f),s.push(f)):(n[g]=f,s[g]=f)}else{var m=_p(c,e,d+h,p),v=_p(c,e,d,d+h),y=m>=0&&n[m],b=v>=0&&n[v];r&&!b||!r&&!y?(vi(hi(u,s),a,c),f=function(t,e,n,i,r){var o=new Hn(t,n,Xl);return o.multi=[],o.index=e,o.componentProviders=0,Op(o,r,i&&!n),o}(r?Ip:Pp,n.length,r,i,l),!r&&b&&(n[v].providerFactory=f),Tp(a,t,e.length,0),e.push(c),u.directiveStart++,u.directiveEnd++,r&&(u.providerIndexes+=65536),n.push(f),s.push(f)):Tp(a,t,m>-1?m:v,Op(n[r?v:m],l,!r&&i)),!r&&i&&b&&n[v].componentProviders++}}}function Tp(t,e,n,i){var r=Sc(e);if(r||e.useClass){var o=(e.useClass||e).prototype.ngOnDestroy;if(o){var a=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){ngDevMode&&Bt(i,"indexInFactory when registering multi factory destroy hook");var s=a.indexOf(n);-1===s?a.push(n,[i,o]):a[s+1].push(i,o)}else a.push(n,o)}}}function Op(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function _p(t,e,n,i){for(var r=n;r-1}(0,r)))){var u=t._providers.length;return t._def.providers[u]=t._def.providersByKey[e.tokenKey]={flags:5120,value:s.factory,deps:[],index:u,token:e.token},t._providers[u]=vf,t._providers[u]=Ef(t,t._def.providersByKey[e.tokenKey])}return 4&e.flags?n:t._parent.get(e.token,n)}finally{ft(o)}}function Ef(t,e){var n;switch(201347067&e.flags){case 512:n=function(t,e,n){var r=n.length;switch(r){case 0:return new e;case 1:return new e(Mf(t,n[0]));case 2:return new e(Mf(t,n[0]),Mf(t,n[1]));case 3:return new e(Mf(t,n[0]),Mf(t,n[1]),Mf(t,n[2]));default:for(var o=[],a=0;a=n.length)&&(e=n.length-1),e<0)return null;var i=n[e];return i.viewContainerParent=null,Yt(n,e),kh.dirtyParentQueries(i),Tf(i),i}function Af(t,e,n){var i=e?Kh(e,e.def.lastRenderRootNode):t.renderElement;rf(n,2,n.renderer.parentNode(i),n.renderer.nextSibling(i),void 0)}function Tf(t){rf(t,3,null,null,void 0)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Of={};function _f(t,e,n,i,r,o){return new If(t,e,n,i,r,o)}function Pf(t){return t.viewDefFactory}var If=function(t){function e(e,n,i,r,o,a){var s=t.call(this)||this;return s.selector=e,s.componentType=n,s._inputs=r,s._outputs=o,s.ngContentSelectors=a,s.viewDefFactory=i,s}return Object(i.c)(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e){var i=e[n];t.push({propName:n,templateName:i})}return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs){var n=this._outputs[e];t.push({propName:e,templateName:n})}return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,i){if(!i)throw new Error("ngModule should be provided");var r=nf(this.viewDefFactory),o=r.nodes[0].element.componentProvider.nodeIndex,a=kh.createRootView(t,e||[],n,r,i,Of),s=Oh(a,o).instance;return n&&a.renderer.setAttribute(Th(a,0).renderElement,"ng-version",Qp.full),new kf(a,new Nf(a),s)},e}(Lp),kf=function(t){function e(e,n,i){var r=t.call(this)||this;return r._view=e,r._viewRef=n,r._component=i,r._elDef=r._view.def.nodes[0],r.hostView=n,r.changeDetectorRef=n,r.instance=i,r}return Object(i.c)(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new Gp(Th(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Uf(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(Rp);function Df(t,e,n){return new Rf(t,e,n)}var Rf=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new Gp(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Uf(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=qh(t),t=t.parent;return t?new Uf(t,e):new Uf(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=Cf(this._data,t);kh.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new Nf(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i},t.prototype.createComponent=function(t,e,n,i,r){var o=n||this.parentInjector;r||t instanceof zp||(r=o.get(_t));var a=t.create(o,i,void 0,r);return this.insert(a.hostView,e),a},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n=t,i=n._view;return function(t,e,n,i){var r=e.viewContainer._embeddedViews;null==n&&(n=r.length),i.viewContainerParent=t,Xt(r,n,i),function(t,e){var n=Wh(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var i=n.template._projectedViews;i||(i=n.template._projectedViews=[]),i.push(e),function(t,e){if(!(4&e.flags)){t.nodeFlags|=4,e.flags|=4;for(var n=e.parent;n;)n.childFlags|=4,n=n.parent}}(e.parent.def,e.parentNodeDef)}}(e,i),kh.dirtyParentQueries(i),Af(e,n>0?r[n-1]:null,i)}(this._view,this._data,e,i),n.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,i,r,o,a;return i=this._embeddedViews.indexOf(t._view),r=e,a=(o=(n=this._data).viewContainer._embeddedViews)[i],Yt(o,i),null==r&&(r=o.length),Xt(o,r,a),kh.dirtyParentQueries(a),Tf(a),Af(n,r>0?o[r-1]:null,a),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=Cf(this._data,t);e&&kh.destroyView(e)},t.prototype.detach=function(t){var e=Cf(this._data,t);return e?new Nf(e):null},t}();function Lf(t){return new Nf(t)}var Nf=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return rf(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){zh(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{kh.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){kh.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),kh.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,Tf(this._view),kh.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function jf(t,e){return new Vf(t,e)}var Vf=function(t){function e(e,n){var i=t.call(this)||this;return i._parentView=e,i._def=n,i}return Object(i.c)(e,t),e.prototype.createEmbeddedView=function(t){return new Nf(kh.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new Gp(Th(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(gh);function Ff(t,e){return new Uf(t,e)}var Uf=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){void 0===e&&(e=Ec.THROW_IF_NOT_FOUND);var n=!!this.elDef&&0!=(33554432&this.elDef.flags);return kh.resolveDep(this.view,this.elDef,n,{flags:0,token:t,tokenKey:Lh(t)},e)},t}();function Bf(t,e){var n=t.def.nodes[e];if(1&n.flags){var i=Th(t,n.nodeIndex);return n.element.template?i.template:i.renderElement}if(2&n.flags)return Ah(t,n.nodeIndex).renderText;if(20240&n.flags)return Oh(t,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+e)}function zf(t,e,n,i){return new Gf(t,e,n,i)}var Gf=function(){function t(t,e,n,i){this._moduleType=t,this._parent=e,this._bootstrapComponents=n,this._def=i,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(t){for(var e=t._def,n=t._providers=Zt(e.providers.length),i=0;i0,i=ag(t,e.parent,n,e.provider.value,e.provider.deps);if(e.outputs.length)for(var r=0;r0,r=e.provider;switch(201347067&e.flags){case 512:return ag(t,e.parent,n,r.value,r.deps);case 1024:return function(t,e,n,r,o){var a=o.length;switch(a){case 0:return r();case 1:return r(cg(t,e,n,o[0]));case 2:return r(cg(t,e,n,o[0]),cg(t,e,n,o[1]));case 3:return r(cg(t,e,n,o[0]),cg(t,e,n,o[1]),cg(t,e,n,o[2]));default:for(var s=[],c=0;c0&&_s(l,d,w.join(" "))}if(o=He(g,0),void 0!==e)for(var S=o.projection=[],x=0;xn.length&&n.push(c)}return{type:i,mainBinding:r,cases:e,values:n}}function qg(t){for(var e,n,i="",r=0,o=!1;null!==(e=Dg.exec(t));)o?e[0]==="�/*"+n+"�"&&(r=e.index,o=!1):(i+=t.substring(r,e.index+e[0].length),n=e[1],o=!0);return ngDevMode&&Rt(o,!1,'Tag mismatch: unable to find the end of the sub-template in the translation "'+t+'"'),i+t.substr(r)}function Kg(t,e,n,i){void 0===i&&(i=null);for(var r=[null,null],o=t.split(Lg),a=0,s=0;s0&&a!==s){var d=a.index-20;un()||(d=~d),u.push(d<<3|0)}var p=[],h=[];if(""===i&&im(r))u.push(i,em(o),c<<17|1);else for(var f=function(t,e){if(im(e))return qg(t);var n=t.indexOf(":"+e+"�")+2+e.toString().length,i=t.search(new RegExp("�\\/\\*\\d+:"+e+"�"));return qg(t.substring(n,i))}(i,r),g=f.replace(bm," ").split(Rg),m=0;m0&&function(t,e,n){if(ngDevMode&&Ut(n,0,"The number of slots to alloc should be greater than 0"),n>0&&t.firstCreatePass){for(var i=0;i>1),a++}}(e,t),vu(!1)}function am(t,e,n,i,r,o){var a=cn();ngDevMode&&Ht(e,n+20),e[n+20]=r;var s=ua(t,e[6],n,i,o,null);return a&&a.next===s&&(a.next=null),s}function sm(t,e,n,i){for(var r=i[11],o=null,a=null,s=[],c=0;c>>17;p=h===t?i[6]:He(n,h),ngDevMode&&Bt(o,"You need to create or select a node before you can insert it into the DOM"),a=nm(n,o,p,a,i);break;case 0:var f=l>=0,g=(f?l:~l)>>>3;s.push(g),a=o,(o=He(n,g))&&ln(o,f);break;case 5:a=o=He(n,l>>>3),ln(o,!1);break;case 4:var m=l>>>3,v=e[++c],y=e[++c];Va(He(n,m),i,v,y,null,null);break;default:throw new Error('Unable to determine the type of mutate operation for "'+l+'"')}else switch(l){case Mo:var b=e[++c],w=e[++c];ngDevMode&&Rt(typeof b,"string",'Expected "'+b+'" to be a comment node value');var S=r.createComment(b);ngDevMode&&ngDevMode.rendererCreateComment++,a=o,o=am(n,i,w,5,S,null),s.push(w),Kr(S,i),o.activeCaseIndex=null,dn();break;case xo:var x=e[++c];m=e[++c],ngDevMode&&Rt(typeof x,"string",'Expected "'+x+'" to be an element node tag name');var M=r.createElement(x);ngDevMode&&ngDevMode.rendererCreateElement++,a=o,o=am(n,i,m,3,M,x),s.push(m);break;default:throw new Error('Unable to determine the type of mutate operation for "'+l+'"')}}return dn(),s}function cm(t,e,n,i){var r=He(t,n),o=Be(n,e);o&&Ms(e[11],o);var a=We(e,n);if(we(a)){var s=a;0!==r.type&&Ms(e[11],s[7])}i&&(r.flags|=64),ngDevMode&&ngDevMode.rendererRemoveNode++}function lm(t,e,n){tm(t,e,n),om()}function um(t,e){var n=on(),i=an();ngDevMode&&Bt(i,"tView should be defined"),function(t,e,n,i){for(var r=cn().index-20,o=[],a=0;a>>2,m=void 0,v=void 0;switch(3&f){case 1:var y=e[++h],b=e[++h];Ma(o,He(o,g),a,y,p,a[11],b,!1);break;case 0:rs(a,g,p);break;case 2:if(m=n[e[++h]],null!==(v=He(o,g)).activeCaseIndex)for(var w=m.remove[v.activeCaseIndex],S=0;S>>3,!1);break;case 6:var M=He(o,w[S+1]>>>3).activeCaseIndex;null!==M&&Wt(n[x>>>3].remove[M],w)}}var E=gm(m,p);v.activeCaseIndex=-1!==E?E:null,E>-1&&(sm(-1,m.create[E],o,a),c=!0);break;case 3:m=n[e[++h]],null!==(v=He(o,g)).activeCaseIndex&&t(m.update[v.activeCaseIndex],n,i,r,o,a,c)}}}l+=d}}(i,r,o,dm,e,a),dm=0,pm=0}}function gm(t,e){var n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:var i=function(t,e){var n=Ag(wm)(parseInt(t,10)),i=_g[n];return void 0!==i?i:"other"}(e);-1===(n=t.cases.indexOf(i))&&"other"!==i&&(n=t.cases.indexOf("other"));break;case 0:n=t.cases.indexOf("other")}return n}function mm(t,e,n,r){for(var o=[],a=[],s=[],c=[],l=[],u=0;u=0;n--){var i=e[n];if(t===i.name)return i}throw new Error("The pipe '"+t+"' could not be found!")}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var o=n.factory||(n.factory=ve(n.type,!0)),a=gt(Xl),s=di(!1),c=o();return di(s),gt(a),ql(i,on(),t,c),c}function Km(t,e,n){var i=on(),r=We(i,t);return $m(i,Qm(i,t)?Bm(i,fn(),e,r.transform,n,r):r.transform(n))}function Xm(t,e,n,i){var r=on(),o=We(r,t);return $m(r,Qm(r,t)?zm(r,fn(),e,o.transform,n,i,o):o.transform(n,i))}function Ym(t,e,n,i,r){var o=on(),a=We(o,t);return $m(o,Qm(o,t)?Gm(o,fn(),e,a.transform,n,i,r,a):a.transform(n,i,r))}function Zm(t,e,n,i,r,o){var a=on(),s=We(a,t);return $m(a,Qm(a,t)?Hm(a,fn(),e,s.transform,n,i,r,o,s):s.transform(n,i,r,o))}function Jm(t,e,n){var i=on(),r=We(i,t);return $m(i,Qm(i,t)?Wm(i,fn(),e,r.transform,n,r):r.transform.apply(r,n))}function Qm(t,e){return t[1].data[e+20].pure}function $m(t,e){return gl.isWrapped(e)&&(e=gl.unwrap(e),t[gn()]=ho),e} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var tv=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n.__isAsync=e,n}return Object(i.c)(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,i){var o,a=function(t){return null},s=function(){return null};e&&"object"==typeof e?(o=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(a=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(o=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(a=this.__isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),i&&(s=this.__isAsync?function(){setTimeout(function(){return i()})}:function(){i()}));var c=t.prototype.subscribe.call(this,o,a,s);return e instanceof r.a&&e.add(c),c},e}(o.a); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function ev(){return this._results[pl()]()}var nv=function(){function t(){this.dirty=!0,this._results=[],this.changes=new tv,this.length=0;var e=pl(),n=t.prototype;n[e]||(n[e]=ev)}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=qt(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),iv=function(){function t(t){this.queryList=t,this.matches=null}return t.prototype.clone=function(){return new t(this.queryList)},t.prototype.setDirty=function(){this.queryList.setDirty()},t}(),rv=function(){function t(t){void 0===t&&(t=[]),this.queries=t}return t.prototype.createEmbeddedView=function(e){var n=e.queries;if(null!==n){for(var i=null!==e.contentQueries?e.contentQueries[0]:n.length,r=[],o=0;o0)r.push(s[c/2]);else{var u=a[c+1],d=n[-l];ngDevMode&&_e(d);for(var p=10;p=0;t--){var e=Ov[t],n=e.moduleType,i=e.ngModule;i.declarations&&i.declarations.every(Iv)&&(Ov.splice(t,1),Bv(n,i))}}finally{_v=!1}}}function Iv(t){return Array.isArray(t)?t.every(Iv):!!G(t)}function kv(t,e){void 0===e&&(e={}),Dv(t,e),function(t,e){Ov.push({moduleType:t,ngModule:e})}(t,e)}function Dv(t,e,n){void 0===n&&(n=!1),ngDevMode&&Bt(t,"Required value moduleType"),ngDevMode&&Bt(e,"Required value ngModule");var i=qt(e.declarations||Tv),r=null;Object.defineProperty(t,nt,{configurable:!0,get:function(){if(null===r){if(ngDevMode&&e.imports&&e.imports.indexOf(t)>-1)throw new Error("'"+ri(t)+"' module can't import itself");(r=Q().compileNgModule(Ev,"ng:///"+t.name+"/ɵmod.js",{type:t,bootstrap:qt(e.bootstrap||Tv).map(G),declarations:i.map(G),imports:qt(e.imports||Tv).map(G).map(Hv),exports:qt(e.exports||Tv).map(G).map(Hv),schemas:e.schemas?qt(e.schemas):null,id:e.id||null})).schemas||(r.schemas=[])}return r}});var o=null;Object.defineProperty(t,L,{get:function(){if(null===o){ngDevMode&&Rv(t,n);var i={name:t.name,type:t,deps:$s(t),providers:e.providers||Tv,imports:[(e.imports||Tv).map(G),(e.exports||Tv).map(G)]};o=Q().compileInjector(Ev,"ng:///"+t.name+"/ɵinj.js",i)}return o},configurable:!!ngDevMode})}function Rv(t,e,n){if(!Vv.get(t)){var r;if(Vv.set(t,!0),t=G(t),n){if(!(r=ye(t)))throw new Error("Unexpected value '"+t.name+"' imported by the module '"+n.name+"'. Please add an @NgModule annotation.")}else r=ye(t,!0);var o=[],a=li(r.declarations),s=li(r.imports);qt(s).map(Lv).forEach(function(e){p(e,t),Rv(e,!1,t)});var c=li(r.exports);a.forEach(function(e){fe(e=G(e))||ge(e)||me(e)||o.push("Unexpected value '"+ri(e)+"' declared by the module '"+ri(t)+"'. Please add a @Pipe/@Directive/@Component annotation.")}),a.forEach(function(t){var e=ge(t=G(t));!fe(t)&&e&&0==e.selectors.length&&o.push("Directive "+ri(t)+" has no selector, please add it!")});var l=Object(i.h)(a.map(G),qt(s.map(Uv)).map(G));c.forEach(function(e){var n=(fe(e=G(e))?"component":ge(e)&&"directive")||me(e)&&"pipe";n&&-1===l.lastIndexOf(e)&&o.push("Can't export "+n+" "+ri(e)+" from "+ri(t)+" as it was neither declared nor imported!")}),a.forEach(function(n){return function(e,n){e=G(e);var i=jv.get(e);if(i&&i!==t){if(!n){var r=[i,t].map(ri).sort();o.push("Type "+ri(e)+" is part of the declarations of 2 modules: "+r[0]+" and "+r[1]+"! Please consider moving "+ri(e)+" to a higher module that imports "+r[0]+" and "+r[1]+". You can also create a new NgModule that exports and includes "+ri(e)+" then import that NgModule in "+r[0]+" and "+r[1]+".")}}else jv.set(e,t)}(n,e)}),a.forEach(function(t){if(fe(t=G(t))){var e=Nv(t,"Component");e&&e.entryComponents&&Kt(e.entryComponents,d)}});var u=Nv(t,"NgModule");if(u&&(u.imports&&qt(u.imports).map(Lv).forEach(function(e){p(e,t),Rv(e,!1,t)}),u.bootstrap&&Kt(u.bootstrap,function(t){fe(t=G(t))||o.push(ri(t)+" cannot be used as an entry component.")}),u.bootstrap&&Kt(u.bootstrap,d),u.entryComponents&&Kt(u.entryComponents,d)),o.length)throw new Error(o.join("\n"))}function d(t){t=G(t),jv.get(t)||o.push("Component "+ri(t)+" is not part of any NgModule or the module has not been imported into your module.")}function p(t,e){if(fe(t=G(t))||ge(t))throw new Error("Unexpected directive '"+t.name+"' imported by the module '"+e.name+"'. Please add an @NgModule annotation.");if(me(t))throw new Error("Unexpected pipe '"+t.name+"' imported by the module '"+e.name+"'. Please add an @NgModule annotation.")}}function Lv(t){return(t=G(t)).ngModule||t}function Nv(t,e){var n=null;return i(t.__annotations__),i(t.decorators),n;function i(t){t&&t.forEach(r)}function r(t){n||(Object.getPrototypeOf(t).ngMetadataName==e?n=t:t.type&&Object.getPrototypeOf(t.type).ngMetadataName==e&&(n=t.args[0]))}}var jv=new Map,Vv=new Map;function Fv(){jv=new Map,Vv=new Map,Ov.length=0}function Uv(t){var e=ye(t=G(t),!0);return Object(i.h)(qt(li(e.exports).map(function(t){return ye(t)?(Rv(t,!1),Uv(t)):t})))}function Bv(t,e){var n=qt(e.declarations||Tv),i=Gv(t);n.forEach(function(e){e.hasOwnProperty($)?zv(fe(e),i):e.hasOwnProperty(tt)||e.hasOwnProperty(et)||(e.ngSelectorScope=t)})}function zv(t,e){t.directiveDefs=function(){return Array.from(e.compilation.directives).map(function(t){return t.hasOwnProperty($)?fe(t):ge(t)}).filter(function(t){return!!t})},t.pipeDefs=function(){return Array.from(e.compilation.pipes).map(function(t){return me(t)})},t.schemas=e.schemas,t.tView=null}function Gv(t){if(!Wv(t))throw new Error(t.name+" does not have a module def (ɵmod property)");var e=ye(t);if(null!==e.transitiveCompileScopes)return e.transitiveCompileScopes;var n={schemas:e.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return li(e.imports).forEach(function(t){var e=t;if(!Wv(e))throw new Error("Importing "+e.name+" which does not have a ɵmod property");var i=Gv(e);i.exported.directives.forEach(function(t){return n.compilation.directives.add(t)}),i.exported.pipes.forEach(function(t){return n.compilation.pipes.add(t)})}),li(e.declarations).forEach(function(t){me(t)?n.compilation.pipes.add(t):n.compilation.directives.add(t)}),li(e.exports).forEach(function(t){var e=t;if(Wv(e)){var i=Gv(e);i.exported.directives.forEach(function(t){n.compilation.directives.add(t),n.exported.directives.add(t)}),i.exported.pipes.forEach(function(t){n.compilation.pipes.add(t),n.exported.pipes.add(t)})}else me(e)?n.exported.pipes.add(e):n.exported.directives.add(e)}),e.transitiveCompileScopes=n,n}function Hv(t){return function(t){return void 0!==t.ngModule}(t)?t.ngModule:t}function Wv(t){return!!ye(t)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function qv(t,e){("undefined"==typeof ngDevMode||ngDevMode)&&at();var n=null;!function(t,e){sl(e)&&(ol.set(t,e),al.add(t))}(t,e),Yv(t,e),Object.defineProperty(t,$,{get:function(){if(null===n){var r=Q();if(sl(e)){var o=["Component '"+t.name+"' is not resolved:"];throw e.templateUrl&&o.push(" - templateUrl: "+e.templateUrl),e.styleUrls&&e.styleUrls.length&&o.push(" - styleUrls: "+JSON.stringify(e.styleUrls)),o.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(o.join("\n"))}var a=Cv,s=e.preserveWhitespaces;void 0===s&&(s=null!==a&&void 0!==a.preserveWhitespaces&&a.preserveWhitespaces);var c=e.encapsulation;void 0===c&&(c=null!==a&&void 0!==a.defaultEncapsulation?a.defaultEncapsulation:Tt.Emulated);var l=e.templateUrl||"ng:///"+t.name+"/template.html",u=Object(i.a)(Object(i.a)({},Zv(t,e)),{typeSourceSpan:r.createParseSourceSpan("Component",t.name,l),template:e.template||"",preserveWhitespaces:s,styles:e.styles||ne,animations:e.animations,directives:[],changeDetection:e.changeDetection,pipes:new Map,encapsulation:c,interpolation:e.interpolation,viewProviders:e.viewProviders||null});if(u.usesInheritance&&Jv(t),n=r.compileComponent(Ev,l,u),Pv(),void 0!==t.ngSelectorScope){var d=Gv(t.ngSelectorScope);zv(n,d)}}return n},configurable:!!ngDevMode})}function Kv(t,e){var n=null;Yv(t,e||{}),Object.defineProperty(t,tt,{get:function(){if(null===n){var i=Xv(t,e||{});n=Q().compileDirective(Ev,i.sourceMapUrl,i.metadata)}return n},configurable:!!ngDevMode})}function Xv(t,e){var n=t&&t.name,i="ng:///"+n+"/ɵdir.js",r=Q(),o=Zv(t,e);return o.typeSourceSpan=r.createParseSourceSpan("Directive",n,i),o.usesInheritance&&Jv(t),{metadata:o,sourceMapUrl:i}}function Yv(t,e){var n=null;Object.defineProperty(t,rt,{get:function(){if(null===n){var r=Xv(t,e),o=Q();n=o.compileFactory(Ev,"ng:///"+t.name+"/ɵfac.js",Object(i.a)(Object(i.a)({},r.metadata),{injectFn:"directiveInject",target:o.R3FactoryTarget.Directive}))}return n},configurable:!!ngDevMode})}function Zv(t,e){var n,i=Qs(),r=i.ownPropMetadata(t);return{name:t.name,type:t,typeArgumentCount:0,selector:void 0!==e.selector?e.selector:null,deps:$s(t),host:e.host||ee,propMetadata:r,inputs:e.inputs||ne,outputs:e.outputs||ne,queries:Qv(t,r,$v),lifecycle:{usesOnChanges:i.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!function(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}(t),exportAs:(n=e.exportAs,void 0===n?null:ny(n)),providers:e.providers||null,viewQueries:Qv(t,r,ty)}}function Jv(t){for(var e=Object.prototype,n=Object.getPrototypeOf(t.prototype).constructor;n&&n!==e;)ge(n)||fe(n)||!ry(n)||Kv(n,null),n=Object.getPrototypeOf(n)}function Qv(t,e,n){var i=[],r=function(r){if(e.hasOwnProperty(r)){var o=e[r];o.forEach(function(e){if(n(e)){if(!e.selector)throw new Error("Can't construct a query for the property \""+r+'" of "'+ri(t)+"\" since the query selector wasn't defined.");if(o.some(ey))throw new Error("Cannot combine @Input decorators with query decorators");i.push(function(t,e){return{propertyName:r,predicate:(n=e.selector,"string"==typeof n?ny(n):G(n)),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static};var n}(0,e))}})}};for(var o in e)r(o);return i}function $v(t){var e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function ty(t){var e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function ey(t){return"Input"===t.ngMetadataName}function ny(t){return t.split(",").map(function(t){return t.trim()})}var iy=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function ry(t){var e=Qs();if(iy.some(function(n){return e.hasLifecycleHook(t,n)}))return!0;var n=e.propMetadata(t);for(var i in n)for(var r=n[i],o=0;o0&&(r=setTimeout(function(){i._callbacks=i._callbacks.filter(function(t){return t.timeoutId!==r}),t(i._didWork,i.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})},t.prototype.whenStable=function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},(t=Object(i.b)([Object(i.d)("design:paramtypes",[eb])],t)).ɵfac=function(e){return new(e||t)(vt(eb))},t.ɵprov=O({token:t,factory:function(e){return t.ɵfac(e)}}),t}(),ub=function(){function t(){this._applications=new Map,hb.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),hb.findTestabilityInTree(this,t,e)},(t=Object(i.b)([Object(i.d)("design:paramtypes",[])],t)).ɵfac=function(e){return new(e||t)},t.ɵprov=O({token:t,factory:function(e){return t.ɵfac(e)}}),t}(); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function db(t){hb=t}var pb,hb=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}()),fb=gb; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function gb(t,e,n){var r;ngDevMode&&(void 0===r&&(r="Type passed in is not NgModuleType, it does not have 'ɵmod' property."),ye(n)||zt(r));var o=t.get(Jy,[]).concat(e);("undefined"==typeof ngJitMode||ngJitMode)&&function(t){if(null!==Cv){if(t.defaultEncapsulation!==Cv.defaultEncapsulation)return void(ngDevMode&&console.error("Provided value for `defaultEncapsulation` can not be changed once it has been set."));if(t.preserveWhitespaces!==Cv.preserveWhitespaces)return void(ngDevMode&&console.error("Provided value for `preserveWhitespaces` can not be changed once it has been set."))}Cv=t}({defaultEncapsulation:Pb(o.map(function(t){return t.defaultEncapsulation})),preserveWhitespaces:Pb(o.map(function(t){return t.preserveWhitespaces}))});var a=new _m(n);if(0===ol.size)return Promise.resolve(a);var s,c,l=(s=o.map(function(t){return t.providers}),c=[],s.forEach(function(t){return t&&c.push.apply(c,Object(i.h)(t))}),c);if(0===l.length)return Promise.resolve(a);var u=Q(),d=Ec.create({providers:l}).get(u.ResourceLoader);return rl(function(t){return Promise.resolve(d.get(t))}).then(function(){return a})}var mb=function(){ngDevMode&&op()},vb=yb;function yb(t){return t.isBoundToModule}var bb=new ct("AllowMultipleToken"),wb=function(t,e){this.name=t,this.token=e};function Sb(t){if(pb&&!pb.destroyed&&!pb.injector.get(bb,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");mb(),pb=t.get(Ab);var e=t.get(Py,null);return e&&e.forEach(function(t){return t()}),pb}function xb(t,e,n){void 0===n&&(n=[]);var i="Platform: "+e,r=new ct(i);return function(e){void 0===e&&(e=[]);var o=Cb();if(!o||o.injector.get(bb,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var a=n.concat(e).concat({provide:r,useValue:!0},{provide:cc,useValue:"platform"});Sb(Ec.create({providers:a,name:i}))}return Mb(r)}}function Mb(t){var e=Cb();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}function Eb(){pb&&!pb.destroyed&&pb.destroy()}function Cb(){return pb&&!pb.destroyed?pb:null}var Ab=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n=this,i=function(t,e){return"noop"===t?new cb:("zone.js"===t?void 0:t)||new eb({enableLongStackTrace:Ji(),shouldCoalesceEventChangeDetection:e})}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),r=[{provide:eb,useValue:i}];return i.run(function(){var e=Ec.create({providers:r,parent:n.injector,name:t.moduleType.name}),o=t.create(e),a=o.injector.get(ki,null);if(!a)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return o.onDestroy(function(){return _b(n._modules,o)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(t){a.handleError(t)}})}),function(t,e,n){try{var i=n();return au(i)?i.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):i}catch(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}}(a,i,function(){var t=o.injector.get(Ey);return t.runInitializers(),t.donePromise.then(function(){return Uy&&Sm(o.injector.get(Ly,Pg)||Pg),n._moduleDoBootstrap(o),o})})})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var i=Tb({},e);return fb(this.injector,i,t).then(function(t){return n.bootstrapModuleFactory(t,i)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(Ob);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+F(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),(t=Object(i.b)([Object(i.d)("design:paramtypes",[Ec])],t)).ɵfac=function(e){return new(e||t)(vt(Ec))},t.ɵprov=O({token:t,factory:function(e){return t.ɵfac(e)}}),t}();function Tb(t,e){return Array.isArray(e)?e.reduce(Tb,t):Object(i.a)(Object(i.a)({},t),e)}var Ob=function(){function t(t,e,n,i,r,o){var l=this;this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Ji(),this._zone.onMicrotaskEmpty.subscribe({next:function(){l._zone.run(function(){l.tick()})}});var u=new a.a(function(t){l._stable=l._zone.isStable&&!l._zone.hasPendingMacrotasks&&!l._zone.hasPendingMicrotasks,l._zone.runOutsideAngular(function(){t.next(l._stable),t.complete()})}),d=new a.a(function(t){var e;l._zone.runOutsideAngular(function(){e=l._zone.onStable.subscribe(function(){eb.assertNotInAngularZone(),tb(function(){l._stable||l._zone.hasPendingMacrotasks||l._zone.hasPendingMicrotasks||(l._stable=!0,t.next(!0))})})});var n=l._zone.onUnstable.subscribe(function(){eb.assertInAngularZone(),l._stable&&(l._stable=!1,l._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=Object(s.a)(u,d.pipe(Object(c.a)()))}return t.prototype.bootstrap=function(t,e){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof Lp?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=vb(n)?void 0:this._injector.get(_t),o=e||n.selector,a=n.create(Ec.NULL,[],o,r);a.onDestroy(function(){i._unloadComponent(a)});var s=a.injector.get(lb,null);return s&&a.injector.get(ub).registerApplication(a.location.nativeElement,s),this._loadComponent(a),Ji()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),a},t.prototype.tick=function(){var t,e,n,r,o=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;try{for(var a=Object(i.j)(this._views),s=a.next();!s.done;s=a.next())s.value.detectChanges()}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}if(this._enforceNoNewChanges)try{for(var c=Object(i.j)(this._views),l=c.next();!l.done;l=c.next())l.value.checkNoChanges()}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}catch(t){this._zone.runOutsideAngular(function(){return o._exceptionHandler.handleError(t)})}finally{this._runningTick=!1}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;_b(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(ky,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),_b(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),(t=Object(i.b)([Object(i.d)("design:paramtypes",[eb,Ry,Ec,ki,Up,Ey])],t)).ɵfac=function(e){return new(e||t)(vt(eb),vt(Ry),vt(Ec),vt(ki),vt(Up),vt(Ey))},t.ɵprov=O({token:t,factory:function(e){return t.ɵfac(e)}}),t}();function _b(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}function Pb(t){for(var e=t.length-1;e>=0;e--)if(void 0!==t[e])return t[e]} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Ib=function(){};function kb(t){var e=Tm(t);if(!e)throw Lb(t);return e}function Db(t){var e=Tm(t);if(!e)throw Lb(t);return new _m(e)}var Rb=Db;function Lb(t){return new Error("No module with ID "+t+" loaded")} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Nb=function(){},jb={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Vb=function(){function t(t,e){this._compiler=t,this._config=e||jb}return t.prototype.load=function(t){return!Uy&&this._compiler instanceof Zy?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var e=this,r=Object(i.f)(t.split("#"),2),o=r[0],a=r[1];return void 0===a&&(a="default"),n(519)(o).then(function(t){return t[a]}).then(function(t){return Fb(t,o,a)}).then(function(t){return e._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var e=Object(i.f)(t.split("#"),2),r=e[0],o=e[1],a="NgFactory";return void 0===o&&(o="default",a=""),n(519)(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(t){return t[o+a]}).then(function(t){return Fb(t,r,o)})},(t=Object(i.b)([Object(i.e)(1,w()),Object(i.d)("design:paramtypes",[Zy,Nb])],t)).ɵfac=function(e){return new(e||t)(vt(Zy),vt(Nb,8))},t.ɵprov=O({token:t,factory:function(e){return t.ɵfac(e)}}),t}();function Fb(t,e,n){if(!t)throw new Error("Cannot find '"+n+"' in '"+e+"'");return t} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var Ub=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e}(Fs),Bb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e}(Ub),zb=function(t,e){this.name=t,this.callback=e},Gb=function(){function t(t,e,n){this.listeners=[],this.parent=null,this._debugContext=n,this.nativeNode=t,e&&e instanceof Hb&&e.addChild(this)}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),Hb=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.properties={},r.attributes={},r.classes={},r.styles={},r.childNodes=[],r.nativeElement=e,r}return Object(i.c)(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n,r=this,o=this.childNodes.indexOf(t);-1!==o&&((n=this.childNodes).splice.apply(n,Object(i.h)([o+1,0],e)),e.forEach(function(e){e.parent&&e.parent.removeChild(e),t.parent=r}))},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return function t(e,n,i){e.childNodes.forEach(function(e){e instanceof Hb&&(n(e)&&i.push(e),t(e,n,i))})}(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return function t(e,n,i){e instanceof Hb&&e.childNodes.forEach(function(e){n(e)&&i.push(e),e instanceof Hb&&t(e,n,i)})}(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(Gb);function Wb(t){return t.map(function(t){return t.nativeElement})}var qb=function(){function t(t){this.nativeNode=t}return Object.defineProperty(t.prototype,"parent",{get:function(){var t=this.nativeNode.parentNode;return t?new Kb(t):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return Zd(this.nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){var t=this.nativeNode;return t&&(qd(t)||Xd(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return qd(this.nativeNode)||Kd(this.nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listeners",{get:function(){return tp(this.nativeNode).filter(function(t){return"dom"===t.type})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return null===(t=Qd(this.nativeNode,!1))?{}:(void 0===t.localRefs&&(t.localRefs=function(t,e){var n=t[1].data[e];if(n&&n.localNames){for(var i={},r=n.index+1,o=0;o1){for(var l=s[1],u=1;u0)l=g,Vw(g)||(u=g);else for(;l&&f===l.nodeIndex+l.childCount;){var b=l.parent;b&&(b.childFlags|=l.childFlags,b.childMatchedQueries|=l.childMatchedQueries),u=(l=b)&&Vw(l)?l.renderParent:l}}return{factory:null,nodeFlags:a,rootNodeFlags:s,nodeMatchedQueries:c,flags:t,nodes:e,updateDirectives:n||Dh,updateRenderer:i||Dh,handleEvent:function(t,n,i,r){return e[n].element.handleEvent(t,i,r)},bindingCount:r,outputCount:o,lastRenderRootNode:h}}function Vw(t){return 0!=(1&t.flags)&&null===t.element.name}function Fw(t,e,n){var i=e.element&&e.element.template;if(i){if(!i.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(i.lastRenderRootNode&&16777216&i.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.nodeIndex+"!")}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+e.nodeIndex+"!");if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.nodeIndex+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.nodeIndex+"!")}if(e.childCount){var r=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=r&&e.nodeIndex+e.childCount>r)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.nodeIndex+"!")}}function Uw(t,e,n,i){var r=Gw(t.root,t.renderer,t,e,n);return Hw(r,t.component,i),Ww(r),r}function Bw(t,e,n){var i=Gw(t,t.renderer,null,null,e);return Hw(i,n,n),Ww(i),i}function zw(t,e,n,i){var r,o=e.element.componentRendererType;return r=o?t.root.rendererFactory.createRenderer(i,o):t.root.renderer,Gw(t.root,r,t,e.element.componentProvider,n)}function Gw(t,e,n,i,r){var o=new Array(r.nodes.length),a=r.outputCount?new Array(r.outputCount):null;return{def:r,parent:n,viewContainerParent:null,parentNodeDef:i,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(r.bindingCount),disposables:a,initIndex:-1}}function Hw(t,e,n){t.component=e,t.context=n}function Ww(t){var e;if(Yh(t)){var n=t.parentNodeDef;e=Th(t.parent,n.parent.nodeIndex).renderElement}for(var i=t.def,r=t.nodes,o=0;o0&&xw(t,e,0,n)&&(h=!0),p>1&&xw(t,e,1,i)&&(h=!0),p>2&&xw(t,e,2,r)&&(h=!0),p>3&&xw(t,e,3,o)&&(h=!0),p>4&&xw(t,e,4,a)&&(h=!0),p>5&&xw(t,e,5,s)&&(h=!0),p>6&&xw(t,e,6,c)&&(h=!0),p>7&&xw(t,e,7,l)&&(h=!0),p>8&&xw(t,e,8,u)&&(h=!0),p>9&&xw(t,e,9,d)&&(h=!0),h}(t,e,n,i,r,o,a,s,c,l,u,d);case 2:return function(t,e,n,i,r,o,a,s,c,l,u,d){var p=!1,h=e.bindings,f=h.length;if(f>0&&Uh(t,e,0,n)&&(p=!0),f>1&&Uh(t,e,1,i)&&(p=!0),f>2&&Uh(t,e,2,r)&&(p=!0),f>3&&Uh(t,e,3,o)&&(p=!0),f>4&&Uh(t,e,4,a)&&(p=!0),f>5&&Uh(t,e,5,s)&&(p=!0),f>6&&Uh(t,e,6,c)&&(p=!0),f>7&&Uh(t,e,7,l)&&(p=!0),f>8&&Uh(t,e,8,u)&&(p=!0),f>9&&Uh(t,e,9,d)&&(p=!0),p){var g=e.text.prefix;f>0&&(g+=Nw(n,h[0])),f>1&&(g+=Nw(i,h[1])),f>2&&(g+=Nw(r,h[2])),f>3&&(g+=Nw(o,h[3])),f>4&&(g+=Nw(a,h[4])),f>5&&(g+=Nw(s,h[5])),f>6&&(g+=Nw(c,h[6])),f>7&&(g+=Nw(l,h[7])),f>8&&(g+=Nw(u,h[8])),f>9&&(g+=Nw(d,h[9]));var m=Ah(t,e.nodeIndex).renderText;t.renderer.setValue(m,g)}return p}(t,e,n,i,r,o,a,s,c,l,u,d);case 16384:return function(t,e,n,i,r,o,a,s,c,l,u,d){var p=Oh(t,e.nodeIndex),h=p.instance,f=!1,g=void 0,m=e.bindings.length;return m>0&&Fh(t,e,0,n)&&(f=!0,g=ug(t,p,e,0,n,g)),m>1&&Fh(t,e,1,i)&&(f=!0,g=ug(t,p,e,1,i,g)),m>2&&Fh(t,e,2,r)&&(f=!0,g=ug(t,p,e,2,r,g)),m>3&&Fh(t,e,3,o)&&(f=!0,g=ug(t,p,e,3,o,g)),m>4&&Fh(t,e,4,a)&&(f=!0,g=ug(t,p,e,4,a,g)),m>5&&Fh(t,e,5,s)&&(f=!0,g=ug(t,p,e,5,s,g)),m>6&&Fh(t,e,6,c)&&(f=!0,g=ug(t,p,e,6,c,g)),m>7&&Fh(t,e,7,l)&&(f=!0,g=ug(t,p,e,7,l,g)),m>8&&Fh(t,e,8,u)&&(f=!0,g=ug(t,p,e,8,u,g)),m>9&&Fh(t,e,9,d)&&(f=!0,g=ug(t,p,e,9,d,g)),g&&h.ngOnChanges(g),65536&e.flags&&Ch(t,256,e.nodeIndex)&&h.ngOnInit(),262144&e.flags&&h.ngDoCheck(),f}(t,e,n,i,r,o,a,s,c,l,u,d);case 32:case 64:case 128:return function(t,e,n,i,r,o,a,s,c,l,u,d){var p=e.bindings,h=!1,f=p.length;if(f>0&&Uh(t,e,0,n)&&(h=!0),f>1&&Uh(t,e,1,i)&&(h=!0),f>2&&Uh(t,e,2,r)&&(h=!0),f>3&&Uh(t,e,3,o)&&(h=!0),f>4&&Uh(t,e,4,a)&&(h=!0),f>5&&Uh(t,e,5,s)&&(h=!0),f>6&&Uh(t,e,6,c)&&(h=!0),f>7&&Uh(t,e,7,l)&&(h=!0),f>8&&Uh(t,e,8,u)&&(h=!0),f>9&&Uh(t,e,9,d)&&(h=!0),h){var g=_h(t,e.nodeIndex),m=void 0;switch(201347067&e.flags){case 32:m=[],f>0&&m.push(n),f>1&&m.push(i),f>2&&m.push(r),f>3&&m.push(o),f>4&&m.push(a),f>5&&m.push(s),f>6&&m.push(c),f>7&&m.push(l),f>8&&m.push(u),f>9&&m.push(d);break;case 64:m={},f>0&&(m[p[0].name]=n),f>1&&(m[p[1].name]=i),f>2&&(m[p[2].name]=r),f>3&&(m[p[3].name]=o),f>4&&(m[p[4].name]=a),f>5&&(m[p[5].name]=s),f>6&&(m[p[6].name]=c),f>7&&(m[p[7].name]=l),f>8&&(m[p[8].name]=u),f>9&&(m[p[9].name]=d);break;case 128:var v=n;switch(f){case 1:m=v.transform(n);break;case 2:m=v.transform(i);break;case 3:m=v.transform(i,r);break;case 4:m=v.transform(i,r,o);break;case 5:m=v.transform(i,r,o,a);break;case 6:m=v.transform(i,r,o,a,s);break;case 7:m=v.transform(i,r,o,a,s,c);break;case 8:m=v.transform(i,r,o,a,s,c,l);break;case 9:m=v.transform(i,r,o,a,s,c,l,u);break;case 10:m=v.transform(i,r,o,a,s,c,l,u,d)}}g.value=m}return h}(t,e,n,i,r,o,a,s,c,l,u,d);default:throw"unreachable"}}(t,e,r,o,a,s,c,l,u,d,p,h):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){for(var i=!1,r=0;r0&&Bh(t,e,0,n),p>1&&Bh(t,e,1,i),p>2&&Bh(t,e,2,r),p>3&&Bh(t,e,3,o),p>4&&Bh(t,e,4,a),p>5&&Bh(t,e,5,s),p>6&&Bh(t,e,6,c),p>7&&Bh(t,e,7,l),p>8&&Bh(t,e,8,u),p>9&&Bh(t,e,9,d)}(t,e,i,r,o,a,s,c,l,u,d,p):function(t,e,n){for(var i=0;i0){var o=new Set(t.modules);vS.forEach(function(e,n){if(o.has(I(n).providedIn)){var r={token:n,flags:e.flags|(i?4096:0),deps:$h(e.deps),value:e.value,index:t.providers.length};t.providers.push(r),t.providersByKey[Lh(n)]=r}})}}(t=t.factory(function(){return Dh})),t):t}(i))}var pS,hS,fS,gS,mS=new Map,vS=new Map,yS=new Map;function bS(t){var e;mS.set(t.token,t),"function"==typeof t.token&&(e=I(t.token))&&"function"==typeof e.providedIn&&vS.set(t.token,t)}function wS(t,e){var n=nf(nf(Pf(e)).nodes[0].element.componentView);yS.set(t,n)}function SS(){mS.clear(),vS.clear(),yS.clear()}function xS(t){if(0===mS.size)return t;var e=function(t){for(var e=[],n=null,i=0;i=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function c(t,e){return function(n,i){e(n,i,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function u(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function p(){for(var t=[],e=0;e0?e.substring(1):e},e.prototype.prepareExternalUrl=function(t){var e=m(this._baseHref,t);return e.length>0?"#"+e:e},e.prototype.pushState=function(t,e,n,i){var r=this.prepareExternalUrl(n+y(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)},e.prototype.replaceState=function(t,e,n,i){var r=this.prepareExternalUrl(n+y(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},(e=Object(i.b)([Object(i.e)(1,Object(r.Optional)()),Object(i.e)(1,Object(r.Inject)(S)),Object(i.d)("design:paramtypes",[u,String])],e)).ɵfac=function(t){return new(t||e)(r["ɵɵinject"](u),r["ɵɵinject"](S,8))},e.ɵprov=r["ɵɵdefineInjectable"]({token:e,factory:function(t){return e.ɵfac(t)}}),e}(b),E=function(){function t(t,e){var n=this;this._subject=new r.EventEmitter,this._urlChangeListeners=[],this._platformStrategy=t;var i=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=v(A(i)),this._platformStrategy.onPopState(function(t){n._subject.emit({url:n.path(!0),pop:!0,state:t.state,type:t.type})})}var e;return e=t,t.prototype.path=function(t){return void 0===t&&(t=!1),this.normalize(this._platformStrategy.path(t))},t.prototype.getState=function(){return this._platformLocation.getState()},t.prototype.isCurrentPathEqualTo=function(t,e){return void 0===e&&(e=""),this.path()==this.normalize(t+y(e))},t.prototype.normalize=function(t){return e.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,A(t)))},t.prototype.prepareExternalUrl=function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)},t.prototype.go=function(t,e,n){void 0===e&&(e=""),void 0===n&&(n=null),this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+y(e)),n)},t.prototype.replaceState=function(t,e,n){void 0===e&&(e=""),void 0===n&&(n=null),this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+y(e)),n)},t.prototype.forward=function(){this._platformStrategy.forward()},t.prototype.back=function(){this._platformStrategy.back()},t.prototype.onUrlChange=function(t){var e=this;this._urlChangeListeners.push(t),this.subscribe(function(t){e._notifyUrlChangeListeners(t.url,t.state)})},t.prototype._notifyUrlChangeListeners=function(t,e){void 0===t&&(t=""),this._urlChangeListeners.forEach(function(n){return n(t,e)})},t.prototype.subscribe=function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})},t.normalizeQueryParams=y,t.joinWithSlash=m,t.stripTrailingSlash=v,t.ɵprov=Object(r["ɵɵdefineInjectable"])({factory:C,token:t,providedIn:"root"}),(t=e=Object(i.b)([Object(i.d)("design:paramtypes",[b,u])],t)).ɵfac=function(e){return new(e||t)(r["ɵɵinject"](b),r["ɵɵinject"](u))},t}();function C(){return new E(Object(r["ɵɵinject"])(b),Object(r["ɵɵinject"])(u))}function A(t){return t.replace(/\/index.html$/,"")} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var T,O,_,P,I,k,D,R={ADP:[void 0,void 0,0],AFN:[void 0,void 0,0],ALL:[void 0,void 0,0],AMD:[void 0,void 0,2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"৳"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,"р.",2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN¥","¥"],COP:[void 0,"$",2],CRC:[void 0,"₡",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"Kč",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E£"],ESP:[void 0,"₧",0],EUR:["€"],FJD:[void 0,"$"],FKP:[void 0,"£"],GBP:["£"],GEL:[void 0,"₾"],GIP:[void 0,"£"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["₪"],INR:["₹"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["¥",void 0,0],KHR:[void 0,"៛"],KMF:[void 0,"CF",0],KPW:[void 0,"₩",0],KRW:["₩",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"₸"],LAK:[void 0,"₭",0],LBP:[void 0,"L£",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"₮",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"₦"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:[void 0,"₱"],PKR:[void 0,"Rs",2],PLN:[void 0,"zł"],PYG:[void 0,"₲",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"₽"],RUR:[void 0,"р."],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"£"],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"£"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"£",0],THB:[void 0,"฿"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"₺"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"₴"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["₫",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["CFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["¤"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]}; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function L(t){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].LocaleId]}function N(t,e,n){var i=Object(r["ɵfindLocaleData"])(t);return et(et([i[r["ɵLocaleDataIndex"].DayPeriodsFormat],i[r["ɵLocaleDataIndex"].DayPeriodsStandalone]],e),n)}function j(t,e,n){var i=Object(r["ɵfindLocaleData"])(t);return et(et([i[r["ɵLocaleDataIndex"].DaysFormat],i[r["ɵLocaleDataIndex"].DaysStandalone]],e),n)}function V(t,e,n){var i=Object(r["ɵfindLocaleData"])(t);return et(et([i[r["ɵLocaleDataIndex"].MonthsFormat],i[r["ɵLocaleDataIndex"].MonthsStandalone]],e),n)}function F(t,e){return et(Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].Eras],e)}function U(t){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].FirstDayOfWeek]}function B(t){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].WeekendRange]}function z(t,e){return et(Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].DateFormat],e)}function G(t,e){return et(Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].TimeFormat],e)}function H(t,e){return et(Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].DateTimeFormat],e)}function W(t,e){var n=Object(r["ɵfindLocaleData"])(t),i=n[r["ɵLocaleDataIndex"].NumberSymbols][e];if(void 0===i){if(e===k.CurrencyDecimal)return n[r["ɵLocaleDataIndex"].NumberSymbols][k.Decimal];if(e===k.CurrencyGroup)return n[r["ɵLocaleDataIndex"].NumberSymbols][k.Group]}return i}function q(t,e){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].NumberFormats][e]}function K(t){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].CurrencySymbol]||null}function X(t){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].CurrencyName]||null}function Y(t){return Object(r["ɵgetLocaleCurrencyCode"])(t)}!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific"}(T||(T={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(O||(O={})),function(t){t[t.Format=0]="Format",t[t.Standalone=1]="Standalone"}(_||(_={})),function(t){t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short"}(P||(P={})),function(t){t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full"}(I||(I={})),function(t){t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup"}(k||(k={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(D||(D={}));var Z=r["ɵgetLocalePluralCase"];function J(t){if(!t[r["ɵLocaleDataIndex"].ExtraData])throw new Error('Missing extra locale data for the locale "'+t[r["ɵLocaleDataIndex"].LocaleId]+'". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.')}function Q(t){var e=Object(r["ɵfindLocaleData"])(t);return J(e),(e[r["ɵLocaleDataIndex"].ExtraData][2]||[]).map(function(t){return"string"==typeof t?nt(t):[nt(t[0]),nt(t[1])]})}function $(t,e,n){var i=Object(r["ɵfindLocaleData"])(t);return J(i),et(et([i[r["ɵLocaleDataIndex"].ExtraData][0],i[r["ɵLocaleDataIndex"].ExtraData][1]],e)||[],n)||[]}function tt(t){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].Directionality]}function et(t,e){for(var n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function nt(t){var e=Object(i.f)(t.split(":"),2);return{hours:+e[0],minutes:+e[1]}}function it(t,e,n){void 0===n&&(n="en");var i=function(t){return Object(r["ɵfindLocaleData"])(t)[r["ɵLocaleDataIndex"].Currencies]}(n)[t]||R[t]||[],o=i[1];return"narrow"===e&&"string"==typeof o?o:i[0]||t}function rt(t){var e,n=R[t];return n&&(e=n[2]),"number"==typeof e?e:2} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var ot,at,st,ct=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,lt={},ut=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function dt(t,e,n,r){var o=function(t){if(wt(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();var e,n=parseFloat(t);if(!isNaN(t-n))return new Date(n);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){var r=Object(i.f)(t.split("-").map(function(t){return+t}),3),o=r[0],a=r[1],s=r[2];return new Date(o,a-1,s)}if(e=t.match(ct))return function(t){var e=new Date(0),n=0,i=0,r=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));var a=Number(t[4]||0)-n,s=Number(t[5]||0)-i,c=Number(t[6]||0),l=Math.round(1e3*parseFloat("0."+(t[7]||0)));return o.call(e,a,s,c,l),e}(e)}var c=new Date(t);if(!wt(c))throw new Error('Unable to convert "'+t+'" into a date');return c}(t);e=function t(e,n){var i=L(e);if(lt[i]=lt[i]||{},lt[i][n])return lt[i][n];var r="";switch(n){case"shortDate":r=z(e,I.Short);break;case"mediumDate":r=z(e,I.Medium);break;case"longDate":r=z(e,I.Long);break;case"fullDate":r=z(e,I.Full);break;case"shortTime":r=G(e,I.Short);break;case"mediumTime":r=G(e,I.Medium);break;case"longTime":r=G(e,I.Long);break;case"fullTime":r=G(e,I.Full);break;case"short":var o=t(e,"shortTime"),a=t(e,"shortDate");r=pt(H(e,I.Short),[o,a]);break;case"medium":var s=t(e,"mediumTime"),c=t(e,"mediumDate");r=pt(H(e,I.Medium),[s,c]);break;case"long":var l=t(e,"longTime"),u=t(e,"longDate");r=pt(H(e,I.Long),[l,u]);break;case"full":var d=t(e,"fullTime"),p=t(e,"fullDate");r=pt(H(e,I.Full),[d,p])}return r&&(lt[i][n]=r),r}(n,e)||e;for(var a,s=[];e;){if(!(a=ut.exec(e))){s.push(e);break}var c=(s=s.concat(a.slice(1))).pop();if(!c)break;e=c}var l=o.getTimezoneOffset();r&&(l=bt(r,l),o=function(t,e,n){var i=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(bt(e,i)-i))}(o,r));var u="";return s.forEach(function(t){var e=function(t){if(yt[t])return yt[t];var e;switch(t){case"G":case"GG":case"GGG":e=gt(st.Eras,P.Abbreviated);break;case"GGGG":e=gt(st.Eras,P.Wide);break;case"GGGGG":e=gt(st.Eras,P.Narrow);break;case"y":e=ft(at.FullYear,1,0,!1,!0);break;case"yy":e=ft(at.FullYear,2,0,!0,!0);break;case"yyy":e=ft(at.FullYear,3,0,!1,!0);break;case"yyyy":e=ft(at.FullYear,4,0,!1,!0);break;case"M":case"L":e=ft(at.Month,1,1);break;case"MM":case"LL":e=ft(at.Month,2,1);break;case"MMM":e=gt(st.Months,P.Abbreviated);break;case"MMMM":e=gt(st.Months,P.Wide);break;case"MMMMM":e=gt(st.Months,P.Narrow);break;case"LLL":e=gt(st.Months,P.Abbreviated,_.Standalone);break;case"LLLL":e=gt(st.Months,P.Wide,_.Standalone);break;case"LLLLL":e=gt(st.Months,P.Narrow,_.Standalone);break;case"w":e=vt(1);break;case"ww":e=vt(2);break;case"W":e=vt(1,!0);break;case"d":e=ft(at.Date,1);break;case"dd":e=ft(at.Date,2);break;case"E":case"EE":case"EEE":e=gt(st.Days,P.Abbreviated);break;case"EEEE":e=gt(st.Days,P.Wide);break;case"EEEEE":e=gt(st.Days,P.Narrow);break;case"EEEEEE":e=gt(st.Days,P.Short);break;case"a":case"aa":case"aaa":e=gt(st.DayPeriods,P.Abbreviated);break;case"aaaa":e=gt(st.DayPeriods,P.Wide);break;case"aaaaa":e=gt(st.DayPeriods,P.Narrow);break;case"b":case"bb":case"bbb":e=gt(st.DayPeriods,P.Abbreviated,_.Standalone,!0);break;case"bbbb":e=gt(st.DayPeriods,P.Wide,_.Standalone,!0);break;case"bbbbb":e=gt(st.DayPeriods,P.Narrow,_.Standalone,!0);break;case"B":case"BB":case"BBB":e=gt(st.DayPeriods,P.Abbreviated,_.Format,!0);break;case"BBBB":e=gt(st.DayPeriods,P.Wide,_.Format,!0);break;case"BBBBB":e=gt(st.DayPeriods,P.Narrow,_.Format,!0);break;case"h":e=ft(at.Hours,1,-12);break;case"hh":e=ft(at.Hours,2,-12);break;case"H":e=ft(at.Hours,1);break;case"HH":e=ft(at.Hours,2);break;case"m":e=ft(at.Minutes,1);break;case"mm":e=ft(at.Minutes,2);break;case"s":e=ft(at.Seconds,1);break;case"ss":e=ft(at.Seconds,2);break;case"S":e=ft(at.FractionalSeconds,1);break;case"SS":e=ft(at.FractionalSeconds,2);break;case"SSS":e=ft(at.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=mt(ot.Short);break;case"ZZZZZ":e=mt(ot.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=mt(ot.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=mt(ot.Long);break;default:return null}return yt[t]=e,e}(t);u+=e?e(o,n,l):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}function pt(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,n){return null!=e&&n in e?e[n]:t})),t}function ht(t,e,n,i,r){void 0===n&&(n="-");var o="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,o=n));for(var a=String(t);a.length0||c>-n)&&(c+=n),t===at.Hours)0===c&&-12===n&&(c=12);else if(t===at.FractionalSeconds)return s=e,ht(c,3).substr(0,s);var l=W(a,k.MinusSign);return ht(c,e,l,i,r)}}function gt(t,e,n,i){return void 0===n&&(n=_.Format),void 0===i&&(i=!1),function(r,o){return function(t,e,n,i,r,o){switch(n){case st.Months:return V(e,r,i)[t.getMonth()];case st.Days:return j(e,r,i)[t.getDay()];case st.DayPeriods:var a=t.getHours(),s=t.getMinutes();if(o){var c,l=Q(e),u=$(e,r,i);if(l.forEach(function(t,e){if(Array.isArray(t)){var n=t[0],i=n.hours,r=n.minutes,o=t[1],l=o.hours,d=o.minutes;a>=i&&s>=r&&(a0?Math.floor(r/60):Math.ceil(r/60);switch(t){case ot.Short:return(r>=0?"+":"")+ht(a,2,o)+ht(Math.abs(r%60),2,o);case ot.ShortGMT:return"GMT"+(r>=0?"+":"")+ht(a,1,o);case ot.Long:return"GMT"+(r>=0?"+":"")+ht(a,2,o)+":"+ht(Math.abs(r%60),2,o);case ot.Extended:return 0===i?"Z":(r>=0?"+":"")+ht(a,2,o)+":"+ht(Math.abs(r%60),2,o);default:throw new Error('Unknown zone width "'+t+'"')}}}function vt(t,e){return void 0===e&&(e=!1),function(n,i){var r,o,a,s;if(e){var c=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,l=n.getDate();r=1+Math.floor((l+c)/7)}else{var u=(a=n.getFullYear(),s=new Date(a,0,1).getDay(),new Date(a,0,1+(s<=4?4:11)-s)),d=(o=n,new Date(o.getFullYear(),o.getMonth(),o.getDate()+(4-o.getDay()))).getTime()-u.getTime();r=1+Math.round(d/6048e5)}return ht(r,t,W(i,k.MinusSign))}}!function(t){t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended"}(ot||(ot={})),function(t){t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day"}(at||(at={})),function(t){t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras"}(st||(st={}));var yt={};function bt(t,e){t=t.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function wt(t){return t instanceof Date&&!isNaN(t.valueOf())} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var St=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function xt(t,e,n,i,r,o,a){void 0===a&&(a=!1);var s="",c=!1;if(isFinite(t)){var l=function(t){var e,n,i,r,o,a=Math.abs(t)+"",s=0;for((n=a.indexOf("."))>-1&&(a=a.replace(".","")),(i=a.search(/e/i))>0?(n<0&&(n=i),n+=+a.slice(i+1),a=a.substring(0,i)):n<0&&(n=a.length),i=0;"0"===a.charAt(i);i++);if(i===(o=a.length))e=[0],n=1;else{for(o--;"0"===a.charAt(o);)o--;for(n-=i,e=[],r=0;i<=o;i++,r++)e[r]=Number(a.charAt(i))}return n>22&&(e=e.splice(0,21),s=n-1,n=1),{digits:e,exponent:s,integerLen:n}}(t);a&&(l=function(t){if(0===t.digits[0])return t;var e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(l));var u=e.minInt,d=e.minFrac,p=e.maxFrac;if(o){var h=o.match(St);if(null===h)throw new Error(o+" is not a valid digit info");var f=h[1],g=h[3],m=h[5];null!=f&&(u=Tt(f)),null!=g&&(d=Tt(g)),null!=m?p=Tt(m):null!=g&&d>p&&(p=d)}!function(t,e,n){if(e>n)throw new Error("The minimum number of digits after fraction ("+e+") is higher than the maximum ("+n+").");var i=t.digits,r=i.length-t.integerLen,o=Math.min(Math.max(e,r),n),a=o+t.integerLen,s=i[a];if(a>0){i.splice(Math.max(t.integerLen,a));for(var c=a;c=5)if(a-1<0){for(var u=0;u>a;u--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[a-1]++;for(;r=p?i.pop():d=!1),e>=10?1:0},0);h&&(i.unshift(h),t.integerLen++)}(l,d,p);var v=l.digits,y=l.integerLen,b=l.exponent,w=[];for(c=v.every(function(t){return!t});y0?w=v.splice(y,v.length):(w=v,v=[0]);var S=[];for(v.length>=e.lgSize&&S.unshift(v.splice(-e.lgSize,v.length).join(""));v.length>e.gSize;)S.unshift(v.splice(-e.gSize,v.length).join(""));v.length&&S.unshift(v.join("")),s=S.join(W(n,i)),w.length&&(s+=W(n,r)+w.join("")),b&&(s+=W(n,k.Exponential)+"+"+b)}else s=W(n,k.Infinity);return t<0&&!c?e.negPre+s+e.negSuf:e.posPre+s+e.posSuf}function Mt(t,e,n,i,r){var o=At(q(e,T.Currency),W(e,k.MinusSign));return o.minFrac=rt(i),o.maxFrac=o.minFrac,xt(t,o,e,k.CurrencyGroup,k.CurrencyDecimal,r).replace("¤",n).replace("¤","").trim()}function Et(t,e,n){return xt(t,At(q(e,T.Percent),W(e,k.MinusSign)),e,k.Group,k.Decimal,n,!0).replace(new RegExp("%","g"),W(e,k.PercentSign))}function Ct(t,e,n){return xt(t,At(q(e,T.Decimal),W(e,k.MinusSign)),e,k.Group,k.Decimal,n)}function At(t,e){void 0===e&&(e="-");var n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(";"),r=i[0],o=i[1],a=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],s=a[0],c=a[1]||"";n.posPre=s.substr(0,s.indexOf("#"));for(var l=0;l-1)return r;if(r=n.getPluralCategory(t,i),e.indexOf(r)>-1)return r;if(e.indexOf("other")>-1)return"other";throw new Error('No plural message found for value "'+t+'"')}var Pt=function(t){function e(e){var n=t.call(this)||this;return n.locale=e,n}return Object(i.c)(e,t),e.prototype.getPluralCategory=function(t,e){switch(Z(e||this.locale)(t)){case O.Zero:return"zero";case O.One:return"one";case O.Two:return"two";case O.Few:return"few";case O.Many:return"many";default:return"other"}},(e=Object(i.b)([Object(i.e)(0,Object(r.Inject)(r.LOCALE_ID)),Object(i.d)("design:paramtypes",[String])],e)).ɵfac=function(t){return new(t||e)(r["ɵɵinject"](r.LOCALE_ID))},e.ɵprov=r["ɵɵdefineInjectable"]({token:e,factory:function(t){return e.ɵfac(t)}}),e}(Ot); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function It(t,e,n){return Object(r["ɵregisterLocaleData"])(t,e,n)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function kt(t,e){var n,r;e=encodeURIComponent(e);try{for(var o=Object(i.j)(t.split(";")),a=o.next();!a.done;a=o.next()){var s=a.value,c=s.indexOf("="),l=Object(i.f)(-1==c?[s,""]:[s.slice(0,c),s.slice(c+1)],2),u=l[0],d=l[1];if(u.trim()===e)return decodeURIComponent(d)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null}var Dt=function(){function t(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return Object.defineProperty(t.prototype,"klass",{set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClass",{set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Object(r["ɵisListLikeIterable"])(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}},t.prototype._applyKeyValueChanges=function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(r["ɵstringify"])(t.item));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})},t.prototype._applyClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!0)}):Object.keys(t).forEach(function(n){return e._toggleClass(n,!!t[n])}))},t.prototype._removeClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return e._toggleClass(t,!1)}))},t.prototype._toggleClass=function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})},Object(i.b)([Object(r.Input)("class"),Object(i.d)("design:type",String),Object(i.d)("design:paramtypes",[String])],t.prototype,"klass",null),Object(i.b)([Object(r.Input)("ngClass"),Object(i.d)("design:type",Object),Object(i.d)("design:paramtypes",[Object])],t.prototype,"ngClass",null),(t=Object(i.b)([Object(i.d)("design:paramtypes",[r.IterableDiffers,r.KeyValueDiffers,r.ElementRef,r.Renderer2])],t)).ɵfac=function(e){return new(e||t)(r["ɵɵdirectiveInject"](r.IterableDiffers),r["ɵɵdirectiveInject"](r.KeyValueDiffers),r["ɵɵdirectiveInject"](r.ElementRef),r["ɵɵdirectiveInject"](r.Renderer2))},t.ɵdir=r["ɵɵdefineDirective"]({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t}(),Rt=function(){function t(t){this._viewContainerRef=t,this._componentRef=null,this._moduleRef=null}return t.prototype.ngOnChanges=function(t){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){var e=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(t.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){var n=e.get(r.NgModuleRef);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(n.injector)}else this._moduleRef=null;var i=(this._moduleRef?this._moduleRef.componentFactoryResolver:e.get(r.ComponentFactoryResolver)).resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(i,this._viewContainerRef.length,e,this.ngComponentOutletContent)}},t.prototype.ngOnDestroy=function(){this._moduleRef&&this._moduleRef.destroy()},Object(i.b)([Object(r.Input)(),Object(i.d)("design:type",r.Type)],t.prototype,"ngComponentOutlet",void 0),Object(i.b)([Object(r.Input)(),Object(i.d)("design:type",r.Injector)],t.prototype,"ngComponentOutletInjector",void 0),Object(i.b)([Object(r.Input)(),Object(i.d)("design:type",Array)],t.prototype,"ngComponentOutletContent",void 0),Object(i.b)([Object(r.Input)(),Object(i.d)("design:type",r.NgModuleFactory)],t.prototype,"ngComponentOutletNgModuleFactory",void 0),(t=Object(i.b)([Object(i.d)("design:paramtypes",[r.ViewContainerRef])],t)).ɵfac=function(e){return new(e||t)(r["ɵɵdirectiveInject"](r.ViewContainerRef))},t.ɵdir=r["ɵɵdefineDirective"]({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},features:[r["ɵɵNgOnChangesFeature"]]}),t}(),Lt=function(){function t(t,e,n,i){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=i}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),Nt=function(){function t(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return Object.defineProperty(t.prototype,"ngForOf",{set:function(t){this._ngForOf=t,this._ngForOfDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){Object(r.isDevMode)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/api/common/NgForOf#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(n){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((e=t).name||typeof e)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var e; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachOperation(function(t,i,r){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new Lt(null,e._ngForOf,-1,-1),null===r?void 0:r),a=new jt(t,o);n.push(a)}else null==r?e._viewContainer.remove(null===i?void 0:i):null!==i&&(o=e._viewContainer.get(i),e._viewContainer.move(o,r),a=new jt(t,o),n.push(a))});for(var i=0;i0?1:+t}),"name"in Function.prototype==0&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n>8&255]+Hn[t>>16&255]+Hn[t>>24&255]+"-"+Hn[255&e]+Hn[e>>8&255]+"-"+Hn[e>>16&15|64]+Hn[e>>24&255]+"-"+Hn[63&n|128]+Hn[n>>8&255]+"-"+Hn[n>>16&255]+Hn[n>>24&255]+Hn[255&i]+Hn[i>>8&255]+Hn[i>>16&255]+Hn[i>>24&255]).toUpperCase()},clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Kn.DEG2RAD},radToDeg:function(t){return t*Kn.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,e,n,i,r){var o=Math.cos,a=Math.sin,s=o(n/2),c=a(n/2),l=o((e+i)/2),u=a((e+i)/2),d=o((e-i)/2),p=a((e-i)/2),h=o((i-e)/2),f=a((i-e)/2);"XYX"===r?t.set(s*u,c*d,c*p,s*l):"YZY"===r?t.set(c*p,s*u,c*d,s*l):"ZXZ"===r?t.set(c*d,c*p,s*u,s*l):"XZX"===r?t.set(s*u,c*f,c*h,s*l):"YXY"===r?t.set(c*h,s*u,c*f,s*l):"ZYZ"===r?t.set(c*f,c*h,s*u,s*l):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function Xn(t,e){this.x=t||0,this.y=e||0}function Yn(){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.")}Object.defineProperties(Xn.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(Xn.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this},clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){return Math.atan2(-this.y,-this.x)+Math.PI},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}}),Object.assign(Yn.prototype,{isMatrix3:!0,set:function(t,e,n,i,r,o,a,s,c){var l=this.elements;return l[0]=t,l[1]=i,l[2]=a,l[3]=e,l[4]=r,l[5]=s,l[6]=n,l[7]=o,l[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},extractBasis:function(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,i=e.elements,r=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],p=n[5],h=n[8],f=i[0],g=i[3],m=i[6],v=i[1],y=i[4],b=i[7],w=i[2],S=i[5],x=i[8];return r[0]=o*f+a*v+s*w,r[3]=o*g+a*y+s*S,r[6]=o*m+a*b+s*x,r[1]=c*f+l*v+u*w,r[4]=c*g+l*y+u*S,r[7]=c*m+l*b+u*x,r[2]=d*f+p*v+h*w,r[5]=d*g+p*y+h*S,r[8]=d*m+p*b+h*x,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],c=t[7],l=t[8];return e*o*l-e*a*c-n*r*l+n*a*s+i*r*c-i*o*s},getInverse:function(t,e){void 0!==e&&console.warn("THREE.Matrix3: .getInverse() can no longer be configured to throw on degenerate.");var n=t.elements,i=this.elements,r=n[0],o=n[1],a=n[2],s=n[3],c=n[4],l=n[5],u=n[6],d=n[7],p=n[8],h=p*c-l*d,f=l*u-p*s,g=d*s-c*u,m=r*h+o*f+a*g;if(0===m)return this.set(0,0,0,0,0,0,0,0,0);var v=1/m;return i[0]=h*v,i[1]=(a*d-p*o)*v,i[2]=(l*o-a*c)*v,i[3]=f*v,i[4]=(p*r-a*u)*v,i[5]=(a*s-l*r)*v,i[6]=g*v,i[7]=(o*u-d*r)*v,i[8]=(c*r-o*s)*v,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,n,i,r,o,a){var s=Math.cos(r),c=Math.sin(r);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-i*c,i*s,-i*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=this.elements,r=i[0],o=i[3],a=i[6],s=i[1],c=i[4],l=i[7];return i[0]=e*r+n*s,i[3]=e*o+n*c,i[6]=e*a+n*l,i[1]=-n*r+e*s,i[4]=-n*o+e*c,i[7]=-n*a+e*l,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Zn={getDataURL:function(t){var e;if("undefined"==typeof HTMLCanvasElement)return t.src;if(t instanceof HTMLCanvasElement)e=t;else{void 0===qn&&(qn=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),qn.width=t.width,qn.height=t.height;var n=qn.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=qn}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},Jn=0;function Qn(t,e,n,i,r,o,a,s,c,l){Object.defineProperty(this,"id",{value:Jn++}),this.uuid=Kn.generateUUID(),this.name="",this.image=void 0!==t?t:Qn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:Qn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==i?i:Mt,this.magFilter=void 0!==r?r:Pt,this.minFilter=void 0!==o?o:Dt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:Yt,this.internalFormat=null,this.type=void 0!==s?s:Lt,this.offset=new Xn(0,0),this.repeat=new Xn(1,1),this.center=new Xn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Yn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:an,this.version=0,this.onUpdate=null}function $n(t,e,n,i){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==i?i:1}function ti(t,e,n){this.width=t,this.height=e,this.scissor=new $n(0,0,t,e),this.scissorTest=!1,this.viewport=new $n(0,0,t,e),n=n||{},this.texture=new Qn(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=t,this.texture.image.height=e,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:Pt,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}function ei(t,e,n){ti.call(this,t,e,n),this.samples=4}function ni(t,e,n,i){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==i?i:1}Qn.DEFAULT_IMAGE=void 0,Qn.DEFAULT_MAPPING=ft,Qn.prototype=Object.assign(Object.create(Gn.prototype),{constructor:Qn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,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};if(void 0!==this.image){var i=this.image;if(void 0===i.uuid&&(i.uuid=Kn.generateUUID()),!e&&void 0===t.images[i.uuid]){var r;if(Array.isArray(i)){r=[];for(var o=0,a=i.length;o1)switch(this.wrapS){case xt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case Et:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case xt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case Et:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(Qn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.defineProperties($n.prototype,{width:{get:function(){return this.z},set:function(t){this.z=t}},height:{get:function(){return this.w},set:function(t){this.w=t}}}),Object.assign($n.prototype,{isVector4:!0,set:function(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){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: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,i,r,o=t.elements,a=o[0],s=o[4],c=o[8],l=o[1],u=o[5],d=o[9],p=o[2],h=o[6],f=o[10];if(Math.abs(s-l)<.01&&Math.abs(c-p)<.01&&Math.abs(d-h)<.01){if(Math.abs(s+l)<.1&&Math.abs(c+p)<.1&&Math.abs(d+h)<.1&&Math.abs(a+u+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var g=(a+1)/2,m=(u+1)/2,v=(f+1)/2,y=(s+l)/4,b=(c+p)/4,w=(d+h)/4;return g>m&&g>v?g<.01?(n=0,i=.707106781,r=.707106781):(i=y/(n=Math.sqrt(g)),r=b/n):m>v?m<.01?(n=.707106781,i=0,r=.707106781):(n=y/(i=Math.sqrt(m)),r=w/i):v<.01?(n=.707106781,i=.707106781,r=0):(n=b/(r=Math.sqrt(v)),i=w/r),this.set(n,i,r,e),this}var S=Math.sqrt((h-d)*(h-d)+(c-p)*(c-p)+(l-s)*(l-s));return Math.abs(S)<.001&&(S=1),this.x=(h-d)/S,this.y=(c-p)/S,this.z=(l-s)/S,this.w=Math.acos((a+u+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this},clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){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:function(){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:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),ti.prototype=Object.assign(Object.create(Gn.prototype),{constructor:ti,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.texture.image.width=t,this.texture.image.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),ei.prototype=Object.assign(Object.create(ti.prototype),{constructor:ei,isWebGLMultisampleRenderTarget:!0,copy:function(t){return ti.prototype.copy.call(this,t),this.samples=t.samples,this}}),Object.assign(ni,{slerp:function(t,e,n,i){return n.copy(t).slerp(e,i)},slerpFlat:function(t,e,n,i,r,o,a){var s=n[i+0],c=n[i+1],l=n[i+2],u=n[i+3],d=r[o+0],p=r[o+1],h=r[o+2],f=r[o+3];if(u!==f||s!==d||c!==p||l!==h){var g=1-a,m=s*d+c*p+l*h+u*f,v=m>=0?1:-1,y=1-m*m;if(y>Number.EPSILON){var b=Math.sqrt(y),w=Math.atan2(b,m*v);g=Math.sin(g*w)/b,a=Math.sin(a*w)/b}var S=a*v;if(s=s*g+d*S,c=c*g+p*S,l=l*g+h*S,u=u*g+f*S,g===1-a){var x=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=x,c*=x,l*=x,u*=x}}t[e]=s,t[e+1]=c,t[e+2]=l,t[e+3]=u}}),Object.defineProperties(ni.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this._onChangeCallback()}}}),Object.assign(ni.prototype,{isQuaternion:!0,set:function(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,i=t._y,r=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),l=a(i/2),u=a(r/2),d=s(n/2),p=s(i/2),h=s(r/2);return"XYZ"===o?(this._x=d*l*u+c*p*h,this._y=c*p*u-d*l*h,this._z=c*l*h+d*p*u,this._w=c*l*u-d*p*h):"YXZ"===o?(this._x=d*l*u+c*p*h,this._y=c*p*u-d*l*h,this._z=c*l*h-d*p*u,this._w=c*l*u+d*p*h):"ZXY"===o?(this._x=d*l*u-c*p*h,this._y=c*p*u+d*l*h,this._z=c*l*h+d*p*u,this._w=c*l*u-d*p*h):"ZYX"===o?(this._x=d*l*u-c*p*h,this._y=c*p*u+d*l*h,this._z=c*l*h-d*p*u,this._w=c*l*u+d*p*h):"YZX"===o?(this._x=d*l*u+c*p*h,this._y=c*p*u+d*l*h,this._z=c*l*h-d*p*u,this._w=c*l*u-d*p*h):"XZY"===o&&(this._x=d*l*u-c*p*h,this._y=c*p*u-d*l*h,this._z=c*l*h+d*p*u,this._w=c*l*u+d*p*h),!1!==e&&this._onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,i=n[0],r=n[4],o=n[8],a=n[1],s=n[5],c=n[9],l=n[2],u=n[6],d=n[10],p=i+s+d;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(u-c)*e,this._y=(o-l)*e,this._z=(a-r)*e):i>s&&i>d?(e=2*Math.sqrt(1+i-s-d),this._w=(u-c)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(o+l)/e):s>d?(e=2*Math.sqrt(1+s-i-d),this._w=(o-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(c+u)/e):(e=2*Math.sqrt(1+d-i-s),this._w=(a-r)/e,this._x=(o+l)/e,this._y=(c+u)/e,this._z=.25*e),this._onChangeCallback(),this},setFromUnitVectors:function(t,e){var n=t.dot(e)+1;return n<1e-6?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()},angleTo:function(t){return 2*Math.acos(Math.abs(Kn.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var n=this.angleTo(t);if(0===n)return this;var i=Math.min(1,e/n);return this.slerp(t,i),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,i=t._y,r=t._z,o=t._w,a=e._x,s=e._y,c=e._z,l=e._w;return this._x=n*l+o*a+i*c-r*s,this._y=i*l+o*s+r*a-n*c,this._z=r*l+o*c+n*s-i*a,this._w=o*l-n*a-i*s-r*c,this._onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,i=this._y,r=this._z,o=this._w,a=o*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;var s=1-a*a;if(s<=Number.EPSILON){var c=1-e;return this._w=c*o+e*this._w,this._x=c*n+e*this._x,this._y=c*i+e*this._y,this._z=c*r+e*this._z,this.normalize(),this._onChangeCallback(),this}var l=Math.sqrt(s),u=Math.atan2(l,a),d=Math.sin((1-e)*u)/l,p=Math.sin(e*u)/l;return this._w=o*d+this._w*p,this._x=n*d+this._x*p,this._y=i*d+this._y*p,this._z=r*d+this._z*p,this._onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},fromBufferAttribute:function(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this},_onChange:function(t){return this._onChangeCallback=t,this},_onChangeCallback:function(){}});var ii=new oi,ri=new ni;function oi(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}Object.assign(oi.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(ri.setFromEuler(t))},applyAxisAngle:function(t,e){return this.applyQuaternion(ri.setFromAxisAngle(t,e))},applyMatrix3:function(t){var e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this},applyNormalMatrix:function(t){return this.applyMatrix3(t).normalize()},applyMatrix4:function(t){var e=this.x,n=this.y,i=this.z,r=t.elements,o=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*i-a*n,l=s*n+a*e-r*i,u=s*i+r*n-o*e,d=-r*e-o*n-a*i;return this.x=c*s+d*-r+l*-a-u*-o,this.y=l*s+d*-o+u*-r-c*-a,this.z=u*s+d*-a+c*-o-l*-r,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)},transformDirection:function(t){var e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this},clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,o=e.x,a=e.y,s=e.z;return this.x=i*s-r*a,this.y=r*o-n*s,this.z=n*a-i*o,this},projectOnVector:function(t){var e=t.lengthSq();if(0===e)return this.set(0,0,0);var n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)},projectOnPlane:function(t){return ii.copy(this).projectOnVector(t),this.sub(ii)},reflect:function(t){return this.sub(ii.copy(t).multiplyScalar(2*this.dot(t)))},angleTo:function(t){var e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;var n=this.dot(t)/e;return Math.acos(Kn.clamp(n,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)},setFromSphericalCoords:function(t,e,n){var i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},setFromMatrix3Column:function(t,e){return this.fromArray(t.elements,3*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}});var ai=new oi,si=new hi,ci=new oi(0,0,0),li=new oi(1,1,1),ui=new oi,di=new oi,pi=new oi;function hi(){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.")}Object.assign(hi.prototype,{isMatrix4:!0,set:function(t,e,n,i,r,o,a,s,c,l,u,d,p,h,f,g){var m=this.elements;return m[0]=t,m[4]=e,m[8]=n,m[12]=i,m[1]=r,m[5]=o,m[9]=a,m[13]=s,m[2]=c,m[6]=l,m[10]=u,m[14]=d,m[3]=p,m[7]=h,m[11]=f,m[15]=g,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new hi).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:function(t){var e=this.elements,n=t.elements,i=1/ai.setFromMatrixColumn(t,0).length(),r=1/ai.setFromMatrixColumn(t,1).length(),o=1/ai.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,i=t.y,r=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(i),c=Math.sin(i),l=Math.cos(r),u=Math.sin(r);if("XYZ"===t.order){var d=o*l,p=o*u,h=a*l,f=a*u;e[0]=s*l,e[4]=-s*u,e[8]=c,e[1]=p+h*c,e[5]=d-f*c,e[9]=-a*s,e[2]=f-d*c,e[6]=h+p*c,e[10]=o*s}else if("YXZ"===t.order){var g=s*l,m=s*u,v=c*l,y=c*u;e[0]=g+y*a,e[4]=v*a-m,e[8]=o*c,e[1]=o*u,e[5]=o*l,e[9]=-a,e[2]=m*a-v,e[6]=y+g*a,e[10]=o*s}else if("ZXY"===t.order)g=s*l,m=s*u,v=c*l,y=c*u,e[0]=g-y*a,e[4]=-o*u,e[8]=v+m*a,e[1]=m+v*a,e[5]=o*l,e[9]=y-g*a,e[2]=-o*c,e[6]=a,e[10]=o*s;else if("ZYX"===t.order)d=o*l,p=o*u,h=a*l,f=a*u,e[0]=s*l,e[4]=h*c-p,e[8]=d*c+f,e[1]=s*u,e[5]=f*c+d,e[9]=p*c-h,e[2]=-c,e[6]=a*s,e[10]=o*s;else if("YZX"===t.order){var b=o*s,w=o*c,S=a*s,x=a*c;e[0]=s*l,e[4]=x-b*u,e[8]=S*u+w,e[1]=u,e[5]=o*l,e[9]=-a*l,e[2]=-c*l,e[6]=w*u+S,e[10]=b-x*u}else"XZY"===t.order&&(b=o*s,w=o*c,S=a*s,x=a*c,e[0]=s*l,e[4]=-u,e[8]=c*l,e[1]=b*u+x,e[5]=o*l,e[9]=w*u-S,e[2]=S*u-w,e[6]=a*l,e[10]=x*u+b);return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){return this.compose(ci,t,li)},lookAt:function(t,e,n){var i=this.elements;return pi.subVectors(t,e),0===pi.lengthSq()&&(pi.z=1),pi.normalize(),ui.crossVectors(n,pi),0===ui.lengthSq()&&(1===Math.abs(n.z)?pi.x+=1e-4:pi.z+=1e-4,pi.normalize(),ui.crossVectors(n,pi)),ui.normalize(),di.crossVectors(pi,ui),i[0]=ui.x,i[4]=di.x,i[8]=pi.x,i[1]=ui.y,i[5]=di.y,i[9]=pi.y,i[2]=ui.z,i[6]=di.z,i[10]=pi.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,i=e.elements,r=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],l=n[1],u=n[5],d=n[9],p=n[13],h=n[2],f=n[6],g=n[10],m=n[14],v=n[3],y=n[7],b=n[11],w=n[15],S=i[0],x=i[4],M=i[8],E=i[12],C=i[1],A=i[5],T=i[9],O=i[13],_=i[2],P=i[6],I=i[10],k=i[14],D=i[3],R=i[7],L=i[11],N=i[15];return r[0]=o*S+a*C+s*_+c*D,r[4]=o*x+a*A+s*P+c*R,r[8]=o*M+a*T+s*I+c*L,r[12]=o*E+a*O+s*k+c*N,r[1]=l*S+u*C+d*_+p*D,r[5]=l*x+u*A+d*P+p*R,r[9]=l*M+u*T+d*I+p*L,r[13]=l*E+u*O+d*k+p*N,r[2]=h*S+f*C+g*_+m*D,r[6]=h*x+f*A+g*P+m*R,r[10]=h*M+f*T+g*I+m*L,r[14]=h*E+f*O+g*k+m*N,r[3]=v*S+y*C+b*_+w*D,r[7]=v*x+y*A+b*P+w*R,r[11]=v*M+y*T+b*I+w*L,r[15]=v*E+y*O+b*k+w*N,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],o=t[1],a=t[5],s=t[9],c=t[13],l=t[2],u=t[6],d=t[10],p=t[14];return t[3]*(+r*s*u-i*c*u-r*a*d+n*c*d+i*a*p-n*s*p)+t[7]*(+e*s*p-e*c*d+r*o*d-i*o*p+i*c*l-r*s*l)+t[11]*(+e*c*u-e*a*p-r*o*u+n*o*p+r*a*l-n*c*l)+t[15]*(-i*a*l-e*s*u+e*a*d+i*o*u-n*o*d+n*s*l)},transpose:function(){var t,e=this.elements;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:function(t,e,n){var i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this},getInverse:function(t,e){void 0!==e&&console.warn("THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.");var n=this.elements,i=t.elements,r=i[0],o=i[1],a=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7],p=i[8],h=i[9],f=i[10],g=i[11],m=i[12],v=i[13],y=i[14],b=i[15],w=h*y*d-v*f*d+v*u*g-l*y*g-h*u*b+l*f*b,S=m*f*d-p*y*d-m*u*g+c*y*g+p*u*b-c*f*b,x=p*v*d-m*h*d+m*l*g-c*v*g-p*l*b+c*h*b,M=m*h*u-p*v*u-m*l*f+c*v*f+p*l*y-c*h*y,E=r*w+o*S+a*x+s*M;if(0===E)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var C=1/E;return n[0]=w*C,n[1]=(v*f*s-h*y*s-v*a*g+o*y*g+h*a*b-o*f*b)*C,n[2]=(l*y*s-v*u*s+v*a*d-o*y*d-l*a*b+o*u*b)*C,n[3]=(h*u*s-l*f*s-h*a*d+o*f*d+l*a*g-o*u*g)*C,n[4]=S*C,n[5]=(p*y*s-m*f*s+m*a*g-r*y*g-p*a*b+r*f*b)*C,n[6]=(m*u*s-c*y*s-m*a*d+r*y*d+c*a*b-r*u*b)*C,n[7]=(c*f*s-p*u*s+p*a*d-r*f*d-c*a*g+r*u*g)*C,n[8]=x*C,n[9]=(m*h*s-p*v*s-m*o*g+r*v*g+p*o*b-r*h*b)*C,n[10]=(c*v*s-m*l*s+m*o*d-r*v*d-c*o*b+r*l*b)*C,n[11]=(p*l*s-c*h*s-p*o*d+r*h*d+c*o*g-r*l*g)*C,n[12]=M*C,n[13]=(p*v*a-m*h*a+m*o*f-r*v*f-p*o*y+r*h*y)*C,n[14]=(m*l*a-c*v*a-m*o*u+r*v*u+c*o*y-r*l*y)*C,n[15]=(c*h*a-p*l*a+p*o*u-r*h*u-c*o*f+r*l*f)*C,this},scale:function(t){var e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=1-n,o=t.x,a=t.y,s=t.z,c=r*o,l=r*a;return this.set(c*o+n,c*a-i*s,c*s+i*a,0,c*a+i*s,l*a+n,l*s-i*o,0,c*s-i*a,l*s+i*o,r*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){var i=this.elements,r=e._x,o=e._y,a=e._z,s=e._w,c=r+r,l=o+o,u=a+a,d=r*c,p=r*l,h=r*u,f=o*l,g=o*u,m=a*u,v=s*c,y=s*l,b=s*u,w=n.x,S=n.y,x=n.z;return i[0]=(1-(f+m))*w,i[1]=(p+b)*w,i[2]=(h-y)*w,i[3]=0,i[4]=(p-b)*S,i[5]=(1-(d+m))*S,i[6]=(g+v)*S,i[7]=0,i[8]=(h+y)*x,i[9]=(g-v)*x,i[10]=(1-(d+f))*x,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this},decompose:function(t,e,n){var i=this.elements,r=ai.set(i[0],i[1],i[2]).length(),o=ai.set(i[4],i[5],i[6]).length(),a=ai.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],si.copy(this);var s=1/r,c=1/o,l=1/a;return si.elements[0]*=s,si.elements[1]*=s,si.elements[2]*=s,si.elements[4]*=c,si.elements[5]*=c,si.elements[6]*=c,si.elements[8]*=l,si.elements[9]*=l,si.elements[10]*=l,e.setFromRotationMatrix(si),n.x=r,n.y=o,n.z=a,this},makePerspective:function(t,e,n,i,r,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*r/(e-t),c=2*r/(n-i),l=(e+t)/(e-t),u=(n+i)/(n-i),d=-(o+r)/(o-r),p=-2*o*r/(o-r);return a[0]=s,a[4]=0,a[8]=l,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,i,r,o){var a=this.elements,s=1/(e-t),c=1/(n-i),l=1/(o-r),u=(e+t)*s,d=(n+i)*c,p=(o+r)*l;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=-2*l,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}});var fi=new hi,gi=new ni;function mi(t,e,n,i){this._x=t||0,this._y=e||0,this._z=n||0,this._order=i||mi.DefaultOrder}function vi(){this.mask=1}mi.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],mi.DefaultOrder="XYZ",Object.defineProperties(mi.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this._onChangeCallback()}}}),Object.assign(mi.prototype,{isEuler:!0,set:function(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._order=i||this._order,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this},setFromRotationMatrix:function(t,e,n){var i=Kn.clamp,r=t.elements,o=r[0],a=r[4],s=r[8],c=r[1],l=r[5],u=r[9],d=r[2],p=r[6],h=r[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(i(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,l),this._z=0)):"YXZ"===e?(this._x=Math.asin(-i(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,h),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-d,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(i(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,h),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-i(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,h),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,l))):"YZX"===e?(this._z=Math.asin(i(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(s,h))):"XZY"===e?(this._z=Math.asin(-i(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(p,l),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,h),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this._onChangeCallback(),this},setFromQuaternion:function(t,e,n){return fi.makeRotationFromQuaternion(t),this.setFromRotationMatrix(fi,e,n)},setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(t){return gi.setFromEuler(this),this.setFromQuaternion(gi,t)},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new oi(this._x,this._y,this._z)},_onChange:function(t){return this._onChangeCallback=t,this},_onChangeCallback:function(){}}),Object.assign(vi.prototype,{set:function(t){this.mask=1<1){for(var e=0;e1){for(var e=0;e0)for(i.children=[],s=0;s0&&(n.geometries=d),p.length>0&&(n.materials=p),h.length>0&&(n.textures=h),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=i,n;function g(t){var e=[];for(var n in t){var i=t[n];delete i.metadata,e.push(i)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;ns)return!1}return!0}Object.assign(qi.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,i=1/0,r=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;sr&&(r=l),u>o&&(o=u),d>a&&(a=d)}return this.min.set(e,n,i),this.max.set(r,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,i=1/0,r=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;sr&&(r=l),u>o&&(o=u),d>a&&(a=d)}return this.min.set(e,n,i),this.max.set(r,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new oi),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)},intersectsSphere:function(t){return this.clampPoint(t.center,Ri),Ri.distanceToSquared(t.center)<=t.radius*t.radius},intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant},intersectsTriangle:function(t){if(this.isEmpty())return!1;this.getCenter(zi),Gi.subVectors(this.max,zi),Ni.subVectors(t.a,zi),ji.subVectors(t.b,zi),Vi.subVectors(t.c,zi),Fi.subVectors(ji,Ni),Ui.subVectors(Vi,ji),Bi.subVectors(Ni,Vi);var e=[0,-Fi.z,Fi.y,0,-Ui.z,Ui.y,0,-Bi.z,Bi.y,Fi.z,0,-Fi.x,Ui.z,0,-Ui.x,Bi.z,0,-Bi.x,-Fi.y,Fi.x,0,-Ui.y,Ui.x,0,-Bi.y,Bi.x,0];return!!Ki(e,Ni,ji,Vi,Gi)&&!!Ki(e=[1,0,0,0,1,0,0,0,1],Ni,ji,Vi,Gi)&&(Hi.crossVectors(Fi,Ui),Ki(e=[Hi.x,Hi.y,Hi.z],Ni,ji,Vi,Gi))},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new oi),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(t){return Ri.copy(t).clamp(this.min,this.max).sub(t).length()},getBoundingSphere:function(t){return void 0===t&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(t.center),t.radius=.5*this.getSize(Ri).length(),t},intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(t){return this.isEmpty()||(Di[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Di[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Di[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Di[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Di[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Di[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Di[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Di[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Di)),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}});var Xi=new qi;function Yi(t,e){this.center=void 0!==t?t:new oi,this.radius=void 0!==e?e:0}Object.assign(Yi.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(t,e){var n=this.center;void 0!==e?n.copy(e):Xi.setFromPoints(t).getCenter(n);for(var i=0,r=0,o=t.length;rthis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new qi),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}});var Zi=new oi,Ji=new oi,Qi=new oi,$i=new oi,tr=new oi,er=new oi,nr=new oi;function ir(t,e){this.origin=void 0!==t?t:new oi,this.direction=void 0!==e?e:new oi(0,0,-1)}Object.assign(ir.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new oi),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(t){return this.origin.copy(this.at(t,Zi)),this},closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new oi),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(t){var e=Zi.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Zi.copy(this.direction).multiplyScalar(e).add(this.origin),Zi.distanceToSquared(t))},distanceSqToSegment:function(t,e,n,i){Ji.copy(t).add(e).multiplyScalar(.5),Qi.copy(e).sub(t).normalize(),$i.copy(this.origin).sub(Ji);var r,o,a,s,c=.5*t.distanceTo(e),l=-this.direction.dot(Qi),u=$i.dot(this.direction),d=-$i.dot(Qi),p=$i.lengthSq(),h=Math.abs(1-l*l);if(h>0)if(o=l*u-d,s=c*h,(r=l*d-u)>=0)if(o>=-s)if(o<=s){var f=1/h;a=(r*=f)*(r+l*(o*=f)+2*u)+o*(l*r+o+2*d)+p}else o=c,a=-(r=Math.max(0,-(l*o+u)))*r+o*(o+2*d)+p;else o=-c,a=-(r=Math.max(0,-(l*o+u)))*r+o*(o+2*d)+p;else o<=-s?a=-(r=Math.max(0,-(-l*c+u)))*r+(o=r>0?-c:Math.min(Math.max(-c,-d),c))*(o+2*d)+p:o<=s?(r=0,a=(o=Math.min(Math.max(-c,-d),c))*(o+2*d)+p):a=-(r=Math.max(0,-(l*c+u)))*r+(o=r>0?c:Math.min(Math.max(-c,-d),c))*(o+2*d)+p;else o=l>0?-c:c,a=-(r=Math.max(0,-(l*o+u)))*r+o*(o+2*d)+p;return n&&n.copy(this.direction).multiplyScalar(r).add(this.origin),i&&i.copy(Qi).multiplyScalar(o).add(Ji),a},intersectSphere:function(t,e){Zi.subVectors(t.center,this.origin);var n=Zi.dot(this.direction),i=Zi.dot(Zi)-n*n,r=t.radius*t.radius;if(i>r)return null;var o=Math.sqrt(r-i),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,e):this.at(a,e)},intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,i,r,o,a,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(t.min.x-d.x)*c,i=(t.max.x-d.x)*c):(n=(t.max.x-d.x)*c,i=(t.min.x-d.x)*c),l>=0?(r=(t.min.y-d.y)*l,o=(t.max.y-d.y)*l):(r=(t.max.y-d.y)*l,o=(t.min.y-d.y)*l),n>o||r>i?null:((r>n||n!=n)&&(n=r),(o=0?(a=(t.min.z-d.z)*u,s=(t.max.z-d.z)*u):(a=(t.max.z-d.z)*u,s=(t.min.z-d.z)*u),n>s||a>i?null:((a>n||n!=n)&&(n=a),(s=0?n:i,e)))},intersectsBox:function(t){return null!==this.intersectBox(t,Zi)},intersectTriangle:function(t,e,n,i,r){tr.subVectors(e,t),er.subVectors(n,t),nr.crossVectors(tr,er);var o,a=this.direction.dot(nr);if(a>0){if(i)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}$i.subVectors(this.origin,t);var s=o*this.direction.dot(er.crossVectors($i,er));if(s<0)return null;var c=o*this.direction.dot(tr.cross($i));if(c<0)return null;if(s+c>a)return null;var l=-o*$i.dot(nr);return l<0?null:this.at(l/a,r)},applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}});var rr=new oi,or=new oi,ar=new Yn;function sr(t,e){this.normal=void 0!==t?t:new oi(1,0,0),this.constant=void 0!==e?e:0}Object.assign(sr.prototype,{isPlane:!0,set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(t,e,n){var i=rr.subVectors(n,e).cross(or.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new oi),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(t,e){void 0===e&&(console.warn("THREE.Plane: .intersectLine() target is now required"),e=new oi);var n=t.delta(rr),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):void 0;var r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?void 0:e.copy(n).multiplyScalar(r).add(t.start)},intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new oi),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(t,e){var n=e||ar.getNormalMatrix(t),i=this.coplanarPoint(rr).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this},translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}});var cr=new oi,lr=new oi,ur=new oi,dr=new oi,pr=new oi,hr=new oi,fr=new oi,gr=new oi,mr=new oi,vr=new oi;function yr(t,e,n){this.a=void 0!==t?t:new oi,this.b=void 0!==e?e:new oi,this.c=void 0!==n?n:new oi}Object.assign(yr,{getNormal:function(t,e,n,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new oi),i.subVectors(n,e),cr.subVectors(t,e),i.cross(cr);var r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)},getBarycoord:function(t,e,n,i,r){cr.subVectors(i,e),lr.subVectors(n,e),ur.subVectors(t,e);var o=cr.dot(cr),a=cr.dot(lr),s=cr.dot(ur),c=lr.dot(lr),l=lr.dot(ur),u=o*c-a*a;if(void 0===r&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),r=new oi),0===u)return r.set(-2,-1,-1);var d=1/u,p=(c*s-a*l)*d,h=(o*l-a*s)*d;return r.set(1-p-h,h,p)},containsPoint:function(t,e,n,i){return yr.getBarycoord(t,e,n,i,dr),dr.x>=0&&dr.y>=0&&dr.x+dr.y<=1},getUV:function(t,e,n,i,r,o,a,s){return this.getBarycoord(t,e,n,i,dr),s.set(0,0),s.addScaledVector(r,dr.x),s.addScaledVector(o,dr.y),s.addScaledVector(a,dr.z),s},isFrontFacing:function(t,e,n,i){return cr.subVectors(n,e),lr.subVectors(t,e),cr.cross(lr).dot(i)<0}}),Object.assign(yr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){return cr.subVectors(this.c,this.b),lr.subVectors(this.a,this.b),.5*cr.cross(lr).length()},getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new oi),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return yr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new sr),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return yr.getBarycoord(t,this.a,this.b,this.c,e)},getUV:function(t,e,n,i,r){return yr.getUV(t,this.a,this.b,this.c,e,n,i,r)},containsPoint:function(t){return yr.containsPoint(t,this.a,this.b,this.c)},isFrontFacing:function(t){return yr.isFrontFacing(this.a,this.b,this.c,t)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),e=new oi);var n,i,r=this.a,o=this.b,a=this.c;pr.subVectors(o,r),hr.subVectors(a,r),gr.subVectors(t,r);var s=pr.dot(gr),c=hr.dot(gr);if(s<=0&&c<=0)return e.copy(r);mr.subVectors(t,o);var l=pr.dot(mr),u=hr.dot(mr);if(l>=0&&u<=l)return e.copy(o);var d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return n=s/(s-l),e.copy(r).addScaledVector(pr,n);vr.subVectors(t,a);var p=pr.dot(vr),h=hr.dot(vr);if(h>=0&&p<=h)return e.copy(a);var f=p*c-s*h;if(f<=0&&c>=0&&h<=0)return i=c/(c-h),e.copy(r).addScaledVector(hr,i);var g=l*h-p*u;if(g<=0&&u-l>=0&&p-h>=0)return fr.subVectors(a,o),i=(u-l)/(u-l+(p-h)),e.copy(o).addScaledVector(fr,i);var m=1/(g+f+d);return n=f*m,i=d*m,e.copy(r).addScaledVector(pr,n).addScaledVector(hr,i)},equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}});var br={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},wr={h:0,s:0,l:0},Sr={h:0,s:0,l:0};function xr(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}function Mr(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}function Er(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Cr(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}function Ar(t,e,n,i,r,o){this.a=t,this.b=e,this.c=n,this.normal=i&&i.isVector3?i:new oi,this.vertexNormals=Array.isArray(i)?i:[],this.color=r&&r.isColor?r:new xr,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==o?o:0}Object.assign(xr.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(t,e,n){if(t=Kn.euclideanModulo(t,1),e=Kn.clamp(e,0,1),n=Kn.clamp(n,0,1),0===e)this.r=this.g=this.b=n;else{var i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=Mr(r,i,t+1/3),this.g=Mr(r,i,t),this.b=Mr(r,i,t-1/3)}return this},setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var i,r=n[1],o=n[2];switch(r){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(i[1])/360,s=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(a,s,c)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var l=n[1],u=l.length;if(3===u)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this},setColorName:function(t){var e=br[t];return void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(t){return this.r=Er(t.r),this.g=Er(t.g),this.b=Er(t.b),this},copyLinearToSRGB:function(t){return this.r=Cr(t.r),this.g=Cr(t.g),this.b=Cr(t.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,i=this.r,r=this.g,o=this.b,a=Math.max(i,r,o),s=Math.min(i,r,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var l=a-s;switch(n=c<=.5?l/(a+s):l/(2-a-s),a){case i:e=(r-o)/l+(r0&&(n.alphaTest=this.alphaTest),!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.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var r=i(t.textures),o=i(t.images);r.length>0&&(n.textures=r),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;var e=t.clippingPlanes,n=null;if(null!==e){var i=e.length;n=new Array(i);for(var r=0;r!==i;++r)n[r]=e[r].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Or.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),_r.prototype=Object.create(Or.prototype),_r.prototype.constructor=_r,_r.prototype.isMeshBasicMaterial=!0,_r.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this};var Pr=new oi;function Ir(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.usage=Rn,this.updateRange={offset:0,count:-1},this.version=0}function kr(t,e,n){Ir.call(this,new Int8Array(t),e,n)}function Dr(t,e,n){Ir.call(this,new Uint8Array(t),e,n)}function Rr(t,e,n){Ir.call(this,new Uint8ClampedArray(t),e,n)}function Lr(t,e,n){Ir.call(this,new Int16Array(t),e,n)}function Nr(t,e,n){Ir.call(this,new Uint16Array(t),e,n)}function jr(t,e,n){Ir.call(this,new Int32Array(t),e,n)}function Vr(t,e,n){Ir.call(this,new Uint32Array(t),e,n)}function Fr(t,e,n){Ir.call(this,new Float32Array(t),e,n)}function Ur(t,e,n){Ir.call(this,new Float64Array(t),e,n)}function Br(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function zr(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,i=t.length;ne&&(e=t[n]);return e}Object.defineProperty(Ir.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Ir.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(t){return this.usage=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var i=0,r=this.itemSize;i0,a=r[1]&&r[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var l=0;l0){for(u=[],l=0;l0&&0===n.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),l=0;l65535?Vr:Nr)(t,1):this.index=t},getAttribute:function(t){return this.attributes[t]},setAttribute:function(t,e){return this.attributes[t]=e,this},deleteAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix4:function(t){var e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){var i=(new Yn).getNormalMatrix(t);n.applyNormalMatrix(i),n.needsUpdate=!0}var r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(t),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(t){return Hr.makeRotationX(t),this.applyMatrix4(Hr),this},rotateY:function(t){return Hr.makeRotationY(t),this.applyMatrix4(Hr),this},rotateZ:function(t){return Hr.makeRotationZ(t),this.applyMatrix4(Hr),this},translate:function(t,e,n){return Hr.makeTranslation(t,e,n),this.applyMatrix4(Hr),this},scale:function(t,e,n){return Hr.makeScale(t,e,n),this.applyMatrix4(Hr),this},lookAt:function(t){return Wr.lookAt(t),Wr.updateMatrix(),this.applyMatrix4(Wr.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(qr).negate(),this.translate(qr.x,qr.y,qr.z),this},setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Fr(3*e.vertices.length,3),i=new Fr(3*e.colors.length,3);if(this.setAttribute("position",n.copyVector3sArray(e.vertices)),this.setAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var r=new Fr(e.lineDistances.length,1);this.setAttribute("lineDistance",r.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,i=t.length;n0){var n=new Float32Array(3*t.normals.length);this.setAttribute("normal",new Ir(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var i=new Float32Array(3*t.colors.length);this.setAttribute("color",new Ir(i,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var r=new Float32Array(2*t.uvs.length);this.setAttribute("uv",new Ir(r,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.setAttribute("uv2",new Ir(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],l=0,u=c.length;l0){var h=new Fr(4*t.skinIndices.length,4);this.setAttribute("skinIndex",h.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Fr(4*t.skinWeights.length,4);this.setAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new qi);var t=this.attributes.position,e=this.morphAttributes.position;if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(var n=0,i=e.length;n0&&(t.userData=this.userData),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var i=this.index;null!==i&&(t.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});var r=this.attributes;for(var n in r){var o=(p=r[n]).toJSON();""!==p.name&&(o.name=p.name),t.data.attributes[n]=o}var a={},s=!1;for(var n in this.morphAttributes){for(var c=this.morphAttributes[n],l=[],u=0,d=c.length;u0&&(a[n]=l,s=!0)}s&&(t.data.morphAttributes=a,t.data.morphTargetsRelative=this.morphTargetsRelative);var h=this.groups;h.length>0&&(t.data.groups=JSON.parse(JSON.stringify(h)));var f=this.boundingSphere;return null!==f&&(t.data.boundingSphere={center:f.center.toArray(),radius:f.radius}),t},clone:function(){return(new Zr).copy(this)},copy:function(t){var e,n,i;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var r=t.index;null!==r&&this.setIndex(r.clone());var o=t.attributes;for(e in o){var a=o[e];this.setAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],l=s[e];for(n=0,i=l.length;nn.far?null:{distance:c,point:fo.clone(),object:t}}function vo(t,e,n,i,r,o,a,s,c,l,u,d){to.fromBufferAttribute(r,l),eo.fromBufferAttribute(r,u),no.fromBufferAttribute(r,d);var p=t.morphTargetInfluences;if(e.morphTargets&&o&&p){ao.set(0,0,0),so.set(0,0,0),co.set(0,0,0);for(var h=0,f=o.length;h0){var a=r[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(t,e){var n,i=this.geometry,r=this.material,o=this.matrixWorld;if(void 0!==r&&(null===i.boundingSphere&&i.computeBoundingSphere(),$r.copy(i.boundingSphere),$r.applyMatrix4(o),!1!==t.ray.intersectsSphere($r)&&(Jr.getInverse(o),Qr.copy(t.ray).applyMatrix4(Jr),null===i.boundingBox||!1!==Qr.intersectsBox(i.boundingBox))))if(i.isBufferGeometry){var a,s,c,l,u,d,p,h,f,g=i.index,m=i.attributes.position,v=i.morphAttributes.position,y=i.morphTargetsRelative,b=i.attributes.uv,w=i.attributes.uv2,S=i.groups,x=i.drawRange;if(null!==g)if(Array.isArray(r))for(l=0,d=S.length;l0&&(A=P);for(var I=0,k=_.length;I0)for(l=0;l0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,i,r;for(n=0,i=this.faces.length;n=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a0,m=h.vertexNormals.length>0,v=1!==h.color.r||1!==h.color.g||1!==h.color.b,y=h.vertexColors.length>0,b=0;if(b=M(b=M(b=M(b=M(b=M(b=M(b=M(b=M(b,0,0),1,!0),2,!1),3,f),4,g),5,m),6,v),7,y),a.push(b),a.push(h.a,h.b,h.c),a.push(h.materialIndex),f){var w=this.faceVertexUvs[0][r];a.push(A(w[0]),A(w[1]),A(w[2]))}if(g&&a.push(E(h.normal)),m){var S=h.vertexNormals;a.push(E(S[0]),E(S[1]),E(S[2]))}if(v&&a.push(C(h.color)),y){var x=h.vertexColors;a.push(C(x[0]),C(x[1]),C(x[2]))}}function M(t,e,n){return n?t|1<0&&(t.data.colors=l),d.length>0&&(t.data.uvs=[d]),t.data.faces=a,t},clone:function(){return(new xo).copy(this)},copy:function(t){var e,n,i,r,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e0?1:-1,f.push(_.x,_.y,_.z),g.push(y/c),g.push(1-b/l),T+=1}}for(b=0;b0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;var r={};for(var o in this.extensions)!0===this.extensions[o]&&(r[o]=!0);return Object.keys(r).length>0&&(e.extensions=r),e},_o.prototype=Object.assign(Object.create(Ii.prototype),{constructor:_o,isCamera:!0,copy:function(t,e){return Ii.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new oi),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){Ii.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(t,e){Ii.prototype.updateWorldMatrix.call(this,t,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Po.prototype=Object.assign(Object.create(_o.prototype),{constructor:Po,isPerspectiveCamera:!0,copy:function(t,e){return _o.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Kn.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Kn.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Kn.RAD2DEG*Math.atan(Math.tan(.5*Kn.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,i,r,o){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Kn.DEG2RAD*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;r+=o.offsetX*i/a,e-=o.offsetY*n/s,i*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(r+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){var e=Ii.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Io.prototype=Object.create(Ii.prototype),Io.prototype.constructor=Io,ko.prototype=Object.create(ti.prototype),ko.prototype.constructor=ko,ko.prototype.isWebGLCubeRenderTarget=!0,ko.prototype.fromEquirectangularTexture=function(t,e){this.texture.type=e.type,this.texture.format=e.format,this.texture.encoding=e.encoding;var n=new ki,i={uniforms:{tEquirect:{value:null}},vertexShader:["varying vec3 vWorldDirection;","vec3 transformDirection( in vec3 dir, in mat4 matrix ) {","\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );","}","void main() {","\tvWorldDirection = transformDirection( position, modelMatrix );","\t#include ","\t#include ","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV;","\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;","\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},r=new Oo({type:"CubemapFromEquirect",uniforms:Co(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:C,blending:_});r.uniforms.tEquirect.value=e;var o=new go(new Eo(5,5,5),r);n.add(o);var a=new Io(1,10,1);return a.renderTarget=this,a.renderTarget.texture.name="CubeCameraTexture",a.update(t,n),o.geometry.dispose(),o.material.dispose(),this},Do.prototype=Object.create(Qn.prototype),Do.prototype.constructor=Do,Do.prototype.isDataTexture=!0;var Ro=new Yi,Lo=new oi;function No(t,e,n,i,r,o){this.planes=[void 0!==t?t:new sr,void 0!==e?e:new sr,void 0!==n?n:new sr,void 0!==i?i:new sr,void 0!==r?r:new sr,void 0!==o?o:new sr]}Object.assign(No.prototype,{set:function(t,e,n,i,r,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromProjectionMatrix:function(t){var e=this.planes,n=t.elements,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],c=n[5],l=n[6],u=n[7],d=n[8],p=n[9],h=n[10],f=n[11],g=n[12],m=n[13],v=n[14],y=n[15];return e[0].setComponents(a-i,u-s,f-d,y-g).normalize(),e[1].setComponents(a+i,u+s,f+d,y+g).normalize(),e[2].setComponents(a+r,u+c,f+p,y+m).normalize(),e[3].setComponents(a-r,u-c,f-p,y-m).normalize(),e[4].setComponents(a-o,u-l,f-h,y-v).normalize(),e[5].setComponents(a+o,u+l,f+h,y+v).normalize(),this},intersectsObject:function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Ro.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(Ro)},intersectsSprite:function(t){return Ro.center.set(0,0,0),Ro.radius=.7071067811865476,Ro.applyMatrix4(t.matrixWorld),this.intersectsSphere(Ro)},intersectsSphere:function(t){for(var e=this.planes,n=t.center,i=-t.radius,r=0;r<6;r++)if(e[r].distanceToPoint(n)0?t.max.x:t.min.x,Lo.y=i.normal.y>0?t.max.y:t.min.y,Lo.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Lo)<0)return!1}return!0},containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var jo={common:{diffuse:{value:new xr(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Yn},uv2Transform:{value:new Yn},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},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 Xn(1,1)}},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 xr(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new xr(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Yn}},sprite:{diffuse:{value:new xr(15658734)},opacity:{value:1},center:{value:new Xn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Yn}}};function Vo(){var t=null,e=!1,n=null;function i(r,o){!1!==e&&(n(r,o),t.requestAnimationFrame(i))}return{start:function(){!0!==e&&null!==n&&(t.requestAnimationFrame(i),e=!0)},stop:function(){e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function Fo(t,e,n,i){xo.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i},this.fromBufferGeometry(new Uo(t,e,n,i)),this.mergeVertices()}function Uo(t,e,n,i){Zr.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};var r,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,l=Math.floor(i)||1,u=c+1,d=l+1,p=t/c,h=e/l,f=[],g=[],m=[],v=[];for(o=0;o 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_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_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * 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 > 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}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.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}\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_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\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 ) {\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 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\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:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\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 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 max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\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 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}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\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 return m[ 2 ][ 3 ] == - 1.0;\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_maxMipLevel 8.0\n#define cubeUV_minMipLevel 4.0\n#define cubeUV_maxTileSize 256.0\n#define cubeUV_minTileSize 16.0\nfloat getFace(vec3 direction) {\n vec3 absDirection = abs(direction);\n float face = -1.0;\n if (absDirection.x > absDirection.z) {\n if (absDirection.x > absDirection.y)\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if (absDirection.z > absDirection.y)\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n}\nvec2 getUV(vec3 direction, float face) {\n vec2 uv;\n if (face == 0.0) {\n uv = vec2(-direction.z, direction.y) / abs(direction.x);\n } else if (face == 1.0) {\n uv = vec2(direction.x, -direction.z) / abs(direction.y);\n } else if (face == 2.0) {\n uv = direction.xy / abs(direction.z);\n } else if (face == 3.0) {\n uv = vec2(direction.z, direction.y) / abs(direction.x);\n } else if (face == 4.0) {\n uv = direction.xz / abs(direction.y);\n } else {\n uv = vec2(-direction.x, direction.y) / abs(direction.z);\n }\n return 0.5 * (uv + 1.0);\n}\nvec3 bilinearCubeUV(sampler2D envMap, vec3 direction, float mipInt) {\n float face = getFace(direction);\n float filterInt = max(cubeUV_minMipLevel - mipInt, 0.0);\n mipInt = max(mipInt, cubeUV_minMipLevel);\n float faceSize = exp2(mipInt);\n float texelSize = 1.0 / (3.0 * cubeUV_maxTileSize);\n vec2 uv = getUV(direction, face) * (faceSize - 1.0);\n vec2 f = fract(uv);\n uv += 0.5 - f;\n if (face > 2.0) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n if(mipInt < cubeUV_maxMipLevel){\n uv.y += 2.0 * cubeUV_maxTileSize;\n }\n uv.y += filterInt * 2.0 * cubeUV_minTileSize;\n uv.x += 3.0 * max(0.0, cubeUV_maxTileSize - 2.0 * faceSize);\n uv *= texelSize;\n vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x += texelSize;\n vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.y += texelSize;\n vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x -= texelSize;\n vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n vec3 tm = mix(tl, tr, f.x);\n vec3 bm = mix(bl, br, f.x);\n return mix(tm, bm, f.y);\n}\n#define r0 1.0\n#define v0 0.339\n#define m0 -2.0\n#define r1 0.8\n#define v1 0.276\n#define m1 -1.0\n#define r4 0.4\n#define v4 0.046\n#define m4 2.0\n#define r5 0.305\n#define v5 0.016\n#define m5 3.0\n#define r6 0.21\n#define v6 0.0038\n#define m6 4.0\nfloat roughnessToMip(float roughness) {\n float mip = 0.0;\n if (roughness >= r1) {\n mip = (r0 - roughness) * (m1 - m0) / (r0 - r1) + m0;\n } else if (roughness >= r4) {\n mip = (r1 - roughness) * (m4 - m1) / (r1 - r4) + m1;\n } else if (roughness >= r5) {\n mip = (r4 - roughness) * (m5 - m4) / (r4 - r5) + m4;\n } else if (roughness >= r6) {\n mip = (r5 - roughness) * (m6 - m5) / (r5 - r6) + m5;\n } else {\n mip = -2.0 * log2(1.16 * roughness); }\n return mip;\n}\nvec4 textureCubeUV(sampler2D envMap, vec3 sampleDir, float roughness) {\n float mip = clamp(roughnessToMip(roughness), m0, cubeUV_maxMipLevel);\n float mipF = fract(mip);\n float mipInt = floor(mip);\n vec3 color0 = bilinearCubeUV(envMap, sampleDir, mipInt);\n if (mipF == 0.0) {\n return vec4(color0, 1.0);\n } else {\n vec3 color1 = bilinearCubeUV(envMap, sampleDir, mipInt + 1.0);\n return vec4(mix(color0, color1, mipF), 1.0);\n }\n}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_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 + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\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:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 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}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\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#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\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\tuniform int maxMipLevel;\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 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\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} 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\tfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\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 fogDepth;\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 texture2D( gradientMap, coord ).rgb;\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\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\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;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * 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\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * 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\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * 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 );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\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 GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\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\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\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\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.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\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\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\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\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\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\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\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.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 GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\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\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\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_Diffuse_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;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\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\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, 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_Diffuse_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.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\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 = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\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.specularRoughness;\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( 0, 1, 0 ),\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#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_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_Diffuse_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 CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * 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 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\tgetPointDirectLightIrradiance( 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\tgetSpotDirectLightIrradiance( 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\tgetDirectionalDirectLightIrradiance( 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 );\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 );\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 = lightMapTexelToLinear( 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 += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\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 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\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\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\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",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#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 * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\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 * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\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 * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\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 );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\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 ) {\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\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef 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 );\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",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#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#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#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 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.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 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.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#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#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#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\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\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\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\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\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\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\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;\nuniform float toneMappingWhitePoint;\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}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\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 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",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 )\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_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",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}",cube_frag:"#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \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}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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 \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\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 \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_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_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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 \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \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\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#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\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#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\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#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\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#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\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#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\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#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\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \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 \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \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 \n\t#include \n\t#include \n}"},zo={basic:{uniforms:Ao([jo.common,jo.specularmap,jo.envmap,jo.aomap,jo.lightmap,jo.fog]),vertexShader:Bo.meshbasic_vert,fragmentShader:Bo.meshbasic_frag},lambert:{uniforms:Ao([jo.common,jo.specularmap,jo.envmap,jo.aomap,jo.lightmap,jo.emissivemap,jo.fog,jo.lights,{emissive:{value:new xr(0)}}]),vertexShader:Bo.meshlambert_vert,fragmentShader:Bo.meshlambert_frag},phong:{uniforms:Ao([jo.common,jo.specularmap,jo.envmap,jo.aomap,jo.lightmap,jo.emissivemap,jo.bumpmap,jo.normalmap,jo.displacementmap,jo.fog,jo.lights,{emissive:{value:new xr(0)},specular:{value:new xr(1118481)},shininess:{value:30}}]),vertexShader:Bo.meshphong_vert,fragmentShader:Bo.meshphong_frag},standard:{uniforms:Ao([jo.common,jo.envmap,jo.aomap,jo.lightmap,jo.emissivemap,jo.bumpmap,jo.normalmap,jo.displacementmap,jo.roughnessmap,jo.metalnessmap,jo.fog,jo.lights,{emissive:{value:new xr(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Bo.meshphysical_vert,fragmentShader:Bo.meshphysical_frag},toon:{uniforms:Ao([jo.common,jo.specularmap,jo.aomap,jo.lightmap,jo.emissivemap,jo.bumpmap,jo.normalmap,jo.displacementmap,jo.gradientmap,jo.fog,jo.lights,{emissive:{value:new xr(0)},specular:{value:new xr(1118481)},shininess:{value:30}}]),vertexShader:Bo.meshtoon_vert,fragmentShader:Bo.meshtoon_frag},matcap:{uniforms:Ao([jo.common,jo.bumpmap,jo.normalmap,jo.displacementmap,jo.fog,{matcap:{value:null}}]),vertexShader:Bo.meshmatcap_vert,fragmentShader:Bo.meshmatcap_frag},points:{uniforms:Ao([jo.points,jo.fog]),vertexShader:Bo.points_vert,fragmentShader:Bo.points_frag},dashed:{uniforms:Ao([jo.common,jo.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Bo.linedashed_vert,fragmentShader:Bo.linedashed_frag},depth:{uniforms:Ao([jo.common,jo.displacementmap]),vertexShader:Bo.depth_vert,fragmentShader:Bo.depth_frag},normal:{uniforms:Ao([jo.common,jo.bumpmap,jo.normalmap,jo.displacementmap,{opacity:{value:1}}]),vertexShader:Bo.normal_vert,fragmentShader:Bo.normal_frag},sprite:{uniforms:Ao([jo.sprite,jo.fog]),vertexShader:Bo.sprite_vert,fragmentShader:Bo.sprite_frag},background:{uniforms:{uvTransform:{value:new Yn},t2D:{value:null}},vertexShader:Bo.background_vert,fragmentShader:Bo.background_frag},cube:{uniforms:Ao([jo.envmap,{opacity:{value:1}}]),vertexShader:Bo.cube_vert,fragmentShader:Bo.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Bo.equirect_vert,fragmentShader:Bo.equirect_frag},distanceRGBA:{uniforms:Ao([jo.common,jo.displacementmap,{referencePosition:{value:new oi},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Bo.distanceRGBA_vert,fragmentShader:Bo.distanceRGBA_frag},shadow:{uniforms:Ao([jo.lights,jo.fog,{color:{value:new xr(0)},opacity:{value:1}}]),vertexShader:Bo.shadow_vert,fragmentShader:Bo.shadow_frag}};function Go(t,e,n,i){var r,o,a=new xr(0),s=0,c=null,l=0,u=null;function d(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,i)}return{getClearColor:function(){return a},setClearColor:function(t,e){a.set(t),d(a,s=void 0!==e?e:1)},getClearAlpha:function(){return s},setClearAlpha:function(t){d(a,s=t)},render:function(e,i,p,h){var f=i.background,g=t.xr,m=g.getSession&&g.getSession();if(m&&"additive"===m.environmentBlendMode&&(f=null),null===f?d(a,s):f&&f.isColor&&(d(f,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),f&&(f.isCubeTexture||f.isWebGLCubeRenderTarget||f.mapping===wt)){void 0===o&&((o=new go(new Eo(1,1,1),new Oo({type:"BackgroundCubeMaterial",uniforms:Co(zo.cube.uniforms),vertexShader:zo.cube.vertexShader,fragmentShader:zo.cube.fragmentShader,side:C,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),o.geometry.deleteAttribute("uv"),o.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(o.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(o));var v=f.isWebGLCubeRenderTarget?f.texture:f;o.material.uniforms.envMap.value=v,o.material.uniforms.flipEnvMap.value=v.isCubeTexture?-1:1,c===f&&l===v.version&&u===t.toneMapping||(o.material.needsUpdate=!0,c=f,l=v.version,u=t.toneMapping),e.unshift(o,o.geometry,o.material,0,0,null)}else f&&f.isTexture&&(void 0===r&&((r=new go(new Uo(2,2),new Oo({type:"BackgroundMaterial",uniforms:Co(zo.background.uniforms),vertexShader:zo.background.vertexShader,fragmentShader:zo.background.fragmentShader,side:E,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(r.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(r)),r.material.uniforms.t2D.value=f,!0===f.matrixAutoUpdate&&f.updateMatrix(),r.material.uniforms.uvTransform.value.copy(f.matrix),c===f&&l===f.version&&u===t.toneMapping||(r.material.needsUpdate=!0,c=f,l=f.version,u=t.toneMapping),e.unshift(r,r.geometry,r.material,0,0,null))}}}function Ho(t,e){return Math.abs(e[1])-Math.abs(t[1])}function Wo(t,e,n,i,r,o,a,s,c,l){t=void 0!==t?t:[],e=void 0!==e?e:gt,a=void 0!==a?a:Xt,Qn.call(this,t,e,n,i,r,o,a,s,c,l),this.flipY=!1}function qo(t,e,n,i){Qn.call(this,null),this.image={data:t||null,width:e||1,height:n||1,depth:i||1},this.magFilter=Ct,this.minFilter=Ct,this.wrapR=Mt,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function Ko(t,e,n,i){Qn.call(this,null),this.image={data:t||null,width:e||1,height:n||1,depth:i||1},this.magFilter=Ct,this.minFilter=Ct,this.wrapR=Mt,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}zo.physical={uniforms:Ao([zo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Xn(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new xr(0)},transparency:{value:0}}]),vertexShader:Bo.meshphysical_vert,fragmentShader:Bo.meshphysical_frag},Wo.prototype=Object.create(Qn.prototype),Wo.prototype.constructor=Wo,Wo.prototype.isCubeTexture=!0,Object.defineProperty(Wo.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),qo.prototype=Object.create(Qn.prototype),qo.prototype.constructor=qo,qo.prototype.isDataTexture2DArray=!0,Ko.prototype=Object.create(Qn.prototype),Ko.prototype.constructor=Ko,Ko.prototype.isDataTexture3D=!0;var Xo=new Qn,Yo=new qo,Zo=new Ko,Jo=new Wo,Qo=[],$o=[],ta=new Float32Array(16),ea=new Float32Array(9),na=new Float32Array(4);function ia(t,e,n){var i=t[0];if(i<=0||i>0)return t;var r=e*n,o=Qo[r];if(void 0===o&&(o=new Float32Array(r),Qo[r]=o),0!==e){i.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function ra(t,e){if(t.length!==e.length)return!1;for(var n=0,i=t.length;n/gm;function Qa(t){return t.replace(Ja,$a)}function $a(t,e){var n=Bo[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return Qa(n)}var ts=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,es=/#pragma unroll_loop_start[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;function ns(t){return t.replace(es,rs).replace(ts,is)}function is(t,e,n,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),rs(t,e,n,i)}function rs(t,e,n,i){for(var r="",o=parseInt(e);o0?t.gammaFactor:1,m=n.isWebGL2?"":function(t){return[t.extensionDerivatives||t.envMapCubeUV||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading||"physical"===t.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Xa).join("\n")}(n),v=function(t){var e=[];for(var n in t){var i=t[n];!1!==i&&e.push("#define "+n+" "+i)}return e.join("\n")}(c),y=s.createProgram();if(n.isRawShaderMaterial?((i=[v].filter(Xa).join("\n")).length>0&&(i+="\n"),(r=[m,v].filter(Xa).join("\n")).length>0&&(r+="\n")):(i=[os(n),"#define SHADER_NAME "+n.shaderName,v,n.instancing?"#define USE_INSTANCING":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+g,"#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 "+h:"",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.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",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.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+d:"",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"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\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(Xa).join("\n"),r=[m,os(n),"#define SHADER_NAME "+n.shaderName,v,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+g,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 "+p:"",n.envMap?"#define "+h:"",n.envMap?"#define "+f:"",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.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",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 "+d:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ct?"#define TONE_MAPPING":"",n.toneMapping!==ct?Bo.tonemapping_pars_fragment:"",n.toneMapping!==ct?function(t,e){var n;switch(e){case lt:n="Linear";break;case ut:n="Reinhard";break;case dt:n="Uncharted2";break;case pt:n="OptimizedCineon";break;case ht:n="ACESFilmic";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.outputEncoding||n.mapEncoding||n.matcapEncoding||n.envMapEncoding||n.emissiveMapEncoding||n.lightMapEncoding?Bo.encodings_pars_fragment:"",n.mapEncoding?Ka("mapTexelToLinear",n.mapEncoding):"",n.matcapEncoding?Ka("matcapTexelToLinear",n.matcapEncoding):"",n.envMapEncoding?Ka("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMapEncoding?Ka("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMapEncoding?Ka("lightMapTexelToLinear",n.lightMapEncoding):"",n.outputEncoding?("linearToOutputTexel",o=n.outputEncoding,a=Wa(o),"vec4 linearToOutputTexel( vec4 value ) { return LinearTo"+a[0]+a[1]+"; }"):"",n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Xa).join("\n")),l=Za(l=Ya(l=Qa(l),n),n),u=Za(u=Ya(u=Qa(u),n),n),l=ns(l),u=ns(u),n.isWebGL2&&!n.isRawShaderMaterial){var b=!1,w=/^\s*#version\s+300\s+es\s*\n/;n.isShaderMaterial&&null!==l.match(w)&&null!==u.match(w)&&(b=!0,l=l.replace(w,""),u=u.replace(w,"")),i=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,r=["#version 300 es\n","#define varying in",b?"":"out highp vec4 pc_fragColor;",b?"":"#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"+r}var E,C,A=r+u,T=Ga(s,35633,i+l),O=Ga(s,35632,A);if(s.attachShader(y,T),s.attachShader(y,O),void 0!==n.index0AttributeName?s.bindAttribLocation(y,0,n.index0AttributeName):!0===n.morphTargets&&s.bindAttribLocation(y,0,"position"),s.linkProgram(y),t.debug.checkShaderErrors){var _=s.getProgramInfoLog(y).trim(),P=s.getShaderInfoLog(T).trim(),I=s.getShaderInfoLog(O).trim(),k=!0,D=!0;if(!1===s.getProgramParameter(y,35714)){k=!1;var R=qa(s,T,"vertex"),L=qa(s,O,"fragment");console.error("THREE.WebGLProgram: shader error: ",s.getError(),"35715",s.getProgramParameter(y,35715),"gl.getProgramInfoLog",_,R,L)}else""!==_?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",_):""!==P&&""!==I||(D=!1);D&&(this.diagnostics={runnable:k,programLog:_,vertexShader:{log:P,prefix:i},fragmentShader:{log:I,prefix:r}})}return s.detachShader(y,T),s.detachShader(y,O),s.deleteShader(T),s.deleteShader(O),this.getUniforms=function(){return void 0===E&&(E=new za(s,y)),E},this.getAttributes=function(){return void 0===C&&(C=function(t,e){for(var n={},i=t.getProgramParameter(e,35721),r=0;r0,maxBones:x,useVertexTexture:a,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:d.directional.length,numPointLights:d.point.length,numSpotLights:d.spot.length,numRectAreaLights:d.rectArea.length,numHemiLights:d.hemi.length,numDirLightShadows:d.directionalShadowMap.length,numPointLightShadows:d.pointShadowMap.length,numSpotLightShadows:d.spotShadowMap.length,numClippingPlanes:g,numClipIntersection:m,dithering:i.dithering,shadowMapEnabled:t.shadowMap.enabled&&h.length>0,shadowMapType:t.shadowMap.type,toneMapping:i.toneMapped?t.toneMapping:ct,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:i.side===A,flipSided:i.side===C,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:r||null!==e.get("EXT_frag_depth"),rendererExtensionDrawBuffers:r||null!==e.get("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:r||null!==e.get("EXT_shader_texture_lod"),onBeforeCompile:i.onBeforeCompile}},this.getProgramCacheKey=function(e){var n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)n.push(i),n.push(e.defines[i]);if(void 0===e.isRawShaderMaterial){for(var r=0;r1&&n.sort(t||cs),i.length>1&&i.sort(e||ls)}}}var ds=0;function ps(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}function hs(){for(var t,e=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new oi,color:new xr};break;case"SpotLight":n={position:new oi,direction:new oi,color:new xr,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new oi,color:new xr,distance:0,decay:0};break;case"HemisphereLight":n={direction:new oi,skyColor:new xr,groundColor:new xr};break;case"RectAreaLight":n={color:new xr,position:new oi,halfWidth:new oi,halfHeight:new oi}}return t[e.id]=n,n}}},n=(t={},{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowRadius:1,shadowMapSize:new Xn};break;case"PointLight":n={shadowBias:0,shadowRadius:1,shadowMapSize:new Xn,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}),i={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:[],point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},r=0;r<9;r++)i.probe.push(new oi);var o=new oi,a=new hi,s=new hi;return{setup:function(t,r,c){for(var l=0,u=0,d=0,p=0;p<9;p++)i.probe[p].set(0,0,0);var h=0,f=0,g=0,m=0,v=0,y=0,b=0,w=0,S=c.matrixWorldInverse;t.sort(ps),p=0;for(var x=t.length;p\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=d.clone();p.defines.HORIZONAL_PASS=1;var h=new Zr;h.setAttribute("position",new Ir(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var f=new go(h,d),g=this;function m(n,i){var r=e.update(f);d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(i,null,r,d,f,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(i,null,r,p,f,null)}function v(t,e,n){var i=t<<0|e<<1|n<<2,r=s[i];return void 0===r&&(r=new gs({depthPacking:gn,morphTargets:t,skinning:e}),s[i]=r),r}function y(t,e,n){var i=t<<0|e<<1|n<<2,r=c[i];return void 0===r&&(r=new ms({morphTargets:t,skinning:e}),c[i]=r),r}function b(e,n,i,r,o,a){var s=e.geometry,c=null,d=v,p=e.customDepthMaterial;if(!0===i.isPointLight&&(d=y,p=e.customDistanceMaterial),void 0===p){var h=!1;!0===n.morphTargets&&(!0===s.isBufferGeometry?h=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:!0===s.isGeometry&&(h=s.morphTargets&&s.morphTargets.length>0));var f=!1;!0===e.isSkinnedMesh&&(!0===n.skinning?f=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e)),c=d(h,f,!0===e.isInstancedMesh)}else c=p;if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var g=c.uuid,m=n.uuid,b=l[g];void 0===b&&(b={},l[g]=b);var w=b[m];void 0===w&&(w=c.clone(),b[m]=w),c=w}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=a===M?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:u[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,!0===i.isPointLight&&!0===c.isMeshDistanceMaterial&&(c.referencePosition.setFromMatrixPosition(i.matrixWorld),c.nearDistance=r,c.farDistance=o),c}function w(n,r,o,a,s){if(!1!==n.visible){if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===M)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var c=e.update(n),l=n.material;if(Array.isArray(l))for(var u=c.groups,d=0,p=u.length;dn||r.y>n)&&(console.warn("THREE.WebGLShadowMap:",v,"has shadow exceeding max texture size, reducing"),r.x>n&&(o.x=Math.floor(n/b.x),r.x=o.x*b.x,y.mapSize.x=o.x),r.y>n&&(o.y=Math.floor(n/b.y),r.y=o.y*b.y,y.mapSize.y=o.y)),null===y.map&&!y.isPointLightShadow&&this.type===M){var S={minFilter:Pt,magFilter:Pt,format:Yt};y.map=new ti(r.x,r.y,S),y.map.texture.name=v.name+".shadowMap",y.mapPass=new ti(r.x,r.y,S),y.camera.updateProjectionMatrix()}null===y.map&&(S={minFilter:Ct,magFilter:Ct,format:Yt},y.map=new ti(r.x,r.y,S),y.map.texture.name=v.name+".shadowMap",y.camera.updateProjectionMatrix()),t.setRenderTarget(y.map),t.clear();for(var x=y.getViewportCount(),E=0;E=1):-1!==ft.indexOf("OpenGL ES")&&(ht=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(ft)[1]),pt=ht>=2);var gt=null,mt={},vt=new $n,yt=new $n;function bt(e,n,i){var r=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,10241,9728),t.texParameteri(e,10240,9728);for(var a=0;ai||t.height>i)&&(r=i/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){var o=e?Kn.floorPowerOfTwo:Math.floor,a=o(r*t.width),s=o(r*t.height);void 0===u&&(u=y(a,s));var c=n?y(a,s):u;return c.width=a,c.height=s,c.getContext("2d").drawImage(t,0,0,a,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+a+"x"+s+")."),c}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function w(t){return Kn.isPowerOfTwo(t.width)&&Kn.isPowerOfTwo(t.height)}function S(t,e){return t.generateMipmaps&&e&&t.minFilter!==Ct&&t.minFilter!==Pt}function x(e,n,r,o){t.generateMipmap(e),i.get(n).__maxMipLevel=Math.log(Math.max(r,o))*Math.LOG2E}function M(n,i,r){if(!1===d)return i;if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}var o=i;return 6403===i&&(5126===r&&(o=33326),5131===r&&(o=33325),5121===r&&(o=33321)),6407===i&&(5126===r&&(o=34837),5131===r&&(o=34843),5121===r&&(o=32849)),6408===i&&(5126===r&&(o=34836),5131===r&&(o=34842),5121===r&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||e.get("EXT_color_buffer_float"),o}function E(t){return t===Ct||t===At||t===Ot?9728:9729}function C(e){var n=e.target;n.removeEventListener("dispose",C),function(e){var n=i.get(e);void 0!==n.__webglInit&&(t.deleteTexture(n.__webglTexture),i.remove(e))}(n),n.isVideoTexture&&m.delete(n),s.memory.textures--}function A(e){var n=e.target;n.removeEventListener("dispose",A),function(e){var n=i.get(e),r=i.get(e.texture);if(e){if(void 0!==r.__webglTexture&&t.deleteTexture(r.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&t.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer&&t.deleteRenderbuffer(n.__webglColorRenderbuffer),n.__webglDepthRenderbuffer&&t.deleteRenderbuffer(n.__webglDepthRenderbuffer);i.remove(e.texture),i.remove(e)}}(n),s.memory.textures--}var T=0;function O(t,e){var r=i.get(t);if(t.isVideoTexture&&function(t){var e=s.render.frame;m.get(t)!==e&&(m.set(t,e),t.update())}(t),t.version>0&&r.__version!==t.version){var o=t.image;if(void 0===o)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==o.complete)return void L(r,t,e);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+e),n.bindTexture(3553,r.__webglTexture)}function _(e,r){if(6===e.image.length){var o=i.get(e);if(e.version>0&&o.__version!==e.version){R(o,e),n.activeTexture(33984+r),n.bindTexture(34067,o.__webglTexture),t.pixelStorei(37440,e.flipY);for(var s=e&&(e.isCompressedTexture||e.image[0].isCompressedTexture),c=e.image[0]&&e.image[0].isDataTexture,l=[],u=0;u<6;u++)l[u]=s||c?c?e.image[u].image:e.image[u]:b(e.image[u],!1,!0,h);var p,f=l[0],g=w(f)||d,m=a.convert(e.format),v=a.convert(e.type),y=M(e.internalFormat,m,v);if(D(34067,e,g),s){for(u=0;u<6;u++){p=l[u].mipmaps;for(var E=0;E1||i.get(r).__currentAnisotropy)&&(t.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r.anisotropy,o.getMaxAnisotropy())),i.get(r).__currentAnisotropy=r.anisotropy)}}function R(e,n){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",C),e.__webglTexture=t.createTexture(),s.memory.textures++)}function L(e,i,r){var o=3553;i.isDataTexture2DArray&&(o=35866),i.isDataTexture3D&&(o=32879),R(e,i),n.activeTexture(33984+r),n.bindTexture(o,e.__webglTexture),t.pixelStorei(37440,i.flipY),t.pixelStorei(37441,i.premultiplyAlpha),t.pixelStorei(3317,i.unpackAlignment);var s=function(t){return!d&&(t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==Ct&&t.minFilter!==Pt)}(i)&&!1===w(i.image),c=b(i.image,s,!1,f),l=w(c)||d,u=a.convert(i.format),p=a.convert(i.type),h=M(i.internalFormat,u,p);D(o,i,l);var g,m=i.mipmaps;if(i.isDepthTexture)h=6402,d?h=i.type===Bt?36012:i.type===Ut?33190:i.type===qt?35056:33189:i.type===Bt&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===$t&&6402===h&&i.type!==Vt&&i.type!==Ut&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Vt,p=a.convert(i.type)),i.format===te&&6402===h&&(h=34041,i.type!==qt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=qt,p=a.convert(i.type))),n.texImage2D(3553,0,h,c.width,c.height,0,u,p,null);else if(i.isDataTexture)if(m.length>0&&l){for(var v=0,y=m.length;v0&&l){for(v=0,y=m.length;v=p&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+p),T+=1,t},this.resetTextureUnits=function(){T=0},this.setTexture2D=O,this.setTexture2DArray=function(t,e){var r=i.get(t);t.version>0&&r.__version!==t.version?L(r,t,e):(n.activeTexture(33984+e),n.bindTexture(35866,r.__webglTexture))},this.setTexture3D=function(t,e){var r=i.get(t);t.version>0&&r.__version!==t.version?L(r,t,e):(n.activeTexture(33984+e),n.bindTexture(32879,r.__webglTexture))},this.setTextureCube=_,this.setTextureCubeDynamic=P,this.setupRenderTarget=function(e){var r=i.get(e),o=i.get(e.texture);e.addEventListener("dispose",A),o.__webglTexture=t.createTexture(),s.memory.textures++;var c=!0===e.isWebGLCubeRenderTarget,l=!0===e.isWebGLMultisampleRenderTarget,u=w(e)||d;if(!d||e.texture.format!==Xt||e.texture.type!==Bt&&e.texture.type!==zt||(e.texture.format=Yt,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),c){r.__webglFramebuffer=[];for(var p=0;p<6;p++)r.__webglFramebuffer[p]=t.createFramebuffer()}else if(r.__webglFramebuffer=t.createFramebuffer(),l)if(d){r.__webglMultisampledFramebuffer=t.createFramebuffer(),r.__webglColorRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,r.__webglColorRenderbuffer);var h=a.convert(e.texture.format),f=a.convert(e.texture.type),g=M(e.texture.internalFormat,h,f),m=V(e);t.renderbufferStorageMultisample(36161,m,g,e.width,e.height),t.bindFramebuffer(36160,r.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(36160,36064,36161,r.__webglColorRenderbuffer),t.bindRenderbuffer(36161,null),e.depthBuffer&&(r.__webglDepthRenderbuffer=t.createRenderbuffer(),j(r.__webglDepthRenderbuffer,e,!0)),t.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(c){for(n.bindTexture(34067,o.__webglTexture),D(34067,e.texture,u),p=0;p<6;p++)N(r.__webglFramebuffer[p],e,36064,34069+p);S(e.texture,u)&&x(34067,e.texture,e.width,e.height),n.bindTexture(34067,null)}else n.bindTexture(3553,o.__webglTexture),D(3553,e.texture,u),N(r.__webglFramebuffer,e,36064,3553),S(e.texture,u)&&x(3553,e.texture,e.width,e.height),n.bindTexture(3553,null);e.depthBuffer&&function(e){var n=i.get(e),r=!0===e.isWebGLCubeRenderTarget;if(e.depthTexture){if(r)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),O(n.depthTexture,0);var r=i.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===$t)t.framebufferTexture2D(36160,36096,3553,r,0);else{if(n.depthTexture.format!==te)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(36160,33306,3553,r,0)}}(n.__webglFramebuffer,e)}else if(r){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(36160,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),j(n.__webglDepthbuffer[o],e,!1)}else t.bindFramebuffer(36160,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),j(n.__webglDepthbuffer,e,!1);t.bindFramebuffer(36160,null)}(e)},this.updateRenderTargetMipmap=function(t){var e=t.texture;if(S(e,w(t)||d)){var r=t.isWebGLCubeRenderTarget?34067:3553,o=i.get(e).__webglTexture;n.bindTexture(r,o),x(r,e,t.width,t.height),n.bindTexture(r,null)}},this.updateMultisampleRenderTarget=function(e){if(e.isWebGLMultisampleRenderTarget)if(d){var n=i.get(e);t.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),t.bindFramebuffer(36009,n.__webglFramebuffer);var r=e.width,o=e.height,a=16384;e.depthBuffer&&(a|=256),e.stencilBuffer&&(a|=1024),t.blitFramebuffer(0,0,r,o,0,0,r,o,a,9728),t.bindFramebuffer(36160,n.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(t,e){t&&t.isWebGLRenderTarget&&(!1===F&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),F=!0),t=t.texture),O(t,e)},this.safeSetTextureCube=function(t,e){t&&t.isWebGLCubeRenderTarget&&(!1===U&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),U=!0),t=t.texture),t&&t.isCubeTexture||Array.isArray(t.image)&&6===t.image.length?_(t,e):P(t,e)}}function ws(t,e,n){var i=n.isWebGL2;return{convert:function(t){var n;if(t===Lt)return 5121;if(t===Gt)return 32819;if(t===Ht)return 32820;if(t===Wt)return 33635;if(t===Nt)return 5120;if(t===jt)return 5122;if(t===Vt)return 5123;if(t===Ft)return 5124;if(t===Ut)return 5125;if(t===Bt)return 5126;if(t===zt)return i?5131:null!==(n=e.get("OES_texture_half_float"))?n.HALF_FLOAT_OES:null;if(t===Kt)return 6406;if(t===Xt)return 6407;if(t===Yt)return 6408;if(t===Zt)return 6409;if(t===Jt)return 6410;if(t===$t)return 6402;if(t===te)return 34041;if(t===ee)return 6403;if(t===ne)return 36244;if(t===ie)return 33319;if(t===re)return 33320;if(t===oe)return 36248;if(t===ae)return 36249;if(t===se||t===ce||t===le||t===ue){if(null===(n=e.get("WEBGL_compressed_texture_s3tc")))return null;if(t===se)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===ce)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===le)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===ue)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(t===de||t===pe||t===he||t===fe){if(null===(n=e.get("WEBGL_compressed_texture_pvrtc")))return null;if(t===de)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===pe)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===he)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===fe)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t===ge)return null!==(n=e.get("WEBGL_compressed_texture_etc1"))?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((t===me||t===ve)&&null!==(n=e.get("WEBGL_compressed_texture_etc"))){if(t===me)return n.COMPRESSED_RGB8_ETC2;if(t===ve)return n.COMPRESSED_RGBA8_ETC2_EAC}return t===ye||t===be||t===we||t===Se||t===xe||t===Me||t===Ee||t===Ce||t===Ae||t===Te||t===Oe||t===_e||t===Pe||t===Ie||t===De||t===Re||t===Le||t===Ne||t===je||t===Ve||t===Fe||t===Ue||t===Be||t===ze||t===Ge||t===He||t===We||t===qe?null!==(n=e.get("WEBGL_compressed_texture_astc"))?t:null:t===ke?null!==(n=e.get("EXT_texture_compression_bptc"))?t:null:t===qt?i?34042:null!==(n=e.get("WEBGL_depth_texture"))?n.UNSIGNED_INT_24_8_WEBGL:null:void 0}}}function Ss(t){Po.call(this),this.cameras=t||[]}function xs(){Ii.call(this),this.type="Group"}function Ms(t,e){var n=this,i=null,r=1,o=null,a="local-floor",s=null,c=[],l=new Map,u=new Po;u.layers.enable(1),u.viewport=new $n;var d=new Po;d.layers.enable(2),d.viewport=new $n;var p=new Ss([u,d]);p.layers.enable(1),p.layers.enable(2);var h=null,f=null;function g(t){var e=l.get(t.inputSource);e&&(e.targetRay&&e.targetRay.dispatchEvent({type:t.type}),e.grip&&e.grip.dispatchEvent({type:t.type}))}function m(){l.forEach(function(t,e){t.targetRay&&(t.targetRay.dispatchEvent({type:"disconnected",data:e}),t.targetRay.visible=!1),t.grip&&(t.grip.dispatchEvent({type:"disconnected",data:e}),t.grip.visible=!1)}),l.clear(),t.setFramebuffer(null),t.setRenderTarget(t.getRenderTarget()),M.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function v(t){o=t,M.setContext(i),M.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}function y(t){for(var e=i.inputSources,n=0;n0),t.numPlanes=n,t.numIntersection=0}function l(e,n,i,r){var c=null!==e?e.length:0,l=null;if(0!==c){if(l=s.value,!0!==r||null===l){var u=i+4*c,d=n.matrixWorldInverse;a.getNormalMatrix(d),(null===l||l.length0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var o="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&t instanceof WebGL2ComputeRenderingContext,a=void 0!==n.precision?n.precision:"highp",s=r(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var c=!0===n.logarithmicDepthBuffer,l=t.getParameter(34930),u=t.getParameter(35660),d=t.getParameter(3379),p=t.getParameter(34076),h=t.getParameter(34921),f=t.getParameter(36347),g=t.getParameter(36348),m=t.getParameter(36349),v=u>0,y=o||!!e.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(void 0!==i)return i;var n=e.get("EXT_texture_filter_anisotropic");return i=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:l,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:h,maxVertexUniforms:f,maxVaryings:g,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?t.getParameter(36183):0}}(h,f,t)).isWebGL2&&(f.get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays")),f.get("OES_texture_float_linear"),I=new ws(h,f,g),(m=new ys(h,f,g)).scissor(H.copy(Q).multiplyScalar(X).floor()),m.viewport(G.copy(J).multiplyScalar(X).floor()),v=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(t,n,i){switch(i=i||1,e.calls++,n){case 4:e.triangles+=i*(t/3);break;case 1:e.lines+=i*(t/2);break;case 3:e.lines+=i*(t-1);break;case 2:e.lines+=i*t;break;case 0:e.points+=i*t;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}(h),y=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,i){t.get(e)[n]=i},dispose:function(){t=new WeakMap}}},b=new bs(h,f,m,y,g,I,v),w=new function(t,e){var n=e.isWebGL2,i=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),i.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);var n=i.get(e);n&&(t.deleteBuffer(n.buffer),i.delete(e))},update:function(e,r){e.isInterleavedBufferAttribute&&(e=e.data);var o=i.get(e);void 0===o?i.set(e,function(e,n){var i=e.array,r=e.usage,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,i,r),e.onUploadCallback();var a=5126;return i instanceof Float32Array?a=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?a=5123:i instanceof Int16Array?a=5122:i instanceof Uint32Array?a=5125:i instanceof Int32Array?a=5124:i instanceof Int8Array?a=5120:i instanceof Uint8Array&&(a=5121),{buffer:o,type:a,bytesPerElement:i.BYTES_PER_ELEMENT,version:e.version}}(e,r)):o.version65535?Vr:Nr)(n,1);h.version=a,e.update(h,34963);var f=r.get(t);f&&e.remove(f),r.set(t,h)}return{get:function(t,e){var r=i.get(e);return r||(e.addEventListener("dispose",o),e.isBufferGeometry?r=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Zr).setFromObject(t)),r=e._bufferGeometry),i.set(e,r),n.memory.geometries++,r)},update:function(t){var n=t.index,i=t.attributes;for(var r in null!==n&&e.update(n,34963),i)e.update(i[r],34962);var o=t.morphAttributes;for(var r in o)for(var a=o[r],s=0,c=a.length;s=0){var l=r[s];if(void 0!==l){var u=l.normalized,d=l.itemSize;if(void 0===(M=w.get(l)))continue;var p=M.buffer,v=M.type,y=M.bytesPerElement;if(l.isInterleavedBufferAttribute){var b=l.data,S=b.stride,x=l.offset;b&&b.isInstancedInterleavedBuffer?(m.enableAttributeAndDivisor(c,b.meshPerAttribute),void 0===e.maxInstancedCount&&(e.maxInstancedCount=b.meshPerAttribute*b.count)):m.enableAttribute(c),h.bindBuffer(34962,p),h.vertexAttribPointer(c,d,v,u,S*y,x*y)}else l.isInstancedBufferAttribute?(m.enableAttributeAndDivisor(c,l.meshPerAttribute),void 0===e.maxInstancedCount&&(e.maxInstancedCount=l.meshPerAttribute*l.count)):m.enableAttribute(c),h.bindBuffer(34962,p),h.vertexAttribPointer(c,d,v,u,0,0)}else if("instanceMatrix"===s){var M;if(void 0===(M=w.get(t.instanceMatrix)))continue;p=M.buffer,v=M.type,m.enableAttributeAndDivisor(c+0,1),m.enableAttributeAndDivisor(c+1,1),m.enableAttributeAndDivisor(c+2,1),m.enableAttributeAndDivisor(c+3,1),h.bindBuffer(34962,p),h.vertexAttribPointer(c+0,4,v,!1,64,0),h.vertexAttribPointer(c+1,4,v,!1,64,16),h.vertexAttribPointer(c+2,4,v,!1,64,32),h.vertexAttribPointer(c+3,4,v,!1,64,48)}else if(void 0!==a){var E=a[s];if(void 0!==E)switch(E.length){case 2:h.vertexAttrib2fv(c,E);break;case 3:h.vertexAttrib3fv(c,E);break;case 4:h.vertexAttrib4fv(c,E);break;default:h.vertexAttrib1fv(c,E)}}}}m.disableUnusedAttributes()}}(r,n,i,s),null!==l&&h.bindBuffer(34963,d.buffer));var y=null!==l?l.count:u.count,b=n.drawRange.start*p,x=n.drawRange.count*p,M=null!==o?o.start*p:0,E=null!==o?o.count*p:1/0,C=Math.max(b,M),A=Math.min(y,b+x,M+E)-1,T=Math.max(0,A-C+1);if(0!==T){if(r.isMesh)!0===i.wireframe?(m.setLineWidth(i.wireframeLinewidth*at()),v.setMode(1)):v.setMode(4);else if(r.isLine){var I=i.linewidth;void 0===I&&(I=1),m.setLineWidth(I*at()),r.isLineSegments?v.setMode(1):r.isLineLoop?v.setMode(2):v.setMode(3)}else r.isPoints?v.setMode(0):r.isSprite&&v.setMode(4);r.isInstancedMesh?v.renderInstances(n,C,T,r.count):n.isInstancedBufferGeometry?v.renderInstances(n,C,T,n.maxInstancedCount):v.render(C,T)}},this.compile=function(t,e){(p=A.get(t,e)).init(),t.traverse(function(t){t.isLight&&(p.pushLight(t),t.castShadow&&p.pushShadow(t))}),p.setupLights(e);var n={};t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var i=0;i=0&&t.numSupportedMorphTargets++}if(t.morphNormals)for(t.numSupportedMorphNormals=0,h=0;h=0&&t.numSupportedMorphNormals++;var f=i.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(i.numClippingPlanes=et.numPlanes,i.numIntersection=et.numIntersection,f.clippingPlanes=et.uniform),i.fog=e.fog,i.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshToonMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),i.lightsStateVersion=a,i.needsLights&&(f.ambientLightColor.value=r.state.ambient,f.lightProbe.value=r.state.probe,f.directionalLights.value=r.state.directional,f.directionalLightShadows.value=r.state.directionalShadow,f.spotLights.value=r.state.spot,f.spotLightShadows.value=r.state.spotShadow,f.rectAreaLights.value=r.state.rectArea,f.pointLights.value=r.state.point,f.pointLightShadows.value=r.state.pointShadow,f.hemisphereLights.value=r.state.hemi,f.directionalShadowMap.value=r.state.directionalShadowMap,f.directionalShadowMatrix.value=r.state.directionalShadowMatrix,f.spotShadowMap.value=r.state.spotShadowMap,f.spotShadowMatrix.value=r.state.spotShadowMatrix,f.pointShadowMap.value=r.state.pointShadowMap,f.pointShadowMatrix.value=r.state.pointShadowMatrix);var g=i.program.getUniforms(),m=za.seqWithValue(g.seq,f);i.uniformsList=m}function xt(t,e,n,i){b.resetTextureUnits();var r=e.fog,o=n.isMeshStandardMaterial?e.environment:null,a=y.get(n),s=p.state.lights;if(nt&&(it||t!==B)){var c=t===B&&n.id===F;et.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,a,c)}n.version===a.__version?void 0===a.program||n.fog&&a.fog!==r||a.environment!==o||a.needsLights&&a.lightsStateVersion!==s.state.version?St(n,e,i):void 0===a.numClippingPlanes||a.numClippingPlanes===et.numPlanes&&a.numIntersection===et.numIntersection?a.outputEncoding!==k.outputEncoding&&St(n,e,i):St(n,e,i):(St(n,e,i),a.__version=n.version);var l,u,d=!1,f=!1,v=!1,w=a.program,S=w.getUniforms(),x=a.uniforms;if(m.useProgram(w.program)&&(d=!0,f=!0,v=!0),n.id!==F&&(F=n.id,f=!0),d||B!==t){if(S.setValue(h,"projectionMatrix",t.projectionMatrix),g.logarithmicDepthBuffer&&S.setValue(h,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),B!==t&&(B=t,f=!0,v=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){var M=S.map.cameraPosition;void 0!==M&&M.setValue(h,ot.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&S.setValue(h,"isOrthographic",!0===t.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&S.setValue(h,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){S.setOptional(h,i,"bindMatrix"),S.setOptional(h,i,"bindMatrixInverse");var E=i.skeleton;if(E){var A=E.bones;if(g.floatVertexTextures){if(void 0===E.boneTexture){var T=Math.sqrt(4*A.length);T=Kn.ceilPowerOfTwo(T),T=Math.max(T,4);var O=new Float32Array(T*T*4);O.set(E.boneMatrices);var _=new Do(O,T,T,Yt,Bt);E.boneMatrices=O,E.boneTexture=_,E.boneTextureSize=T}S.setValue(h,"boneTexture",E.boneTexture,b),S.setValue(h,"boneTextureSize",E.boneTextureSize)}else S.setOptional(h,E,"boneMatrices")}}return(f||a.receiveShadow!==i.receiveShadow)&&(a.receiveShadow=i.receiveShadow,S.setValue(h,"receiveShadow",i.receiveShadow)),f&&(S.setValue(h,"toneMappingExposure",k.toneMappingExposure),S.setValue(h,"toneMappingWhitePoint",k.toneMappingWhitePoint),a.needsLights&&(u=v,(l=x).ambientLightColor.needsUpdate=u,l.lightProbe.needsUpdate=u,l.directionalLights.needsUpdate=u,l.directionalLightShadows.needsUpdate=u,l.pointLights.needsUpdate=u,l.pointLightShadows.needsUpdate=u,l.spotLights.needsUpdate=u,l.spotLightShadows.needsUpdate=u,l.rectAreaLights.needsUpdate=u,l.hemisphereLights.needsUpdate=u),r&&n.fog&&function(t,e){t.fogColor.value.copy(e.color),e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(x,r),n.isMeshBasicMaterial?Mt(x,n):n.isMeshLambertMaterial?(Mt(x,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(x,n)):n.isMeshToonMaterial?(Mt(x,n),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4),e.gradientMap&&(t.gradientMap.value=e.gradientMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===C&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===C&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(x,n)):n.isMeshPhongMaterial?(Mt(x,n),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===C&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===C&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(x,n)):n.isMeshStandardMaterial?(Mt(x,n,o),n.isMeshPhysicalMaterial?function(t,e,n){Et(t,e,o),t.reflectivity.value=e.reflectivity,t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.sheen&&t.sheen.value.copy(e.sheen),e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap),e.clearcoatNormalMap&&(t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),t.clearcoatNormalMap.value=e.clearcoatNormalMap,e.side===C&&t.clearcoatNormalScale.value.negate()),t.transparency.value=e.transparency}(x,n):Et(x,n,o)):n.isMeshMatcapMaterial?(Mt(x,n),function(t,e){e.matcap&&(t.matcap.value=e.matcap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===C&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===C&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(x,n)):n.isMeshDepthMaterial?(Mt(x,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(x,n)):n.isMeshDistanceMaterial?(Mt(x,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(x,n)):n.isMeshNormalMaterial?(Mt(x,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===C&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===C&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(x,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity}(x,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(x,n)):n.isPointsMaterial?function(t,e){var n;t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*X,t.scale.value=.5*K,e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.map?n=e.map:e.alphaMap&&(n=e.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}(x,n):n.isSpriteMaterial?function(t,e){var n;t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.map?n=e.map:e.alphaMap&&(n=e.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}(x,n):n.isShadowMaterial&&(x.color.value.copy(n.color),x.opacity.value=n.opacity),void 0!==x.ltc_1&&(x.ltc_1.value=jo.LTC_1),void 0!==x.ltc_2&&(x.ltc_2.value=jo.LTC_2),za.upload(h,a.uniformsList,x,b),n.isShaderMaterial&&(n.uniformsNeedUpdate=!1)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(za.upload(h,a.uniformsList,x,b),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&S.setValue(h,"center",i.center),S.setValue(h,"modelViewMatrix",i.modelViewMatrix),S.setValue(h,"normalMatrix",i.normalMatrix),S.setValue(h,"modelMatrix",i.matrixWorld),w}function Mt(t,e,n){t.opacity.value=e.opacity,e.color&&t.diffuse.value.copy(e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap);var i,r,o=e.envMap||n;o&&(t.envMap.value=o,t.flipEnvMap.value=o.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=y.get(o).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?i=e.map:e.specularMap?i=e.specularMap:e.displacementMap?i=e.displacementMap:e.normalMap?i=e.normalMap:e.bumpMap?i=e.bumpMap:e.roughnessMap?i=e.roughnessMap:e.metalnessMap?i=e.metalnessMap:e.alphaMap?i=e.alphaMap:e.emissiveMap&&(i=e.emissiveMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),e.aoMap?r=e.aoMap:e.lightMap&&(r=e.lightMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uv2Transform.value.copy(r.matrix))}function Et(t,e,n){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===C&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===C&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),(e.envMap||n)&&(t.envMapIntensity.value=e.envMapIntensity)}yt.setAnimationLoop(function(t){ut.isPresenting||vt&&vt(t)}),"undefined"!=typeof window&&yt.setContext(window),this.setAnimationLoop=function(t){vt=t,ut.setAnimationLoop(t),yt.start()},this.render=function(t,e){var n,i;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),i=arguments[3]),e&&e.isCamera){if(!D){U.geometry=null,U.program=null,U.wireframe=!1,F=-1,B=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),ut.enabled&&ut.isPresenting&&(e=ut.getCamera(e)),(p=A.get(t,e)).init(),t.onBeforeRender(k,t,e,n||j),rt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),tt.setFromProjectionMatrix(rt),it=this.localClippingEnabled,nt=et.init(this.clippingPlanes,it,e),(d=E.get(t,e)).init(),function t(e,n,i,r){if(!1!==e.visible){if(e.layers.test(n.layers))if(e.isGroup)i=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(n);else if(e.isLight)p.pushLight(e),e.castShadow&&p.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||tt.intersectsSprite(e)){r&&ot.setFromMatrixPosition(e.matrixWorld).applyMatrix4(rt);var o=x.update(e);(a=e.material).visible&&d.push(e,o,a,i,ot.z,null)}}else if(e.isImmediateRenderObject)r&&ot.setFromMatrixPosition(e.matrixWorld).applyMatrix4(rt),d.push(e,null,e.material,i,ot.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==v.render.frame&&(e.skeleton.update(),e.skeleton.frame=v.render.frame),!e.frustumCulled||tt.intersectsObject(e))){r&&ot.setFromMatrixPosition(e.matrixWorld).applyMatrix4(rt),o=x.update(e);var a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,l=s.length;c=0&&e<=t.width-i&&n>=0&&n<=t.height-r&&h.readPixels(e,n,i,r,I.convert(u),I.convert(d),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{c&&h.bindFramebuffer(36160,V)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){void 0===n&&(n=0);var i=Math.pow(2,-n),r=Math.floor(e.image.width*i),o=Math.floor(e.image.height*i),a=I.convert(e.format);b.setTexture2D(e,0),h.copyTexImage2D(3553,n,a,t.x,t.y,r,o,0),m.unbindTexture()},this.copyTextureToTexture=function(t,e,n,i){var r=e.image.width,o=e.image.height,a=I.convert(n.format),s=I.convert(n.type);b.setTexture2D(n,0),e.isDataTexture?h.texSubImage2D(3553,i||0,t.x,t.y,r,o,a,s,e.image.data):h.texSubImage2D(3553,i||0,t.x,t.y,a,s,e.image),m.unbindTexture()},this.initTexture=function(t){b.setTexture2D(t,0),m.unbindTexture()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Cs(t,e){this.name="",this.color=new xr(t),this.density=void 0!==e?e:25e-5}function As(t,e,n){this.name="",this.color=new xr(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function Ts(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Rn,this.updateRange={offset:0,count:-1},this.version=0}gs.prototype=Object.create(Or.prototype),gs.prototype.constructor=gs,gs.prototype.isMeshDepthMaterial=!0,gs.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},ms.prototype=Object.create(Or.prototype),ms.prototype.constructor=ms,ms.prototype.isMeshDistanceMaterial=!0,ms.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Ss.prototype=Object.assign(Object.create(Po.prototype),{constructor:Ss,isArrayCamera:!0}),xs.prototype=Object.assign(Object.create(Ii.prototype),{constructor:xs,isGroup:!0}),Object.assign(Ms.prototype,Gn.prototype),Object.assign(Cs.prototype,{isFogExp2:!0,clone:function(){return new Cs(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(As.prototype,{isFog:!0,clone:function(){return new As(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),Object.defineProperty(Ts.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Ts.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(t){return this.usage=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var i=0,r=this.stride;it.far||e.push({distance:s,point:ks.clone(),uv:yr.getUV(ks,Vs,Fs,Us,Bs,zs,Gs,new Xn),face:null,object:this})}},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Ii.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}});var qs=new oi,Ks=new oi;function Xs(){Ii.call(this),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function Ys(t,e){t&&t.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),go.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new hi,this.bindMatrixInverse=new hi}Xs.prototype=Object.assign(Object.create(Ii.prototype),{constructor:Xs,isLOD:!0,copy:function(t){Ii.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,i=e.length;n0){for(var n=1,i=e.length;n0){qs.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(qs);this.getObjectForDistance(n).raycast(t,e)}},update:function(t){var e=this.levels;if(e.length>1){qs.setFromMatrixPosition(t.matrixWorld),Ks.setFromMatrixPosition(this.matrixWorld);var n=qs.distanceTo(Ks)/t.zoom;e[0].object.visible=!0;for(var i=1,r=e.length;i=e[i].distance;i++)e[i-1].object.visible=!1,e[i].object.visible=!0;for(this._currentLevel=i-1;i0&&(nc[0].instanceId=r,nc[0].object=this,e.push(nc[0]),nc.length=0)},setMatrixAt:function(t,e){e.toArray(this.instanceMatrix.array,16*t)},updateMorphTargets:function(){}}),oc.prototype=Object.create(Or.prototype),oc.prototype.constructor=oc,oc.prototype.isLineBasicMaterial=!0,oc.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this};var ac=new oi,sc=new oi,cc=new hi,lc=new ir,uc=new Yi;function dc(t,e,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),Ii.call(this),this.type="Line",this.geometry=void 0!==t?t:new Zr,this.material=void 0!==e?e:new oc}dc.prototype=Object.assign(Object.create(Ii.prototype),{constructor:dc,isLine:!0,computeLineDistances:function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],i=1,r=e.count;ia||(u.applyMatrix4(this.matrixWorld),(S=t.ray.origin.distanceTo(u))t.far||e.push({distance:S,point:l.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,m=h.length/3-1;ga||(u.applyMatrix4(this.matrixWorld),(S=t.ray.origin.distanceTo(u))t.far||e.push({distance:S,point:l.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(n.isGeometry){var b=n.vertices,w=b.length;for(g=0;ga||(u.applyMatrix4(this.matrixWorld),(S=t.ray.origin.distanceTo(u))t.far||e.push({distance:S,point:l.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var pc=new oi,hc=new oi;function fc(t,e){dc.call(this,t,e),this.type="LineSegments"}function gc(t,e){dc.call(this,t,e),this.type="LineLoop"}function mc(t){Or.call(this),this.type="PointsMaterial",this.color=new xr(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(t)}fc.prototype=Object.assign(Object.create(dc.prototype),{constructor:fc,isLineSegments:!0,computeLineDistances:function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[],i=0,r=e.count;ir.far)return;o.push({distance:l,distanceToRay:Math.sqrt(s),point:c,index:e,face:null,object:a})}}function Mc(t,e,n,i,r,o,a,s,c){Qn.call(this,t,e,n,i,r,o,a,s,c),this.format=void 0!==a?a:Xt,this.minFilter=void 0!==o?o:Pt,this.magFilter=void 0!==r?r:Pt,this.generateMipmaps=!1}function Ec(t,e,n,i,r,o,a,s,c,l,u,d){Qn.call(this,null,o,a,s,c,l,i,r,u,d),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Cc(t,e,n,i,r,o,a,s,c){Qn.call(this,t,e,n,i,r,o,a,s,c),this.needsUpdate=!0}function Ac(t,e,n,i,r,o,a,s,c,l){if((l=void 0!==l?l:$t)!==$t&&l!==te)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===$t&&(n=Vt),void 0===n&&l===te&&(n=qt),Qn.call(this,null,i,r,o,a,s,l,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:Ct,this.minFilter=void 0!==s?s:Ct,this.flipY=!1,this.generateMipmaps=!1}function Tc(t){Zr.call(this),this.type="WireframeGeometry";var e,n,i,r,o,a,s,c,l,u,d=[],p=[0,0],h={},f=["a","b","c"];if(t&&t.isGeometry){var g=t.faces;for(e=0,i=g.length;e=0?(t(v-l,m,p),h.subVectors(d,p)):(t(v+l,m,p),h.subVectors(p,d)),m-l>=0?(t(v,m-l,p),f.subVectors(d,p)):(t(v,m+l,p),f.subVectors(p,d)),u.crossVectors(h,f).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(i=0;i.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),i<.2&&(o[t+4]+=1))}}()}(),this.setAttribute("position",new Fr(r,3)),this.setAttribute("normal",new Fr(r.slice(),3)),this.setAttribute("uv",new Fr(o,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}function kc(t,e){xo.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Dc(t,e)),this.mergeVertices()}function Dc(t,e){Ic.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Rc(t,e){xo.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Lc(t,e)),this.mergeVertices()}function Lc(t,e){Ic.call(this,[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],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Nc(t,e){xo.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new jc(t,e)),this.mergeVertices()}function jc(t,e){var n=(1+Math.sqrt(5))/2,i=[-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];Ic.call(this,i,[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],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Vc(t,e){xo.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Fc(t,e)),this.mergeVertices()}function Fc(t,e){var n=(1+Math.sqrt(5))/2,i=1/n,r=[-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];Ic.call(this,r,[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,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Uc(t,e,n,i,r,o){xo.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:i,closed:r},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new Bc(t,e,n,i,r);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function Bc(t,e,n,i,r){Zr.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:i,closed:r},e=e||64,n=n||1,i=i||8,r=r||!1;var o=t.computeFrenetFrames(e,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new oi,l=new oi,u=new Xn,d=new oi,p=[],h=[],f=[],g=[];function m(r){d=t.getPointAt(r/e,d);var a=o.normals[r],u=o.binormals[r];for(s=0;s<=i;s++){var f=s/i*Math.PI*2,g=Math.sin(f),m=-Math.cos(f);l.x=m*a.x+g*u.x,l.y=m*a.y+g*u.y,l.z=m*a.z+g*u.z,l.normalize(),h.push(l.x,l.y,l.z),c.x=d.x+n*l.x,c.y=d.y+n*l.y,c.z=d.z+n*l.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a0){var a=r[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Mc.prototype=Object.assign(Object.create(Qn.prototype),{constructor:Mc,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Ec.prototype=Object.create(Qn.prototype),Ec.prototype.constructor=Ec,Ec.prototype.isCompressedTexture=!0,Cc.prototype=Object.create(Qn.prototype),Cc.prototype.constructor=Cc,Cc.prototype.isCanvasTexture=!0,Ac.prototype=Object.create(Qn.prototype),Ac.prototype.constructor=Ac,Ac.prototype.isDepthTexture=!0,Tc.prototype=Object.create(Zr.prototype),Tc.prototype.constructor=Tc,Oc.prototype=Object.create(xo.prototype),Oc.prototype.constructor=Oc,_c.prototype=Object.create(Zr.prototype),_c.prototype.constructor=_c,Pc.prototype=Object.create(xo.prototype),Pc.prototype.constructor=Pc,Ic.prototype=Object.create(Zr.prototype),Ic.prototype.constructor=Ic,kc.prototype=Object.create(xo.prototype),kc.prototype.constructor=kc,Dc.prototype=Object.create(Ic.prototype),Dc.prototype.constructor=Dc,Rc.prototype=Object.create(xo.prototype),Rc.prototype.constructor=Rc,Lc.prototype=Object.create(Ic.prototype),Lc.prototype.constructor=Lc,Nc.prototype=Object.create(xo.prototype),Nc.prototype.constructor=Nc,jc.prototype=Object.create(Ic.prototype),jc.prototype.constructor=jc,Vc.prototype=Object.create(xo.prototype),Vc.prototype.constructor=Vc,Fc.prototype=Object.create(Ic.prototype),Fc.prototype.constructor=Fc,Uc.prototype=Object.create(xo.prototype),Uc.prototype.constructor=Uc,Bc.prototype=Object.create(Zr.prototype),Bc.prototype.constructor=Bc,Bc.prototype.toJSON=function(){var t=Zr.prototype.toJSON.call(this);return t.path=this.parameters.path.toJSON(),t},zc.prototype=Object.create(xo.prototype),zc.prototype.constructor=zc,Gc.prototype=Object.create(Zr.prototype),Gc.prototype.constructor=Gc,Hc.prototype=Object.create(xo.prototype),Hc.prototype.constructor=Hc,Wc.prototype=Object.create(Zr.prototype),Wc.prototype.constructor=Wc;function qc(t,e,n,i,r){var o,a;if(r===function(t,e,n,i){for(var r=0,o=e,a=n-i;o0)for(o=e;o=e;o-=i)a=ul(o,t[o],t[o+1],a);return a&&al(a,a.next)&&(dl(a),a=a.next),a}function Kc(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!al(i,i.next)&&0!==ol(i.prev,i,i.next))i=i.next;else{if(dl(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function Xc(t,e,n,i,r,o,a){if(t){!a&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=el(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,c,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||c>0&&i;)0!==s&&(0===c||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,c--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,l*=2}while(a>1)}(r)}(t,i,r,o);for(var s,c,l=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Zc(t,i,r,o):Yc(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),dl(t),t=c.next,l=c.next;else if((t=c)===l){a?1===a?Xc(t=Jc(t,e,n),e,n,i,r,o,2):2===a&&Qc(t,e,n,i,r,o):Xc(Kc(t),e,n,i,r,o,1);break}}}function Yc(t){var e=t.prev,n=t,i=t.next;if(ol(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(il(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&ol(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Zc(t,e,n,i){var r=t.prev,o=t,a=t.next;if(ol(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,u=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,d=el(s,c,e,n,i),p=el(l,u,e,n,i),h=t.prevZ,f=t.nextZ;h&&h.z>=d&&f&&f.z<=p;){if(h!==t.prev&&h!==t.next&&il(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&ol(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,f!==t.prev&&f!==t.next&&il(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&ol(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;h&&h.z>=d;){if(h!==t.prev&&h!==t.next&&il(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&ol(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;f&&f.z<=p;){if(f!==t.prev&&f!==t.next&&il(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&ol(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Jc(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!al(r,o)&&sl(r,i,i.next,o)&&cl(r,o)&&cl(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),dl(i),dl(i.next),i=t=o),i=i.next}while(i!==t);return i}function Qc(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&rl(a,s)){var c=ll(a,s);return a=Kc(a,a.next),c=Kc(c,c.next),Xc(a,e,n,i,r,o),void Xc(c,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function $c(t,e){return t.x-e.x}function tl(t,e){if(e=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=u&&r!==i.x&&il(on.x)&&cl(i,t)&&(n=i,p=c),i=i.next;return n}(t,e)){var n=ll(e,t);Kc(n,n.next)}}function el(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function nl(t){var e=t,n=t;do{(e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function rl(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&sl(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&cl(t,e)&&cl(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.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!==t);return i}(t,e)}function ol(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function al(t,e){return t.x===e.x&&t.y===e.y}function sl(t,e,n,i){return!!(al(t,n)&&al(e,i)||al(t,i)&&al(n,e))||ol(t,e,n)>0!=ol(t,e,i)>0&&ol(n,i,t)>0!=ol(n,i,e)>0}function cl(t,e){return ol(t.prev,t,t.next)<0?ol(t,e,t.next)>=0&&ol(t,t.prev,e)>=0:ol(t,e,t.prev)<0||ol(t,t.next,e)<0}function ll(t,e){var n=new pl(t.i,t.x,t.y),i=new pl(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function ul(t,e,n,i){var r=new pl(t,e,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 dl(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function pl(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var hl={area:function(t){for(var e=t.length,n=0,i=e-1,r=0;r80*n){i=o=t[0],r=a=t[1];for(var f=n;fo&&(o=s),c>a&&(a=c);l=0!==(l=Math.max(o-i,a-r))?1/l:0}return Xc(p,h,n,i,r,l),h}(n,i);for(a=0;a2&&t[e-1].equals(t[0])&&t.pop()}function gl(t,e){for(var n=0;nNumber.EPSILON){var p=Math.sqrt(u),h=Math.sqrt(c*c+l*l),f=e.x-s/p,g=e.y+a/p,m=((n.x-l/h-f)*l-(n.y+c/h-g)*c)/(a*l-s*c),v=(i=f+a*m-t.x)*i+(r=g+s*m-t.y)*r;if(v<=2)return new Xn(i,r);o=Math.sqrt(v/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(l)&&(y=!0),y?(i=-s,r=a,o=Math.sqrt(u)):(i=a,r=s,o=Math.sqrt(u/2))}return new Xn(i/o,r/o)}for(var U=[],B=0,z=_.length,G=z-1,H=B+1;B=0;I--){for(D=I/h,R=u*Math.cos(D*Math.PI/2),k=d*Math.sin(D*Math.PI/2)+p,B=0,z=_.length;B=0;){n=B,(i=B-1)<0&&(i=t.length-1);var r=0,o=s+2*h;for(r=0;r0)&&f.push(x,M,C),(c!==n-1||l0&&v(!0),e>0&&v(!1)),this.setIndex(l),this.setAttribute("position",new Fr(u,3)),this.setAttribute("normal",new Fr(d,3)),this.setAttribute("uv",new Fr(p,2))}function Rl(t,e,n,i,r,o,a){kl.call(this,0,t,e,n,i,r,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:o,thetaLength:a}}function Ll(t,e,n,i,r,o,a){Dl.call(this,0,t,e,n,i,r,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:o,thetaLength:a}}function Nl(t,e,n,i){xo.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:i},this.fromBufferGeometry(new jl(t,e,n,i)),this.mergeVertices()}function jl(t,e,n,i){Zr.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:i},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,i=void 0!==i?i:2*Math.PI;var r,o,a=[],s=[],c=[],l=[],u=new oi,d=new Xn;for(s.push(0,0,0),c.push(0,0,1),l.push(.5,.5),o=0,r=3;o<=e;o++,r+=3){var p=n+o/e*i;u.x=t*Math.cos(p),u.y=t*Math.sin(p),s.push(u.x,u.y,u.z),c.push(0,0,1),d.x=(s[r]/t+1)/2,d.y=(s[r+1]/t+1)/2,l.push(d.x,d.y)}for(r=1;r<=e;r++)a.push(r,r+1,0);this.setIndex(a),this.setAttribute("position",new Fr(s,3)),this.setAttribute("normal",new Fr(c,3)),this.setAttribute("uv",new Fr(l,2))}wl.prototype=Object.create(xo.prototype),wl.prototype.constructor=wl,Sl.prototype=Object.create(vl.prototype),Sl.prototype.constructor=Sl,xl.prototype=Object.create(xo.prototype),xl.prototype.constructor=xl,Ml.prototype=Object.create(Zr.prototype),Ml.prototype.constructor=Ml,El.prototype=Object.create(xo.prototype),El.prototype.constructor=El,Cl.prototype=Object.create(Zr.prototype),Cl.prototype.constructor=Cl,Al.prototype=Object.create(xo.prototype),Al.prototype.constructor=Al,Tl.prototype=Object.create(Zr.prototype),Tl.prototype.constructor=Tl,Ol.prototype=Object.create(xo.prototype),Ol.prototype.constructor=Ol,Ol.prototype.toJSON=function(){var t=xo.prototype.toJSON.call(this);return Pl(this.parameters.shapes,t)},_l.prototype=Object.create(Zr.prototype),_l.prototype.constructor=_l,_l.prototype.toJSON=function(){var t=Zr.prototype.toJSON.call(this);return Pl(this.parameters.shapes,t)},Il.prototype=Object.create(Zr.prototype),Il.prototype.constructor=Il,kl.prototype=Object.create(xo.prototype),kl.prototype.constructor=kl,Dl.prototype=Object.create(Zr.prototype),Dl.prototype.constructor=Dl,Rl.prototype=Object.create(kl.prototype),Rl.prototype.constructor=Rl,Ll.prototype=Object.create(Dl.prototype),Ll.prototype.constructor=Ll,Nl.prototype=Object.create(xo.prototype),Nl.prototype.constructor=Nl,jl.prototype=Object.create(Zr.prototype),jl.prototype.constructor=jl;var Vl=Object.freeze({__proto__:null,WireframeGeometry:Tc,ParametricGeometry:Oc,ParametricBufferGeometry:_c,TetrahedronGeometry:kc,TetrahedronBufferGeometry:Dc,OctahedronGeometry:Rc,OctahedronBufferGeometry:Lc,IcosahedronGeometry:Nc,IcosahedronBufferGeometry:jc,DodecahedronGeometry:Vc,DodecahedronBufferGeometry:Fc,PolyhedronGeometry:Pc,PolyhedronBufferGeometry:Ic,TubeGeometry:Uc,TubeBufferGeometry:Bc,TorusKnotGeometry:zc,TorusKnotBufferGeometry:Gc,TorusGeometry:Hc,TorusBufferGeometry:Wc,TextGeometry:wl,TextBufferGeometry:Sl,SphereGeometry:xl,SphereBufferGeometry:Ml,RingGeometry:El,RingBufferGeometry:Cl,PlaneGeometry:Fo,PlaneBufferGeometry:Uo,LatheGeometry:Al,LatheBufferGeometry:Tl,ShapeGeometry:Ol,ShapeBufferGeometry:_l,ExtrudeGeometry:ml,ExtrudeBufferGeometry:vl,EdgesGeometry:Il,ConeGeometry:Rl,ConeBufferGeometry:Ll,CylinderGeometry:kl,CylinderBufferGeometry:Dl,CircleGeometry:Nl,CircleBufferGeometry:jl,BoxGeometry:Mo,BoxBufferGeometry:Eo});function Fl(t){Or.call(this),this.type="ShadowMaterial",this.color=new xr(0),this.transparent=!0,this.setValues(t)}function Ul(t){Oo.call(this,t),this.type="RawShaderMaterial"}function Bl(t){Or.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new xr(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 xr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Xn(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.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.vertexTangents=!1,this.setValues(t)}function zl(t){Bl.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Xn(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,this.sheen=null,this.transparency=0,this.setValues(t)}function Gl(t){Or.call(this),this.type="MeshPhongMaterial",this.color=new xr(16777215),this.specular=new xr(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new xr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ot,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Hl(t){Or.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new xr(16777215),this.specular=new xr(1118481),this.shininess=30,this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new xr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Wl(t){Or.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function ql(t){Or.call(this),this.type="MeshLambertMaterial",this.color=new xr(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new xr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ot,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Kl(t){Or.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new xr(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Xn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Xl(t){oc.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}Fl.prototype=Object.create(Or.prototype),Fl.prototype.constructor=Fl,Fl.prototype.isShadowMaterial=!0,Fl.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.color.copy(t.color),this},Ul.prototype=Object.create(Oo.prototype),Ul.prototype.constructor=Ul,Ul.prototype.isRawShaderMaterial=!0,Bl.prototype=Object.create(Or.prototype),Bl.prototype.constructor=Bl,Bl.prototype.isMeshStandardMaterial=!0,Bl.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.vertexTangents=t.vertexTangents,this},zl.prototype=Object.create(Bl.prototype),zl.prototype.constructor=zl,zl.prototype.isMeshPhysicalMaterial=!0,zl.prototype.copy=function(t){return Bl.prototype.copy.call(this,t),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.reflectivity=t.reflectivity,t.sheen?this.sheen=(this.sheen||new xr).copy(t.sheen):this.sheen=null,this.transparency=t.transparency,this},Gl.prototype=Object.create(Or.prototype),Gl.prototype.constructor=Gl,Gl.prototype.isMeshPhongMaterial=!0,Gl.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Hl.prototype=Object.create(Or.prototype),Hl.prototype.constructor=Hl,Hl.prototype.isMeshToonMaterial=!0,Hl.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Wl.prototype=Object.create(Or.prototype),Wl.prototype.constructor=Wl,Wl.prototype.isMeshNormalMaterial=!0,Wl.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},ql.prototype=Object.create(Or.prototype),ql.prototype.constructor=ql,ql.prototype.isMeshLambertMaterial=!0,ql.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Kl.prototype=Object.create(Or.prototype),Kl.prototype.constructor=Kl,Kl.prototype.isMeshMatcapMaterial=!0,Kl.prototype.copy=function(t){return Or.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Xl.prototype=Object.create(oc.prototype),Xl.prototype.constructor=Xl,Xl.prototype.isLineDashedMaterial=!0,Xl.prototype.copy=function(t){return oc.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Yl=Object.freeze({__proto__:null,ShadowMaterial:Fl,SpriteMaterial:Is,RawShaderMaterial:Ul,ShaderMaterial:Oo,PointsMaterial:mc,MeshPhysicalMaterial:zl,MeshStandardMaterial:Bl,MeshPhongMaterial:Gl,MeshToonMaterial:Hl,MeshNormalMaterial:Wl,MeshLambertMaterial:ql,MeshDepthMaterial:gs,MeshDistanceMaterial:ms,MeshBasicMaterial:_r,MeshMatcapMaterial:Kl,LineDashedMaterial:Xl,LineBasicMaterial:oc,Material:Or}),Zl={arraySlice:function(t,e,n){return Zl.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),i=0;i!==e;++i)n[i]=i;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var i=t.length,r=new t.constructor(i),o=0,a=0;a!==i;++o)for(var s=n[o]*e,c=0;c!==e;++c)r[a++]=t[s+c];return r},flattenJSON:function(t,e,n,i){for(var r=1,o=t[0];void 0!==o&&void 0===o[i];)o=t[r++];if(void 0!==o){var a=o[i];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[i])&&(e.push(o.time),n.push.apply(n,a)),o=t[r++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[i])&&(e.push(o.time),a.toArray(n,n.length)),o=t[r++]}while(void 0!==o);else do{void 0!==(a=o[i])&&(e.push(o.time),n.push(a)),o=t[r++]}while(void 0!==o)}},subclip:function(t,e,n,i,r){r=r||30;var o=t.clone();o.name=e;for(var a=[],s=0;s=i)){u.push(c.times[p]);for(var f=0;fo.tracks[s].times[0]&&(g=o.tracks[s].times[0]);for(s=0;s=r)break t;var s=e[1];for(t=(r=e[--n-1]))break e}o=n,n=0}for(;n>>1;te;)--o;if(++o,0!==r||o!==i){r>=o&&(r=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Zl.arraySlice(n,r,o),this.values=Zl.arraySlice(this.values,r*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==r;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==i&&Zl.isTypedArray(i)){a=0;for(var c=i.length;a!==c;++a){var l=i[a];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,l),t=!1;break}}}return t},optimize:function(){for(var t=Zl.arraySlice(this.times),e=Zl.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===Qe,r=1,o=t.length-1,a=1;a0){for(t[r]=t[o],f=o*n,g=r*n,p=0;p!==n;++p)e[g+p]=e[f+p];++r}return r!==t.length?(this.times=Zl.arraySlice(t,0,r),this.values=Zl.arraySlice(e,0,r*n)):(this.times=t,this.values=e),this},clone:function(){var t=Zl.arraySlice(this.times,0),e=Zl.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}),nu.prototype=Object.assign(Object.create(eu.prototype),{constructor:nu,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Ze,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),iu.prototype=Object.assign(Object.create(eu.prototype),{constructor:iu,ValueTypeName:"color"}),ru.prototype=Object.assign(Object.create(eu.prototype),{constructor:ru,ValueTypeName:"number"}),ou.prototype=Object.assign(Object.create(Jl.prototype),{constructor:ou,interpolate_:function(t,e,n,i){for(var r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(i-e),l=s+a;s!==l;s+=4)ni.slerpFlat(r,0,o,s-a,o,s,c);return r}}),au.prototype=Object.assign(Object.create(eu.prototype),{constructor:au,ValueTypeName:"quaternion",DefaultInterpolation:Je,InterpolantFactoryMethodLinear:function(t){return new ou(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),su.prototype=Object.assign(Object.create(eu.prototype),{constructor:su,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Ze,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),cu.prototype=Object.assign(Object.create(eu.prototype),{constructor:cu,ValueTypeName:"vector"}),Object.assign(lu,{parse:function(t){for(var e=[],n=t.tracks,i=1/(t.fps||1),r=0,o=n.length;r!==o;++r)e.push(uu(n[r]).scale(i));return new lu(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid},r=0,o=n.length;r!==o;++r)e.push(eu.toJSON(n[r]));return i},CreateFromMorphTargetSequence:function(t,e,n,i){for(var r=e.length,o=[],a=0;a1){var l=i[d=c[1]];l||(i[d]=l=[]),l.push(s)}}var u=[];for(var d in i)u.push(lu.CreateFromMorphTargetSequence(d,i[d],e,n));return u},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,i,r){if(0!==n.length){var o=[],a=[];Zl.flattenJSON(n,o,a,i),0!==o.length&&r.push(new t(e,o,a))}},i=[],r=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c0||0===t.search(/^data\:image\/jpeg/);r.format=i?Xt:Yt,r.needsUpdate=!0,void 0!==e&&e(r)},n,i),r}}),Object.assign(Mu.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,i=[],r=this.getPoint(0),o=0;for(i.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(r),i.push(o),r=e;return this.cacheArcLengths=i,i},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,i=this.getLengths(),r=0,o=i.length;n=e||t*i[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=i[r=Math.floor(s+(c-s)/2)]-n)<0)s=r+1;else{if(!(a>0)){c=r;break}c=r-1}if(i[r=c]===n)return r/(o-1);var l=i[r];return(r+(n-l)/(i[r+1]-l))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var i=this.getPoint(e);return this.getPoint(n).clone().sub(i).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,i,r,o=new oi,a=[],s=[],c=[],l=new oi,u=new hi;for(n=0;n<=t;n++)i=n/t,a[n]=this.getTangentAt(i),a[n].normalize();s[0]=new oi,c[0]=new oi;var d=Number.MAX_VALUE,p=Math.abs(a[0].x),h=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=d&&(d=p,o.set(1,0,0)),h<=d&&(d=h,o.set(0,1,0)),f<=d&&o.set(0,0,1),l.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],l),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),l.crossVectors(a[n-1],a[n]),l.length()>Number.EPSILON&&(l.normalize(),r=Math.acos(Kn.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(u.makeRotationAxis(l,r))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(r=Math.acos(Kn.clamp(s[0].dot(s[t]),-1,1)),r/=t,a[0].dot(l.crossVectors(s[0],s[t]))>0&&(r=-r),n=1;n<=t;n++)s[n].applyMatrix4(u.makeRotationAxis(a[n],r*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Eu.prototype=Object.create(Mu.prototype),Eu.prototype.constructor=Eu,Eu.prototype.isEllipseCurve=!0,Eu.prototype.getPoint=function(t,e){for(var n=e||new Xn,i=2*Math.PI,r=this.aEndAngle-this.aStartAngle,o=Math.abs(r)i;)r-=i;r0?0:(Math.floor(Math.abs(u)/c)+1)*c:0===d&&u===c-1&&(u=c-2,d=1),this.closed||u>0?n=s[(u-1)%c]:(Tu.subVectors(s[0],s[1]).add(s[0]),n=Tu),i=s[u%c],r=s[(u+1)%c],this.closed||u+2i.length-2?i.length-1:o+1],u=i[o>i.length-3?i.length-1:o+2];return n.set(ku(a,s.x,c.x,l.x,u.x),ku(a,s.y,c.y,l.y,u.y)),n},Bu.prototype.copy=function(t){Mu.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e=e){var r=n[i]-e,o=this.curves[i],a=o.getLength(),s=0===a?0:1-r/a;return o.getPointAt(s)}i++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,i=this.curves.length;n1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Mu.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e0){var l=c.getPoint(0);l.equals(this.currentPoint)||this.lineTo(l.x,l.y)}this.curves.push(c);var u=c.getPoint(1);return this.currentPoint.copy(u),this},copy:function(t){return Gu.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Gu.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Gu.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Wu.prototype=Object.assign(Object.create(Hu.prototype),{constructor:Wu,getPointsHoles:function(t){for(var e=[],n=0,i=this.holes.length;n0:i.vertexColors=t.vertexColors),void 0!==t.uniforms)for(var r in t.uniforms){var o=t.uniforms[r];switch(i.uniforms[r]={},o.type){case"t":i.uniforms[r].value=n(o.value);break;case"c":i.uniforms[r].value=(new xr).setHex(o.value);break;case"v2":i.uniforms[r].value=(new Xn).fromArray(o.value);break;case"v3":i.uniforms[r].value=(new oi).fromArray(o.value);break;case"v4":i.uniforms[r].value=(new $n).fromArray(o.value);break;case"m3":i.uniforms[r].value=(new Yn).fromArray(o.value);case"m4":i.uniforms[r].value=(new hi).fromArray(o.value);break;default:i.uniforms[r].value=o.value}}if(void 0!==t.defines&&(i.defines=t.defines),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.extensions)for(var a in t.extensions)i.extensions[a]=t.extensions[a];if(void 0!==t.shading&&(i.flatShading=1===t.shading),void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=n(t.map)),void 0!==t.matcap&&(i.matcap=n(t.matcap)),void 0!==t.alphaMap&&(i.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(i.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(i.normalMapType=t.normalMapType),void 0!==t.normalScale){var s=t.normalScale;!1===Array.isArray(s)&&(s=[s,s]),i.normalScale=(new Xn).fromArray(s)}return void 0!==t.displacementMap&&(i.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=n(t.specularMap)),void 0!==t.envMap&&(i.envMap=n(t.envMap)),void 0!==t.envMapIntensity&&(i.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(i.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(i.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(i.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(i.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(i.clearcoatNormalScale=(new Xn).fromArray(t.clearcoatNormalScale)),i},setTextures:function(t){return this.textures=t,this}});var od={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,i=t.length;n0){var o=new wu(new pu(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;aNumber.EPSILON){if(l<0&&(a=e[o],c=-c,s=e[r],l=-l),t.ys.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var u=l*(t.x-a.x)-c*(t.y-a.y);if(0===u)return!0;if(u<0)continue;i=!i}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return i}var r=hl.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,l=[];if(1===o.length)return s=o[0],(c=new Wu).curves=s.curves,l.push(c),l;var u=!r(o[0].getPoints());u=t?!u:u;var d,p,h=[],f=[],g=[],m=0;f[m]=void 0,g[m]=[];for(var v=0,y=o.length;v1){for(var b=!1,w=[],S=0,x=f.length;S0&&(b||(g=h))}v=0;for(var O=f.length;v0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t=.5)for(var o=0;o!==r;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,i){ni.slerpFlat(t,e,t,e,t,n,i)},_lerp:function(t,e,n,i,r){for(var o=1-i,a=0;a!==r;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*i}}});var Gd=new RegExp("[\\[\\]\\.:\\/]","g"),Hd="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Wd=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),qd=/(WCOD+)?/.source.replace("WCOD",Hd),Kd=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Xd=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Yd=new RegExp("^"+Wd+qd+Kd+Xd+"$"),Zd=["material","materials","bones"];function Jd(t,e,n){var i=n||Qd.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Qd(t,e,n){this.path=e,this.parsedPath=n||Qd.parseTrackName(e),this.node=Qd.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function $d(){this.uuid=Kn.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var i=this;this.stats={objects:{get total(){return i._objects.length},get inUse(){return this.total-i.nCachedObjects_}},get bindingsPerObject(){return i._bindings.length}}}function tp(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var i=e.tracks,r=i.length,o=new Array(r),a={endingStart:$e,endingEnd:$e},s=0;s!==r;++s){var c=i[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Xe,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}function ep(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function np(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function ip(t,e,n){Ts.call(this,t,e),this.meshPerAttribute=n||1}function rp(t,e,n,i){this.ray=new ir(t,e),this.near=n||0,this.far=i||1/0,this.camera=null,this.layers=new vi,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function op(t,e){return t.distance-e.distance}function ap(t,e,n,i){if(t.layers.test(e.layers)&&t.raycast(e,n),!0===i)for(var r=t.children,o=0,a=r.length;o=e){var u=e++,d=t[u];n[d.uuid]=l,t[l]=d,n[c]=u,t[u]=s;for(var p=0,h=r;p!==h;++p){var f=i[p],g=f[u],m=f[l];f[l]=g,f[u]=m}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,i=this._indicesByUUID,r=this._bindings,o=r.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,l=i[c];if(void 0!==l)if(delete i[c],l0)for(var c=this._interpolants,l=this._propertyBindings,u=0,d=c.length;u!==d;++u)c[u].evaluate(a),l[u].accumulate(i,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;null!==n&&(e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t,n=this._clip.duration,i=this.loop,r=this._loopCount,o=i===Ye;if(0===t)return-1===r?e:o&&1==(1&r)?n-e:e;if(i===Ke){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0)){this.time=e;break t}e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=e,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,r+=Math.abs(a);var s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this.time=e,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=e,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=e;if(o&&1==(1&r))return n-e}return e},_setEndings:function(t,e,n){var i=this._interpolantSettings;n?(i.endingStart=tn,i.endingEnd=tn):(i.endingStart=t?this.zeroSlopeAtStart?tn:$e:en,i.endingEnd=e?this.zeroSlopeAtEnd?tn:$e:en)},_scheduleFading:function(t,e,n){var i=this._mixer,r=i.time,o=this._weightInterpolant;null===o&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=r,s[0]=e,a[1]=r+t,s[1]=n,this}}),ep.prototype=Object.assign(Object.create(Gn.prototype),{constructor:ep,_bindAction:function(t,e){var n=t._localRoot||this._root,i=t._clip.tracks,r=i.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];void 0===l&&(l={},c[s]=l);for(var u=0;u!==r;++u){var d=i[u],p=d.name,h=l[p];if(void 0!==h)o[u]=h;else{if(void 0!==(h=o[u])){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,s,p));continue}var f=e&&e._propertyBindings[u].binding.parsedPath;++(h=new zd(Qd.create(n,p,f),d.ValueTypeName,d.getValueSize())).referenceCount,this._addInactiveBinding(h,s,p),o[u]=h}a[u].resultBuffer=h.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,i=this._actionsByClip[n];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,n,e)}for(var r=t._propertyBindings,o=0,a=r.length;o!==a;++o){var s=r[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,i=e.length;n!==i;++n){var r=e[n];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&ethis.max.x||t.ythis.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new Xn),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new Xn),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(t){return lp.copy(t).clamp(this.min,this.max).sub(t).length()},intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}});var dp=new oi,pp=new oi;function hp(t,e){this.start=void 0!==t?t:new oi,this.end=void 0!==e?e:new oi}function fp(t){Ii.call(this),this.material=t,this.render=function(){}}Object.assign(hp.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new oi),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new oi),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new oi),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(t,e){dp.subVectors(t,this.start),pp.subVectors(this.end,this.start);var n=pp.dot(pp),i=pp.dot(dp)/n;return e&&(i=Kn.clamp(i,0,1)),i},closestPointToPoint:function(t,e,n){var i=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new oi),this.delta(n).multiplyScalar(i).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),fp.prototype=Object.create(Ii.prototype),fp.prototype.constructor=fp,fp.prototype.isImmediateRenderObject=!0;var gp=new oi;function mp(t,e){Ii.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Zr,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],r=0,o=1;r<32;r++,o++){var a=r/32*Math.PI*2,s=o/32*Math.PI*2;i.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.setAttribute("position",new Fr(i,3));var c=new oc({fog:!1,toneMapped:!1});this.cone=new fc(n,c),this.add(this.cone),this.update()}mp.prototype=Object.create(Ii.prototype),mp.prototype.constructor=mp,mp.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},mp.prototype.update=function(){this.light.updateMatrixWorld();var t=this.light.distance?this.light.distance:1e3,e=t*Math.tan(this.light.angle);this.cone.scale.set(e,e,t),gp.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(gp),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var vp=new oi,yp=new hi,bp=new hi;function wp(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var i=0;i.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{zp.set(t.z,0,-t.x).normalize();var e=Math.acos(t.y);this.quaternion.setFromAxisAngle(zp,e)}},Gp.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},Gp.prototype.setColor=function(t){this.line.material.color.set(t),this.cone.material.color.set(t)},Gp.prototype.copy=function(t){return Ii.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},Gp.prototype.clone=function(){return(new this.constructor).copy(this)},Hp.prototype=Object.create(fc.prototype),Hp.prototype.constructor=Hp;var Wp,qp=Math.pow(2,8),Kp=[.125,.215,.35,.446,.526,.582],Xp=5+Kp.length,Yp=(r(i={},an,0),r(i,sn,1),r(i,ln,2),r(i,dn,3),r(i,pn,4),r(i,hn,5),r(i,cn,6),i),Zp=new $u,Jp=(20,(Wp=new Ul({defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:new Float32Array(20)},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:new oi(0,1,0)},inputEncoding:{value:Yp[an]},outputEncoding:{value:Yp[an]}},vertexShader:"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t",fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n".concat("\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include \n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t","\n\n#define ENVMAP_TYPE_CUBE_UV\n#include \n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:_,depthTest:!1,depthWrite:!1})).type="SphericalGaussianBlur",Wp),Qp=null,$p=null,th=function(){for(var t=[],e=[],n=[],i=8,r=0;r4?a=Kp[r-8+4-1]:0==r&&(a=0),n.push(a);for(var s=1/(o-1),c=-s/2,l=1+s/2,u=[c,c,l,c,l,l,c,c,l,l,c,l],d=new Float32Array(108),p=new Float32Array(72),h=new Float32Array(36),f=0;f<6;f++){var g=f%3*2/3-1,m=f>2?0:-1,v=[g,m,0,g+2/3,m,0,g+2/3,m+1,0,g,m,0,g+2/3,m+1,0,g,m+1,0];d.set(v,18*f),p.set(u,12*f);var y=[f,f,f,f,f,f];h.set(y,6*f)}var b=new Zr;b.setAttribute("position",new Ir(d,3)),b.setAttribute("uv",new Ir(p,2)),b.setAttribute("faceIndex",new Ir(h,1)),t.push(b),i>4&&i--}return{_lodPlanes:t,_sizeLods:e,_sigmas:n}}(),eh=th._lodPlanes,nh=th._sizeLods,ih=th._sigmas,rh=null,oh=null,ah=null,sh=(1+Math.sqrt(5))/2,ch=1/sh,lh=[new oi(1,1,1),new oi(-1,1,1),new oi(1,1,-1),new oi(-1,1,-1),new oi(0,sh,ch),new oi(0,sh,-ch),new oi(ch,0,sh),new oi(-ch,0,sh),new oi(sh,ch,0),new oi(-sh,ch,0)];function uh(t){oh=t,hh(Jp)}function dh(t){var e={magFilter:Ct,minFilter:Ct,generateMipmaps:!1,type:t?t.type:Lt,format:t?t.format:Qt,encoding:t?t.encoding:ln,depthBuffer:!1,stencilBuffer:!1},n=fh(e);return n.depthBuffer=!t,rh=fh(e),n}function ph(t){rh.dispose(),oh.setRenderTarget(ah),t.scissorTest=!1,t.setSize(t.width,t.height)}function hh(t){var e=new ki;e.add(new go(eh[0],t)),oh.compile(e,Zp)}function fh(t){var e=new ti(3*qp,3*qp,t);return e.texture.mapping=wt,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function gh(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function mh(t){var e=oh.autoClear;oh.autoClear=!1;for(var n=1;n20&&console.warn("sigmaRadians, ".concat(r,", is too large and will clip, as it requested ").concat(p," samples when the maximum is set to ").concat(20));for(var h=[],f=0,g=0;g<20;++g){var m=g/d,v=Math.exp(-m*m/2);h.push(v),0==g?f+=v:g4?i-8+4:0),3*y,2*y),oh.setRenderTarget(e),oh.render(s,Zp)}function bh(){var t=new Ul({uniforms:{envMap:{value:null},texelSize:{value:new Xn(1,1)},inputEncoding:{value:Yp[an]},outputEncoding:{value:Yp[an]}},vertexShader:"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t",fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n".concat("\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include \n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t","\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:_,depthTest:!1,depthWrite:!1});return t.type="EquirectangularToCubeUV",t}function wh(){var t=new Ul({uniforms:{envMap:{value:null},inputEncoding:{value:Yp[an]},outputEncoding:{value:Yp[an]}},vertexShader:"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t",fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n".concat("\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include \n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t","\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:_,depthTest:!1,depthWrite:!1});return t.type="CubemapToCubeUV",t}function Sh(t,e,n,i,r,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Ar(t,e,n,r,o,a)}uh.prototype={constructor:uh,fromScene:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100;ah=oh.getRenderTarget();var r=dh();return function(t,e,n,i){var r=new Po(90,1,e,n),o=[1,1,1,1,-1,1],a=[1,1,-1,-1,-1,1],s=oh.outputEncoding,c=oh.toneMapping,l=oh.toneMappingExposure,u=oh.getClearColor(),d=oh.getClearAlpha();oh.toneMapping=lt,oh.toneMappingExposure=1,oh.outputEncoding=an,t.scale.z*=-1;var p=t.background;if(p&&p.isColor){p.convertSRGBToLinear();var h=Math.max(p.r,p.g,p.b),f=Math.min(Math.max(Math.ceil(Math.log2(h)),-128),127);p=p.multiplyScalar(Math.pow(2,-f));var g=(f+128)/255;oh.setClearColor(p,g),t.background=null}for(var m=0;m<6;m++){var v=m%3;0==v?(r.up.set(0,o[m],0),r.lookAt(a[m],0,0)):1==v?(r.up.set(0,0,o[m]),r.lookAt(0,a[m],0)):(r.up.set(0,o[m],0),r.lookAt(0,0,a[m])),gh(i,v*qp,m>2?qp:0,qp,qp),oh.setRenderTarget(i),oh.render(t,r)}oh.toneMapping=c,oh.toneMappingExposure=l,oh.outputEncoding=s,oh.setClearColor(u,d),t.scale.z*=-1}(t,n,i,r),e>0&&vh(r,0,0,e),mh(r),ph(r),r},fromEquirectangular:function(t){return t.magFilter=Ct,t.minFilter=Ct,t.generateMipmaps=!1,this.fromCubemap(t)},fromCubemap:function(t){ah=oh.getRenderTarget();var e=dh(t);return function(t,e){var n=new ki;t.isCubeTexture?null==$p&&($p=wh()):null==Qp&&(Qp=bh());var i=t.isCubeTexture?$p:Qp;n.add(new go(eh[0],i));var r=i.uniforms;r.envMap.value=t,t.isCubeTexture||r.texelSize.value.set(1/t.image.width,1/t.image.height),r.inputEncoding.value=Yp[t.encoding],r.outputEncoding.value=Yp[t.encoding],gh(e,0,0,3*qp,2*qp),oh.setRenderTarget(e),oh.render(n,Zp)}(t,e),mh(e),ph(e),e},compileCubemapShader:function(){null==$p&&hh($p=wh())},compileEquirectangularShader:function(){null==Qp&&hh(Qp=bh())},dispose:function(){Jp.dispose(),null!=$p&&$p.dispose(),null!=Qp&&Qp.dispose();for(var t=0;t=2)throw new Error("Error while "+i+": 'downgradedModule' not specified.\nThis application contains more than one downgraded Angular module, thus you need to always specify 'downgradedModule' when downgrading components and injectables.");if(!t.has(n))throw new Error("Error while "+i+": Unable to find the specified downgraded module.\nDid you forget to downgrade an Angular module or include it in the AngularJS application?");break;default:throw new Error("Error while "+i+": Not a valid '@angular/upgrade' application.\nDid you forget to downgrade an Angular module or include it in the AngularJS application?")}} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var C,A={__UNINITIALIZED__:!0},T=function(){function t(t,e,n,i,r,o,a,s,c,l){this.element=t,this.attrs=e,this.scope=n,this.ngModel=i,this.parentInjector=r,this.$injector=o,this.$compile=a,this.$parse=s,this.componentFactory=c,this.wrapCallback=l,this.implementsOnChanges=!1,this.inputChangeCount=0,this.inputChanges={},this.componentScope=n.$new()}return t.prototype.compileContents=function(){var t=this,e=[],n=this.groupProjectableNodes().map(function(e){return t.$compile(e)});return this.element.empty(),n.forEach(function(n){n(t.scope,function(n){e.push(n),t.element.append(n)})}),e},t.prototype.createComponent=function(t){var e=[{provide:"$scope",useValue:this.componentScope}],n=r.Injector.create({providers:e,parent:this.parentInjector,name:"DowngradeComponentAdapter"});this.componentRef=this.componentFactory.create(n,t,this.element[0]),this.viewChangeDetector=this.componentRef.injector.get(r.ChangeDetectorRef),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance;var i,o,a=this.componentRef.injector.get(r.Testability,null);a&&this.componentRef.injector.get(r.TestabilityRegistry).registerApplication(this.componentRef.location.nativeElement,a),i=this.ngModel,o=this.component,i&&function(t){return"function"==typeof t.writeValue&&"function"==typeof t.registerOnChange}(o)&&(i.$render=function(){o.writeValue(i.$viewValue)},o.registerOnChange(i.$setViewValue.bind(i)),"function"==typeof o.registerOnTouched&&o.registerOnTouched(i.$setTouched.bind(i)))},t.prototype.setupInputs=function(t,e){var n=this;void 0===e&&(e=!0);for(var i=this.attrs,o=this.componentFactory.inputs||[],a=function(t){var e,r,a=new m(o[t].propName,o[t].templateName),c=null;if(i.hasOwnProperty(a.attr)){var l=(e=a.prop,r=A,function(t){var i,o;(i=r)===(o=t)||i!=i&&o!=o||(r===A&&(r=t),n.updateInput(e,r,t),r=t)});i.$observe(a.attr,l);var u=s.componentScope.$watch(function(){u(),u=null,l(i[a.attr])})}else i.hasOwnProperty(a.bindAttr)?c=i[a.bindAttr]:i.hasOwnProperty(a.bracketAttr)?c=i[a.bracketAttr]:i.hasOwnProperty(a.bindonAttr)?c=i[a.bindonAttr]:i.hasOwnProperty(a.bracketParenAttr)&&(c=i[a.bracketParenAttr]);if(null!=c){var d=function(t){return function(e,i){return n.updateInput(t,i,e)}}(a.prop);s.componentScope.$watch(c,d)}},s=this,c=0;c1;return{restrict:"E",terminal:!0,require:["?^^$$angularInjector","?ngModel"],link:function(u,d,p,h){var f=h[1],g=h[0],m=void 0,v=!1;if(!g||l){var y=t.downgradedModule||"",b="$$angularLazyModuleRef"+y,S="instantiating component '"+w(t.component)+"'";E(n,y,b,S);var x=n.get(b);m=x.injector||x.promise}var M=g||m,C=m||g,A=function(i,a){var l=a.get(r.ComponentFactoryResolver).resolveComponentFactory(t.component);if(!l)throw new Error("Expecting ComponentFactory for: "+w(t.component));var h=new k(d),g=new T(d,p,u,f,i,n,e,o,l,c),m=g.compileContents();g.createComponent(m),g.setupInputs(s,t.propagateDigest),g.setupOutputs(),g.registerCleanup(),h.resolve(g.getInjector()),v&&u.$evalAsync(function(){})},O=s?function(t,e){a||(a=t.get(r.NgZone)),c(function(){return A(t,e)})()}:A;P.all([M,C]).then(function(t){var e=Object(i.f)(t,2),n=e[0],r=e[1];return O(n,r)}),v=!0}}};return e.$inject=["$compile","$injector","$parse"],e}var k=function(t){function e(e){var n=t.call(this)||this;return n.element=e,n.injectorKey=b(g),e.data(n.injectorKey,n),n}return Object(i.c)(e,t),e.prototype.resolve=function(e){this.element.data(this.injectorKey,e),this.element=null,t.prototype.resolve.call(this,e)},e}(P); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function D(t,e){void 0===e&&(e="");var n=function(n){var i=""+g+e,r=M(t)?w(t):String(t);return E(n,e,i,"instantiating injectable '"+r+"'"),n.get(i).get(t)};return n.$inject=["$injector"],n} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var R=new r.Version("9.1.9"),L=null; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function N(t){L=t}function j(){if(!L)throw new Error("Trying to get the AngularJS injector before it being set.");var t=L;return L=null,t}function V(t){return t.get("$rootScope")}function F(t){return t.get("$compile")}function U(t){return t.get("$parse")}var B=[{provide:"$injector",useFactory:j,deps:[]},{provide:"$rootScope",useFactory:V,deps:["$injector"]},{provide:"$compile",useFactory:F,deps:["$injector"]},{provide:"$parse",useFactory:U,deps:["$injector"]}],z=function(){function t(t){this.modInjector=t}return t.prototype.get=function(t,e){return e===r["ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR"]?e:this.modInjector.get(t,e)},t}(),G=0; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function H(t){var e,n="$$UpgradeModule.lazy"+ ++G,i="$$angularLazyModuleRef"+n,r=""+g+n,a=M(t)?t:function(e){return Object(o.platformBrowser)(e).bootstrapModuleFactory(t)};return h(n,[]).constant("$$angularUpgradeAppType",3).factory(g,[r,W]).factory(r,function(){if(!e)throw new Error("Trying to get the Angular injector before bootstrapping the corresponding Angular module.");return e}).factory("$$angularLazyModuleRef",[i,W]).factory(i,["$injector",function(t){N(t);var n={promise:a(B).then(function(t){return(e=n.injector=new z(t.injector)).get("$injector"),e})};return n}]).config(["$injector","$provide",function(t,e){e.constant("$$angularDowngradedModuleCount",S(t)+1)}]),n}function W(t){return t} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var q=/^(\^\^?)?(\?)?(\^\^?)?/,K=function(){function t(e,n,i,r){this.injector=e,this.name=n,this.$injector=e.get("$injector"),this.$compile=this.$injector.get("$compile"),this.$controller=this.$injector.get("$controller"),this.element=i.nativeElement,this.$element=f(this.element),this.directive=r||t.getDirective(this.$injector,n)}return t.getDirective=function(t,e){var n=t.get(e+"Directive");if(n.length>1)throw new Error("Only support single directive definition for: "+e);var i=n[0];return i.compile&&!i.link&&Z(e,"compile"),i.replace&&Z(e,"replace"),i.terminal&&Z(e,"terminal"),i},t.getTemplate=function(t,e,n,i){if(void 0===n&&(n=!1),void 0!==e.template)return X(e.template,i);if(e.templateUrl){var r=t.get("$templateCache"),o=X(e.templateUrl,i),a=r.get(o);if(void 0!==a)return a;if(!n)throw new Error("loading directive templates asynchronously is not supported");return new Promise(function(e,n){t.get("$httpBackend")("GET",o,null,function(t,i){200===t?e(r.put(o,i)):n("GET component template from '"+o+"' returned '"+t+": "+i+"'")})})}throw new Error("Directive '"+e.name+"' is not a component, it is missing template.")},t.prototype.buildController=function(t,e){var n={$scope:e,$element:this.$element},i=this.$controller(t,n,null,this.directive.controllerAs);return this.$element.data(b(this.directive.name),i),i},t.prototype.compileTemplate=function(e){return void 0===e&&(e=t.getTemplate(this.$injector,this.directive,!1,this.$element)),this.compileHtml(e)},t.prototype.onDestroy=function(t,e){e&&M(e.$onDestroy)&&e.$onDestroy(),t.$destroy(),f.cleanData([this.element]),f.cleanData(this.element.querySelectorAll("*"))},t.prototype.prepareTransclusion=function(){var t=this,e=this.directive.transclude,n=this.extractChildNodes(),i=function(t,e){return e(r,t=t||{$destroy:function(){}})},r=n;if(e){var o=Object.create(null);if("object"==typeof e){r=[];var a=Object.create(null),s=Object.create(null);Object.keys(e).forEach(function(t){var n=e[t],i="?"===n.charAt(0);n=i?n.substring(1):n,a[n]=t,o[t]=null,s[t]=i}),n.forEach(function(t){var e=a[function(t){return t.replace(v,"").replace(y,function(t,e){return e.toUpperCase()})}(t.nodeName.toLowerCase())];e?(s[e]=!0,o[e]=o[e]||[],o[e].push(t)):r.push(t)}),Object.keys(s).forEach(function(e){if(!s[e])throw new Error("Required transclusion slot '"+e+"' on directive: "+t.name)}),Object.keys(o).filter(function(t){return o[t]}).forEach(function(t){var e=o[t];o[t]=function(t,n){return n(e,t)}})}i.$$slots=o,r.forEach(function(t){t.nodeType!==Node.TEXT_NODE||t.nodeValue||(t.nodeValue="‌")})}return i},t.prototype.resolveAndBindRequiredControllers=function(t){var e=this.getDirectiveRequire(),n=this.resolveRequire(e);if(t&&this.directive.bindToController&&Y(e)){var i=n;Object.keys(i).forEach(function(e){t[e]=i[e]})}return n},t.prototype.compileHtml=function(t){return this.element.innerHTML=t,this.$compile(this.element.childNodes)},t.prototype.extractChildNodes=function(){for(var t,e=[];t=this.element.firstChild;)this.element.removeChild(t),e.push(t);return e},t.prototype.getDirectiveRequire=function(){var t=this.directive.require||this.directive.controller&&this.directive.name;return Y(t)&&Object.keys(t).forEach(function(e){var n=t[e],i=n.match(q);n.substring(i[0].length)||(t[e]=i[0]+e)}),t},t.prototype.resolveRequire=function(t,e){var n=this;if(t){if(Array.isArray(t))return t.map(function(t){return n.resolveRequire(t)});if("object"==typeof t){var i={};return Object.keys(t).forEach(function(e){return i[e]=n.resolveRequire(t[e])}),i}if("string"==typeof t){var r=t.match(q),o=r[1]||r[3],a=t.substring(r[0].length),s=!!r[2],c=!!o,l="^^"===o,u=b(a),d=l?this.$element.parent():this.$element,p=c?d.inheritedData(u):d.data(u);if(!p&&!s)throw new Error("Unable to find required '"+t+"' in upgraded directive '"+this.name+"'.");return p}throw new Error("Unrecognized 'require' syntax on upgraded directive '"+this.name+"': "+t)}return null},t}();function X(t){for(var e=[],n=1;n * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ (function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",u="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",f="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Object]",y="[object RegExp]",b="[object Set]",w="[object String]",S="[object Symbol]",x="[object WeakMap]",M="[object ArrayBuffer]",E="[object DataView]",C="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",O="[object Int16Array]",_="[object Int32Array]",P="[object Uint8Array]",I="[object Uint16Array]",k="[object Uint32Array]",D=/\b__p \+= '';/g,R=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,V=RegExp(N.source),F=RegExp(j.source),U=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,K=RegExp(q.source),X=/^\s+|\s+$/g,Y=/^\s+/,Z=/\s+$/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,$=/,? & /,tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,it=/\w*$/,rt=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,st=/^0o[0-7]+$/i,ct=/^(?:0|[1-9]\d*)$/,lt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,dt=/['\n\r\u2028\u2029\\]/g,pt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ft="["+ht+"]",gt="["+pt+"]",mt="\\d+",vt="[a-z\\xdf-\\xf6\\xf8-\\xff]",yt="[^\\ud800-\\udfff"+ht+mt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bt="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",St="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",Mt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Et="(?:"+vt+"|"+yt+")",Ct="(?:"+Mt+"|"+yt+")",At="(?:"+gt+"|"+bt+")?",Tt="[\\ufe0e\\ufe0f]?"+At+"(?:\\u200d(?:"+[wt,St,xt].join("|")+")[\\ufe0e\\ufe0f]?"+At+")*",Ot="(?:"+["[\\u2700-\\u27bf]",St,xt].join("|")+")"+Tt,_t="(?:"+[wt+gt+"?",gt,St,xt,"[\\ud800-\\udfff]"].join("|")+")",Pt=RegExp("['’]","g"),It=RegExp(gt,"g"),kt=RegExp(bt+"(?="+bt+")|"+_t+Tt,"g"),Dt=RegExp([Mt+"?"+vt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ft,Mt,"$"].join("|")+")",Ct+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ft,Mt+Et,"$"].join("|")+")",Mt+"?"+Et+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Mt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mt,Ot].join("|"),"g"),Rt=RegExp("[\\u200d\\ud800-\\udfff"+pt+"\\ufe0e\\ufe0f]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jt=-1,Vt={};Vt[C]=Vt[A]=Vt[T]=Vt[O]=Vt[_]=Vt[P]=Vt["[object Uint8ClampedArray]"]=Vt[I]=Vt[k]=!0,Vt[c]=Vt[l]=Vt[M]=Vt[u]=Vt[E]=Vt[d]=Vt[p]=Vt[h]=Vt[g]=Vt[m]=Vt[v]=Vt[y]=Vt[b]=Vt[w]=Vt[x]=!1;var Ft={};Ft[c]=Ft[l]=Ft[M]=Ft[E]=Ft[u]=Ft[d]=Ft[C]=Ft[A]=Ft[T]=Ft[O]=Ft[_]=Ft[g]=Ft[m]=Ft[v]=Ft[y]=Ft[b]=Ft[w]=Ft[S]=Ft[P]=Ft["[object Uint8ClampedArray]"]=Ft[I]=Ft[k]=!0,Ft[p]=Ft[h]=Ft[x]=!1;var Ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bt=parseFloat,zt=parseInt,Gt="object"==typeof t&&t&&t.Object===Object&&t,Ht="object"==typeof self&&self&&self.Object===Object&&self,Wt=Gt||Ht||Function("return this")(),qt=e&&!e.nodeType&&e,Kt=qt&&"object"==typeof i&&i&&!i.nodeType&&i,Xt=Kt&&Kt.exports===qt,Yt=Xt&&Gt.process,Zt=function(){try{return Kt&&Kt.require&&Kt.require("util").types||Yt&&Yt.binding&&Yt.binding("util")}catch(t){}}(),Jt=Zt&&Zt.isArrayBuffer,Qt=Zt&&Zt.isDate,$t=Zt&&Zt.isMap,te=Zt&&Zt.isRegExp,ee=Zt&&Zt.isSet,ne=Zt&&Zt.isTypedArray;function ie(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function re(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r-1}function le(t,e,n){for(var i=-1,r=null==t?0:t.length;++i-1;);return n}function Ie(t,e){for(var n=t.length;n--&&ye(e,t[n],0)>-1;);return n}var ke=Me({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),De=Me({"&":"&","<":"<",">":">",'"':""","'":"'"});function Re(t){return"\\"+Ut[t]}function Le(t){return Rt.test(t)}function Ne(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}function je(t,e){return function(n){return t(e(n))}}function Ve(t,e){for(var n=-1,i=t.length,r=0,o=[];++n",""":'"',"'":"'"}),Ge=function t(e){var n,i=(e=null==e?Wt:Ge.defaults(Wt.Object(),e,Ge.pick(Wt,Nt))).Array,r=e.Date,pt=e.Error,ht=e.Function,ft=e.Math,gt=e.Object,mt=e.RegExp,vt=e.String,yt=e.TypeError,bt=i.prototype,wt=ht.prototype,St=gt.prototype,xt=e["__core-js_shared__"],Mt=wt.toString,Et=St.hasOwnProperty,Ct=0,At=(n=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Tt=St.toString,Ot=Mt.call(gt),_t=Wt._,kt=mt("^"+Mt.call(Et).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=Xt?e.Buffer:void 0,Ut=e.Symbol,Gt=e.Uint8Array,Ht=Rt?Rt.allocUnsafe:void 0,qt=je(gt.getPrototypeOf,gt),Kt=gt.create,Yt=St.propertyIsEnumerable,Zt=bt.splice,ge=Ut?Ut.isConcatSpreadable:void 0,Me=Ut?Ut.iterator:void 0,He=Ut?Ut.toStringTag:void 0,We=function(){try{var t=Hr(gt,"defineProperty");return t({},"",{}),t}catch(t){}}(),qe=e.clearTimeout!==Wt.clearTimeout&&e.clearTimeout,Ke=r&&r.now!==Wt.Date.now&&r.now,Xe=e.setTimeout!==Wt.setTimeout&&e.setTimeout,Ye=ft.ceil,Ze=ft.floor,Je=gt.getOwnPropertySymbols,Qe=Rt?Rt.isBuffer:void 0,$e=e.isFinite,tn=bt.join,en=je(gt.keys,gt),nn=ft.max,rn=ft.min,on=r.now,an=e.parseInt,sn=ft.random,cn=bt.reverse,ln=Hr(e,"DataView"),un=Hr(e,"Map"),dn=Hr(e,"Promise"),pn=Hr(e,"Set"),hn=Hr(e,"WeakMap"),fn=Hr(gt,"create"),gn=hn&&new hn,mn={},vn=vo(ln),yn=vo(un),bn=vo(dn),wn=vo(pn),Sn=vo(hn),xn=Ut?Ut.prototype:void 0,Mn=xn?xn.valueOf:void 0,En=xn?xn.toString:void 0;function Cn(t){if(Ra(t)&&!Ma(t)&&!(t instanceof _n)){if(t instanceof On)return t;if(Et.call(t,"__wrapped__"))return yo(t)}return new On(t)}var An=function(){function t(){}return function(e){if(!Da(e))return{};if(Kt)return Kt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Tn(){}function On(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function _n(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Pn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function Wn(t,e,n,i,r,o){var a,s=1&e,l=2&e,p=4&e;if(n&&(a=r?n(t,i,r,o):n(t)),void 0!==a)return a;if(!Da(t))return t;var x=Ma(t);if(x){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Et.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return cr(t,a)}else{var D=Kr(t),R=D==h||D==f;if(Ta(t))return nr(t,s);if(D==v||D==c||R&&!r){if(a=l||R?{}:Yr(t),!s)return l?function(t,e){return lr(t,qr(t),e)}(t,function(t,e){return t&&lr(e,ds(e),t)}(a,t)):function(t,e){return lr(t,Wr(t),e)}(t,Bn(a,t))}else{if(!Ft[D])return r?t:{};a=function(t,e,n){var i,r=t.constructor;switch(e){case M:return ir(t);case u:case d:return new r(+t);case E:return function(t,e){var n=e?ir(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case C:case A:case T:case O:case _:case P:case"[object Uint8ClampedArray]":case I:case k:return rr(t,n);case g:return new r;case m:case w:return new r(t);case y:return function(t){var e=new t.constructor(t.source,it.exec(t));return e.lastIndex=t.lastIndex,e}(t);case b:return new r;case S:return i=t,Mn?gt(Mn.call(i)):{}}}(t,D,s)}}o||(o=new Rn);var L=o.get(t);if(L)return L;o.set(t,a),Fa(t)?t.forEach(function(i){a.add(Wn(i,e,n,i,t,o))}):La(t)&&t.forEach(function(i,r){a.set(r,Wn(i,e,n,r,t,o))});var N=x?void 0:(p?l?jr:Nr:l?ds:us)(t);return oe(N||t,function(i,r){N&&(i=t[r=i]),Vn(a,r,Wn(i,e,n,r,t,o))}),a}function qn(t,e,n){var i=n.length;if(null==t)return!i;for(t=gt(t);i--;){var r=n[i],o=e[r],a=t[r];if(void 0===a&&!(r in t)||!o(a))return!1}return!0}function Kn(t,e,n){if("function"!=typeof t)throw new yt(o);return lo(function(){t.apply(void 0,n)},e)}function Xn(t,e,n,i){var r=-1,o=ce,a=!0,s=t.length,c=[],l=e.length;if(!s)return c;n&&(e=ue(e,Te(n))),i?(o=le,a=!1):e.length>=200&&(o=_e,a=!1,e=new Dn(e));t:for(;++r-1},In.prototype.set=function(t,e){var n=this.__data__,i=Fn(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Pn,map:new(un||In),string:new Pn}},kn.prototype.delete=function(t){var e=zr(this,t).delete(t);return this.size-=e?1:0,e},kn.prototype.get=function(t){return zr(this,t).get(t)},kn.prototype.has=function(t){return zr(this,t).has(t)},kn.prototype.set=function(t,e){var n=zr(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Dn.prototype.add=Dn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Dn.prototype.has=function(t){return this.__data__.has(t)},Rn.prototype.clear=function(){this.__data__=new In,this.size=0},Rn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Rn.prototype.get=function(t){return this.__data__.get(t)},Rn.prototype.has=function(t){return this.__data__.has(t)},Rn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof In){var i=n.__data__;if(!un||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new kn(i)}return n.set(t,e),this.size=n.size,this};var Yn=pr(ii),Zn=pr(ri,!0);function Jn(t,e){var n=!0;return Yn(t,function(t,i,r){return n=!!e(t,i,r)}),n}function Qn(t,e,n){for(var i=-1,r=t.length;++i0&&n(s)?e>1?ti(s,e-1,n,i,r):de(r,s):i||(r[r.length]=s)}return r}var ei=hr(),ni=hr(!0);function ii(t,e){return t&&ei(t,e,us)}function ri(t,e){return t&&ni(t,e,us)}function oi(t,e){return se(e,function(e){return Pa(t[e])})}function ai(t,e){for(var n=0,i=(e=Qi(e,t)).length;null!=t&&ne}function ui(t,e){return null!=t&&Et.call(t,e)}function di(t,e){return null!=t&&e in gt(t)}function pi(t,e,n){for(var r=n?le:ce,o=t[0].length,a=t.length,s=a,c=i(a),l=1/0,u=[];s--;){var d=t[s];s&&e&&(d=ue(d,Te(e))),l=rn(d.length,l),c[s]=!n&&(e||o>=120&&d.length>=120)?new Dn(s&&d):void 0}d=t[0];var p=-1,h=c[0];t:for(;++p=s?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}(t,e,n)})}function Ti(t,e,n){for(var i=-1,r=e.length,o={};++i-1;)s!==t&&Zt.call(s,c,1),Zt.call(t,c,1);return t}function _i(t,e){for(var n=t?e.length:0,i=n-1;n--;){var r=e[n];if(n==i||r!==o){var o=r;Jr(r)?Zt.call(t,r,1):Hi(t,r)}}return t}function Pi(t,e){return t+Ze(sn()*(e-t+1))}function Ii(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=Ze(e/2))&&(t+=t)}while(e);return n}function ki(t,e){return uo(oo(t,e,Ns),t+"")}function Di(t,e,n,i){if(!Da(t))return t;for(var r=-1,o=(e=Qi(e,t)).length,a=o-1,s=t;null!=s&&++ro?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=i(o);++r>>1,a=t[o];null!==a&&!Ba(a)&&(n?a<=e:a=200){var l=e?null:Or(t);if(l)return Fe(l);a=!1,r=_e,c=new Dn}else c=e?[]:s;t:for(;++i=i?t:Ni(t,e,n)}var er=qe||function(t){return Wt.clearTimeout(t)};function nr(t,e){if(e)return t.slice();var n=t.length,i=Ht?Ht(n):new t.constructor(n);return t.copy(i),i}function ir(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function rr(t,e){var n=e?ir(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function or(t,e){if(t!==e){var n=void 0!==t,i=null===t,r=t==t,o=Ba(t),a=void 0!==e,s=null===e,c=e==e,l=Ba(e);if(!s&&!l&&!o&&t>e||o&&a&&c&&!s&&!l||i&&a&&c||!n&&c||!r)return 1;if(!i&&!o&&!l&&t1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,a&&Qr(n[0],n[1],a)&&(o=r<3?void 0:o,r=1),e=gt(e);++i-1?r[o?e[a]:a]:void 0}}function yr(t){return Lr(function(e){var n=e.length,i=n,r=On.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new yt(o);if(r&&!s&&"wrapper"==Fr(a))var s=new On([],!0)}for(i=s?i:n;++i1&&b.reverse(),d&&ls))return!1;var l=o.get(t),u=o.get(e);if(l&&u)return l==e&&u==t;var d=-1,p=!0,h=2&n?new Dn:void 0;for(o.set(t,e),o.set(e,t);++d-1&&t%1==0&&t1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(J,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return oe(s,function(n){var i="_."+n[0];e&n[1]&&!ce(t,i)&&t.push(i)}),t.sort()}(function(t){var e=i.match(Q);return e?e[1].split($):[]}(),n)))}function ho(t){var e=0,n=0;return function(){var i=on(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function fo(t,e){var n=-1,i=t.length,r=i-1;for(e=void 0===e?i:e;++n1?t[e-1]:void 0;return Vo(t,n="function"==typeof n?(t.pop(),n):void 0)});function Wo(t){var e=Cn(t);return e.__chain__=!0,e}function qo(t,e){return e(t)}var Ko=Lr(function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,r=function(e){return Gn(e,t)};return!(e>1||this.__actions__.length)&&i instanceof _n&&Jr(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:qo,args:[r],thisArg:void 0}),new On(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(void 0),t})):this.thru(r)}),Xo=ur(function(t,e,n){Et.call(t,n)?++t[n]:zn(t,n,1)}),Yo=vr(xo),Zo=vr(Mo);function Jo(t,e){return(Ma(t)?oe:Yn)(t,Br(e,3))}function Qo(t,e){return(Ma(t)?function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}:Zn)(t,Br(e,3))}var $o=ur(function(t,e,n){Et.call(t,n)?t[n].push(e):zn(t,n,[e])}),ta=ki(function(t,e,n){var r=-1,o="function"==typeof e,a=Ca(t)?i(t.length):[];return Yn(t,function(t){a[++r]=o?ie(e,t,n):hi(t,e,n)}),a}),ea=ur(function(t,e,n){zn(t,n,e)});function na(t,e){return(Ma(t)?ue:Si)(t,Br(e,3))}var ia=ur(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),ra=ki(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Qr(t,e[0],e[1])?e=[]:n>2&&Qr(e[0],e[1],e[2])&&(e=[e[0]]),Ai(t,ti(e,1),[])}),oa=Ke||function(){return Wt.Date.now()};function aa(t,e,n){return e=n?void 0:e,Pr(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function sa(t,e){var n;if("function"!=typeof e)throw new yt(o);return t=Ka(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ca=ki(function(t,e,n){var i=1;if(n.length){var r=Ve(n,Ur(ca));i|=32}return Pr(t,i,e,n,r)}),la=ki(function(t,e,n){var i=3;if(n.length){var r=Ve(n,Ur(la));i|=32}return Pr(e,i,t,n,r)});function ua(t,e,n){var i,r,a,s,c,l,u=0,d=!1,p=!1,h=!0;if("function"!=typeof t)throw new yt(o);function f(e){var n=i,o=r;return i=r=void 0,u=e,s=t.apply(o,n)}function g(t){var n=t-l;return void 0===l||n>=e||n<0||p&&t-u>=a}function m(){var t=oa();if(g(t))return v(t);c=lo(m,function(t){var n=e-(t-l);return p?rn(n,a-(t-u)):n}(t))}function v(t){return c=void 0,h&&i?f(t):(i=r=void 0,s)}function y(){var t=oa(),n=g(t);if(i=arguments,r=this,l=t,n){if(void 0===c)return function(t){return u=t,c=lo(m,e),d?f(t):s}(l);if(p)return er(c),c=lo(m,e),f(l)}return void 0===c&&(c=lo(m,e)),s}return e=Ya(e)||0,Da(n)&&(d=!!n.leading,a=(p="maxWait"in n)?nn(Ya(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==c&&er(c),u=0,i=l=r=c=void 0},y.flush=function(){return void 0===c?s:v(oa())},y}var da=ki(function(t,e){return Kn(t,1,e)}),pa=ki(function(t,e,n){return Kn(t,Ya(e)||0,n)});function ha(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new yt(o);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=t.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(ha.Cache||kn),n}function fa(t){if("function"!=typeof t)throw new yt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ha.Cache=kn;var ga=$i(function(t,e){var n=(e=1==e.length&&Ma(e[0])?ue(e[0],Te(Br())):ue(ti(e,1),Te(Br()))).length;return ki(function(i){for(var r=-1,o=rn(i.length,n);++r=e}),xa=fi(function(){return arguments}())?fi:function(t){return Ra(t)&&Et.call(t,"callee")&&!Yt.call(t,"callee")},Ma=i.isArray,Ea=Jt?Te(Jt):function(t){return Ra(t)&&ci(t)==M};function Ca(t){return null!=t&&ka(t.length)&&!Pa(t)}function Aa(t){return Ra(t)&&Ca(t)}var Ta=Qe||Ys,Oa=Qt?Te(Qt):function(t){return Ra(t)&&ci(t)==d};function _a(t){if(!Ra(t))return!1;var e=ci(t);return e==p||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ja(t)}function Pa(t){if(!Da(t))return!1;var e=ci(t);return e==h||e==f||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ia(t){return"number"==typeof t&&t==Ka(t)}function ka(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Da(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ra(t){return null!=t&&"object"==typeof t}var La=$t?Te($t):function(t){return Ra(t)&&Kr(t)==g};function Na(t){return"number"==typeof t||Ra(t)&&ci(t)==m}function ja(t){if(!Ra(t)||ci(t)!=v)return!1;var e=qt(t);if(null===e)return!0;var n=Et.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Mt.call(n)==Ot}var Va=te?Te(te):function(t){return Ra(t)&&ci(t)==y},Fa=ee?Te(ee):function(t){return Ra(t)&&Kr(t)==b};function Ua(t){return"string"==typeof t||!Ma(t)&&Ra(t)&&ci(t)==w}function Ba(t){return"symbol"==typeof t||Ra(t)&&ci(t)==S}var za=ne?Te(ne):function(t){return Ra(t)&&ka(t.length)&&!!Vt[ci(t)]},Ga=Cr(wi),Ha=Cr(function(t,e){return t<=e});function Wa(t){if(!t)return[];if(Ca(t))return Ua(t)?Be(t):cr(t);if(Me&&t[Me])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Me]());var e=Kr(t);return(e==g?Ne:e==b?Fe:bs)(t)}function qa(t){return t?(t=Ya(t))===1/0||t===-1/0?1.7976931348623157e308*(t<0?-1:1):t==t?t:0:0===t?t:0}function Ka(t){var e=qa(t),n=e%1;return e==e?n?e-n:e:0}function Xa(t){return t?Hn(Ka(t),0,4294967295):0}function Ya(t){if("number"==typeof t)return t;if(Ba(t))return NaN;if(Da(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Da(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(X,"");var n=ot.test(t);return n||st.test(t)?zt(t.slice(2),n?2:8):rt.test(t)?NaN:+t}function Za(t){return lr(t,ds(t))}function Ja(t){return null==t?"":zi(t)}var Qa=dr(function(t,e){if(no(e)||Ca(e))lr(e,us(e),t);else for(var n in e)Et.call(e,n)&&Vn(t,n,e[n])}),$a=dr(function(t,e){lr(e,ds(e),t)}),ts=dr(function(t,e,n,i){lr(e,ds(e),t,i)}),es=dr(function(t,e,n,i){lr(e,us(e),t,i)}),ns=Lr(Gn),is=ki(function(t,e){t=gt(t);var n=-1,i=e.length,r=i>2?e[2]:void 0;for(r&&Qr(e[0],e[1],r)&&(i=1);++n1),e}),lr(t,jr(t),n),i&&(n=Wn(n,7,Dr));for(var r=e.length;r--;)Hi(n,e[r]);return n}),gs=Lr(function(t,e){return null==t?{}:function(t,e){return Ti(t,e,function(e,n){return as(t,n)})}(t,e)});function ms(t,e){if(null==t)return{};var n=ue(jr(t),function(t){return[t]});return e=Br(e),Ti(t,n,function(t,n){return e(t,n[0])})}var vs=_r(us),ys=_r(ds);function bs(t){return null==t?[]:Oe(t,us(t))}var ws=gr(function(t,e,n){return e=e.toLowerCase(),t+(n?Ss(e):e)});function Ss(t){return _s(Ja(t).toLowerCase())}function xs(t){return(t=Ja(t))&&t.replace(lt,ke).replace(It,"")}var Ms=gr(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Es=gr(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Cs=fr("toLowerCase"),As=gr(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Ts=gr(function(t,e,n){return t+(n?" ":"")+_s(e)}),Os=gr(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),_s=fr("toUpperCase");function Ps(t,e,n){return t=Ja(t),void 0===(e=n?void 0:e)?function(t){return Lt.test(t)}(t)?function(t){return t.match(Dt)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Is=ki(function(t,e){try{return ie(t,void 0,e)}catch(t){return _a(t)?t:new pt(t)}}),ks=Lr(function(t,e){return oe(e,function(e){e=mo(e),zn(t,e,ca(t[e],t))}),t});function Ds(t){return function(){return t}}var Rs=yr(),Ls=yr(!0);function Ns(t){return t}function js(t){return yi("function"==typeof t?t:Wn(t,1))}var Vs=ki(function(t,e){return function(n){return hi(n,t,e)}}),Fs=ki(function(t,e){return function(n){return hi(t,n,e)}});function Us(t,e,n){var i=us(e),r=oi(e,i);null!=n||Da(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=oi(e,us(e)));var o=!(Da(n)&&"chain"in n&&!n.chain),a=Pa(t);return oe(r,function(n){var i=e[n];t[n]=i,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=cr(this.__actions__)).push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,de([this.value()],arguments))})}),t}function Bs(){}var zs=xr(ue),Gs=xr(ae),Hs=xr(fe);function Ws(t){return $r(t)?xe(mo(t)):function(t){return function(e){return ai(e,t)}}(t)}var qs=Er(),Ks=Er(!0);function Xs(){return[]}function Ys(){return!1}var Zs,Js=Sr(function(t,e){return t+e},0),Qs=Tr("ceil"),$s=Sr(function(t,e){return t/e},1),tc=Tr("floor"),ec=Sr(function(t,e){return t*e},1),nc=Tr("round"),ic=Sr(function(t,e){return t-e},0);return Cn.after=function(t,e){if("function"!=typeof e)throw new yt(o);return t=Ka(t),function(){if(--t<1)return e.apply(this,arguments)}},Cn.ary=aa,Cn.assign=Qa,Cn.assignIn=$a,Cn.assignInWith=ts,Cn.assignWith=es,Cn.at=ns,Cn.before=sa,Cn.bind=ca,Cn.bindAll=ks,Cn.bindKey=la,Cn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ma(t)?t:[t]},Cn.chain=Wo,Cn.chunk=function(t,e,n){e=(n?Qr(t,e,n):void 0===e)?1:nn(Ka(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,a=0,s=i(Ye(r/e));or?0:r+n),(i=void 0===i||i>r?r:Ka(i))<0&&(i+=r),i=n>i?0:Xa(i);n>>0)?(t=Ja(t))&&("string"==typeof e||null!=e&&!Va(e))&&!(e=zi(e))&&Le(t)?tr(Be(t),0,n):t.split(e,n):[]},Cn.spread=function(t,e){if("function"!=typeof t)throw new yt(o);return e=null==e?0:nn(Ka(e),0),ki(function(n){var i=n[e],r=tr(n,0,e);return i&&de(r,i),ie(t,this,r)})},Cn.tail=function(t){var e=null==t?0:t.length;return e?Ni(t,1,e):[]},Cn.take=function(t,e,n){return t&&t.length?Ni(t,0,(e=n||void 0===e?1:Ka(e))<0?0:e):[]},Cn.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?Ni(t,(e=i-(e=n||void 0===e?1:Ka(e)))<0?0:e,i):[]},Cn.takeRightWhile=function(t,e){return t&&t.length?qi(t,Br(e,3),!1,!0):[]},Cn.takeWhile=function(t,e){return t&&t.length?qi(t,Br(e,3)):[]},Cn.tap=function(t,e){return e(t),t},Cn.throttle=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new yt(o);return Da(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),ua(t,e,{leading:i,maxWait:e,trailing:r})},Cn.thru=qo,Cn.toArray=Wa,Cn.toPairs=vs,Cn.toPairsIn=ys,Cn.toPath=function(t){return Ma(t)?ue(t,mo):Ba(t)?[t]:cr(go(Ja(t)))},Cn.toPlainObject=Za,Cn.transform=function(t,e,n){var i=Ma(t),r=i||Ta(t)||za(t);if(e=Br(e,4),null==n){var o=t&&t.constructor;n=r?i?new o:[]:Da(t)&&Pa(o)?An(qt(t)):{}}return(r?oe:ii)(t,function(t,i,r){return e(n,t,i,r)}),n},Cn.unary=function(t){return aa(t,1)},Cn.union=Ro,Cn.unionBy=Lo,Cn.unionWith=No,Cn.uniq=function(t){return t&&t.length?Gi(t):[]},Cn.uniqBy=function(t,e){return t&&t.length?Gi(t,Br(e,2)):[]},Cn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Gi(t,void 0,e):[]},Cn.unset=function(t,e){return null==t||Hi(t,e)},Cn.unzip=jo,Cn.unzipWith=Vo,Cn.update=function(t,e,n){return null==t?t:Wi(t,e,Ji(n))},Cn.updateWith=function(t,e,n,i){return i="function"==typeof i?i:void 0,null==t?t:Wi(t,e,Ji(n),i)},Cn.values=bs,Cn.valuesIn=function(t){return null==t?[]:Oe(t,ds(t))},Cn.without=Fo,Cn.words=Ps,Cn.wrap=function(t,e){return ma(Ji(e),t)},Cn.xor=Uo,Cn.xorBy=Bo,Cn.xorWith=zo,Cn.zip=Go,Cn.zipObject=function(t,e){return Yi(t||[],e||[],Vn)},Cn.zipObjectDeep=function(t,e){return Yi(t||[],e||[],Di)},Cn.zipWith=Ho,Cn.entries=vs,Cn.entriesIn=ys,Cn.extend=$a,Cn.extendWith=ts,Us(Cn,Cn),Cn.add=Js,Cn.attempt=Is,Cn.camelCase=ws,Cn.capitalize=Ss,Cn.ceil=Qs,Cn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=Ya(n))==n?n:0),void 0!==e&&(e=(e=Ya(e))==e?e:0),Hn(Ya(t),e,n)},Cn.clone=function(t){return Wn(t,4)},Cn.cloneDeep=function(t){return Wn(t,5)},Cn.cloneDeepWith=function(t,e){return Wn(t,5,e="function"==typeof e?e:void 0)},Cn.cloneWith=function(t,e){return Wn(t,4,e="function"==typeof e?e:void 0)},Cn.conformsTo=function(t,e){return null==e||qn(t,e,us(e))},Cn.deburr=xs,Cn.defaultTo=function(t,e){return null==t||t!=t?e:t},Cn.divide=$s,Cn.endsWith=function(t,e,n){t=Ja(t),e=zi(e);var i=t.length,r=n=void 0===n?i:Hn(Ka(n),0,i);return(n-=e.length)>=0&&t.slice(n,r)==e},Cn.eq=ba,Cn.escape=function(t){return(t=Ja(t))&&F.test(t)?t.replace(j,De):t},Cn.escapeRegExp=function(t){return(t=Ja(t))&&K.test(t)?t.replace(q,"\\$&"):t},Cn.every=function(t,e,n){var i=Ma(t)?ae:Jn;return n&&Qr(t,e,n)&&(e=void 0),i(t,Br(e,3))},Cn.find=Yo,Cn.findIndex=xo,Cn.findKey=function(t,e){return me(t,Br(e,3),ii)},Cn.findLast=Zo,Cn.findLastIndex=Mo,Cn.findLastKey=function(t,e){return me(t,Br(e,3),ri)},Cn.floor=tc,Cn.forEach=Jo,Cn.forEachRight=Qo,Cn.forIn=function(t,e){return null==t?t:ei(t,Br(e,3),ds)},Cn.forInRight=function(t,e){return null==t?t:ni(t,Br(e,3),ds)},Cn.forOwn=function(t,e){return t&&ii(t,Br(e,3))},Cn.forOwnRight=function(t,e){return t&&ri(t,Br(e,3))},Cn.get=os,Cn.gt=wa,Cn.gte=Sa,Cn.has=function(t,e){return null!=t&&Xr(t,e,ui)},Cn.hasIn=as,Cn.head=Co,Cn.identity=Ns,Cn.includes=function(t,e,n,i){t=Ca(t)?t:bs(t),n=n&&!i?Ka(n):0;var r=t.length;return n<0&&(n=nn(r+n,0)),Ua(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&ye(t,e,n)>-1},Cn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:Ka(n);return r<0&&(r=nn(i+r,0)),ye(t,e,r)},Cn.inRange=function(t,e,n){return e=qa(e),void 0===n?(n=e,e=0):n=qa(n),function(t,e,n){return t>=rn(e,n)&&t=-9007199254740991&&t<=9007199254740991},Cn.isSet=Fa,Cn.isString=Ua,Cn.isSymbol=Ba,Cn.isTypedArray=za,Cn.isUndefined=function(t){return void 0===t},Cn.isWeakMap=function(t){return Ra(t)&&Kr(t)==x},Cn.isWeakSet=function(t){return Ra(t)&&"[object WeakSet]"==ci(t)},Cn.join=function(t,e){return null==t?"":tn.call(t,e)},Cn.kebabCase=Ms,Cn.last=_o,Cn.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==n&&(r=(r=Ka(n))<0?nn(i+r,0):rn(r,i-1)),e==e?function(t,e,n){for(var i=r+1;i--;)if(t[i]===e)return i;return i}(t,e):ve(t,we,r,!0)},Cn.lowerCase=Es,Cn.lowerFirst=Cs,Cn.lt=Ga,Cn.lte=Ha,Cn.max=function(t){return t&&t.length?Qn(t,Ns,li):void 0},Cn.maxBy=function(t,e){return t&&t.length?Qn(t,Br(e,2),li):void 0},Cn.mean=function(t){return Se(t,Ns)},Cn.meanBy=function(t,e){return Se(t,Br(e,2))},Cn.min=function(t){return t&&t.length?Qn(t,Ns,wi):void 0},Cn.minBy=function(t,e){return t&&t.length?Qn(t,Br(e,2),wi):void 0},Cn.stubArray=Xs,Cn.stubFalse=Ys,Cn.stubObject=function(){return{}},Cn.stubString=function(){return""},Cn.stubTrue=function(){return!0},Cn.multiply=ec,Cn.nth=function(t,e){return t&&t.length?Ci(t,Ka(e)):void 0},Cn.noConflict=function(){return Wt._===this&&(Wt._=_t),this},Cn.noop=Bs,Cn.now=oa,Cn.pad=function(t,e,n){t=Ja(t);var i=(e=Ka(e))?Ue(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Mr(Ze(r),n)+t+Mr(Ye(r),n)},Cn.padEnd=function(t,e,n){t=Ja(t);var i=(e=Ka(e))?Ue(t):0;return e&&ie){var i=t;t=e,e=i}if(n||t%1||e%1){var r=sn();return rn(t+r*(e-t+Bt("1e-"+((r+"").length-1))),e)}return Pi(t,e)},Cn.reduce=function(t,e,n){var i=Ma(t)?pe:Ee,r=arguments.length<3;return i(t,Br(e,4),n,r,Yn)},Cn.reduceRight=function(t,e,n){var i=Ma(t)?he:Ee,r=arguments.length<3;return i(t,Br(e,4),n,r,Zn)},Cn.repeat=function(t,e,n){return e=(n?Qr(t,e,n):void 0===e)?1:Ka(e),Ii(Ja(t),e)},Cn.replace=function(){var t=arguments,e=Ja(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Cn.result=function(t,e,n){var i=-1,r=(e=Qi(e,t)).length;for(r||(r=1,t=void 0);++i9007199254740991)return[];var n=4294967295,i=rn(t,4294967295);t-=4294967295;for(var r=Ae(i,e=Br(e));++n=o)return t;var s=n-Ue(i);if(s<1)return i;var c=a?tr(a,0,s).join(""):t.slice(0,s);if(void 0===r)return c+i;if(a&&(s+=c.length-s),Va(r)){if(t.slice(s).search(r)){var l,u=c;for(r.global||(r=mt(r.source,Ja(it.exec(r))+"g")),r.lastIndex=0;l=r.exec(u);)var d=l.index;c=c.slice(0,void 0===d?s:d)}}else if(t.indexOf(zi(r),s)!=s){var p=c.lastIndexOf(r);p>-1&&(c=c.slice(0,p))}return c+i},Cn.unescape=function(t){return(t=Ja(t))&&V.test(t)?t.replace(N,ze):t},Cn.uniqueId=function(t){var e=++Ct;return Ja(t)+e},Cn.upperCase=Os,Cn.upperFirst=_s,Cn.each=Jo,Cn.eachRight=Qo,Cn.first=Co,Us(Cn,(Zs={},ii(Cn,function(t,e){Et.call(Cn.prototype,e)||(Zs[e]=t)}),Zs),{chain:!1}),Cn.VERSION="4.17.19",oe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Cn[t].placeholder=Cn}),oe(["drop","take"],function(t,e){_n.prototype[t]=function(n){n=void 0===n?1:nn(Ka(n),0);var i=this.__filtered__&&!e?new _n(this):this.clone();return i.__filtered__?i.__takeCount__=rn(n,i.__takeCount__):i.__views__.push({size:rn(n,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},_n.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),oe(["filter","map","takeWhile"],function(t,e){var n=e+1,i=1==n||3==n;_n.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Br(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}}),oe(["head","last"],function(t,e){var n="take"+(e?"Right":"");_n.prototype[t]=function(){return this[n](1).value()[0]}}),oe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");_n.prototype[t]=function(){return this.__filtered__?new _n(this):this[n](1)}}),_n.prototype.compact=function(){return this.filter(Ns)},_n.prototype.find=function(t){return this.filter(t).head()},_n.prototype.findLast=function(t){return this.reverse().find(t)},_n.prototype.invokeMap=ki(function(t,e){return"function"==typeof t?new _n(this):this.map(function(n){return hi(n,t,e)})}),_n.prototype.reject=function(t){return this.filter(fa(Br(t)))},_n.prototype.slice=function(t,e){t=Ka(t);var n=this;return n.__filtered__&&(t>0||e<0)?new _n(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=Ka(e))<0?n.dropRight(-e):n.take(e-t)),n)},_n.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},_n.prototype.toArray=function(){return this.take(4294967295)},ii(_n.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),r=Cn[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);r&&(Cn.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,s=e instanceof _n,c=a[0],l=s||Ma(e),u=function(t){var e=r.apply(Cn,de([t],a));return i&&d?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=o&&!d,f=s&&!p;if(!o&&l){e=f?e:new _n(this);var g=t.apply(e,a);return g.__actions__.push({func:qo,args:[u],thisArg:void 0}),new On(g,d)}return h&&f?t.apply(this,a):(g=this.thru(u),h?i?g.value()[0]:g.value():g)})}),oe(["pop","push","shift","sort","splice","unshift"],function(t){var e=bt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Cn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(Ma(r)?r:[],t)}return this[n](function(n){return e.apply(Ma(n)?n:[],t)})}}),ii(_n.prototype,function(t,e){var n=Cn[e];if(n){var i=n.name+"";Et.call(mn,i)||(mn[i]=[]),mn[i].push({name:e,func:n})}}),mn[br(void 0,2).name]=[{name:"wrapper",func:void 0}],_n.prototype.clone=function(){var t=new _n(this.__wrapped__);return t.__actions__=cr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=cr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=cr(this.__views__),t},_n.prototype.reverse=function(){if(this.__filtered__){var t=new _n(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},_n.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ma(t),i=e<0,r=n?t.length:0,o=function(t,e,n){for(var i=-1,r=n.length;++i=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Cn.prototype.plant=function(t){for(var e,n=this;n instanceof Tn;){var i=yo(n);i.__index__=0,i.__values__=void 0,e?r.__wrapped__=i:e=i;var r=i;n=n.__wrapped__}return r.__wrapped__=t,e},Cn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof _n){var e=t;return this.__actions__.length&&(e=new _n(this)),(e=e.reverse()).__actions__.push({func:qo,args:[Do],thisArg:void 0}),new On(e,this.__chain__)}return this.thru(Do)},Cn.prototype.toJSON=Cn.prototype.valueOf=Cn.prototype.value=function(){return Ki(this.__wrapped__,this.__actions__)},Cn.prototype.first=Cn.prototype.head,Me&&(Cn.prototype[Me]=function(){return this}),Cn}();Wt._=Ge,void 0===(r=function(){return Ge}.call(e,n,e,i))||(i.exports=r)}).call(this)}).call(this,n(213),n(452)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleWarning=function(t){}},function(t,e,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]-1&&(o.url="../../indoor/"+sceneNum+"/"+o.url);return console.log("url:"+o.url),n=this.fillConfig(o,n),this.request(n,i).then(function(t){return r.success(t)}).catch(function(t){return r.fail(t)})},t.prototype.httpRequest=function(t,e){var n=this;return void 0===e&&(e=!0),t.method||(t.method="GET"),this.request(t,e).then(function(t){return n.success(t)}).catch(function(t){return n.fail(t)})},t.prototype.authorizedHttpRequest=function(t,e){return void 0===e&&(e=!0),this.addAuthorizationHeader(t),this.httpRequest(t,e)},t.prototype.postApi=function(t,e,n,i){var r=this;void 0===i&&(i=!0);var o={url:this.apiEndpoint+t,method:"POST",data:e,withCredentials:!0};return n=this.fillConfig(o,n),this.request(n,i).then(function(t){return r.success(t)}).catch(function(t){return r.fail(t)})},t.prototype.putApi=function(t,e,n,i){var r=this;void 0===i&&(i=!0);var o={url:this.apiEndpoint+t,method:"PUT",data:e,withCredentials:!0};return n=this.fillConfig(o,n),this.request(n,i).then(function(t){return r.success(t)}).catch(function(t){return r.fail(t)})},t.prototype.deleteApi=function(t,e,n){var i=this;void 0===n&&(n=!0);var r={withCredentials:!0,url:this.apiEndpoint+t,method:"DELETE"};return e=this.fillConfig(r,e),this.request(e,n).then(function(t){return i.success(t)}).catch(function(t){return i.fail(t)})},t.prototype.directDownload=function(t,e,n,i){void 0===i&&(i=!0),e[this.JWTTokenService.getJwtUrlParamKey()]=this.JWTTokenService.getJwt();var r=this.$httpParamSerializer(e),o=i?this.apiEndpoint+t:t;n=o.substring(o.lastIndexOf("/")+1),c.clickHiddenURL(o+"?"+r,n)},t.prototype.request=function(t,e){return r(this,void 0,void 0,function(){return o(this,function(n){return e?[2,this.errorWrapper.wrap(l.wrapAngularJsPromise(this.$http(t)))]:[2,this.$http(t)]})})},t.prototype.success=function(t){return t&&200===t.status?t.data?t.data:t:Promise.reject(t)},t.prototype.fail=function(t){return 401===t.status&&this.JWTTokenService.eraseJwt(),Promise.reject(t)},t.prototype.fillConfig=function(t,e){return e=i(i({},e),t),this.addAuthorizationHeader(e),this.addCacheDisabler(e),this.addNullToUndefinedResponseTransformer(e),e},t.prototype.addAuthorizationHeader=function(t){this.JWTTokenService.getJwt()&&(this.JWTTokenService.isNotExpired()?(t.headers=t.headers||{},this.JWTTokenService.setJwtHeaderOnConfig(t.headers)):this.JWTTokenService.eraseJwt())},t.prototype.addCacheDisabler=function(t){if(s.isBrowserIE()){var e=t.params||{};e.browserCacheBuster=(new Date).getTime(),t.params=e}},t.prototype.addNullToUndefinedResponseTransformer=function(e){var n=this.$http.defaults.transformResponse,i=a.isArray(n)?n:[n];i.push(function(e){return l.mapValuesDeep(e,function(e){return t.nullTransformer(e)})}),e.transformResponse=i},t.nullTransformer=function(t){return null!==t?t:void 0},t.prototype.addAuthorizationQueryParameter=function(t){var e=new URL(t,u.getBaseUrl());this.JWTTokenService.setJwtOnUrl(e);var n=e.href.indexOf(t);return e.href.slice(n)},t.ɵfac=function(e){return new(e||t)(h.ɵɵinject("$http"),h.ɵɵinject("apiEndpoint"),h.ɵɵinject(f.JWTTokenService),h.ɵɵinject("$httpParamSerializer"),h.ɵɵinject(g.ErrorService))},t.ɵprov=h.ɵɵdefineInjectable({token:t,factory:t.ɵfac,providedIn:"root"}),t}();e.RestService=m,h.ɵsetClassMetadata(m,[{type:p.Injectable,args:[{providedIn:"root"}]}],function(){return[{type:void 0,decorators:[{type:p.Inject,args:["$http"]}]},{type:void 0,decorators:[{type:p.Inject,args:["apiEndpoint"]}]},{type:f.JWTTokenService},{type:void 0,decorators:[{type:p.Inject,args:["$httpParamSerializer"]}]},{type:g.ErrorService}]},null),a.module("IVWebApp").service("RestService",d.downgradeInjectable(m))},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n,i,r,o=t[1]||"",a=t[3];if(!a)return o;if(e&&"function"==typeof btoa){var s=(n=a,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),c=a.sources.map(function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")});return[o].concat(c).concat([s]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n}).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o0)this.TransformService.setLocalCoordinateSystem(t[0].globalLocation);else if(e.length>0){var n=e[0],i=n.vectorEntity instanceof o.Polygon?n.vectorEntity.boundary[0]:n.vectorEntity.coordinates[0];this.TransformService.setLocalCoordinateSystem(new a.Vector3(i.x,i.y,0))}else this.TransformService.unsetLocalCoordinateSystem()},t.prototype.toLocal=function(t,e,n){if(!this.TransformService.haveLocalCoordinateSystem())throw new Error("GeoTransformationService not initialized");return void 0===n?this.TransformService.globalToLocal.transform(new a.Vector2(t,e)):this.TransformService.globalToLocal.transform(new a.Vector3(t,e,n))},t.prototype.vectorToLocal=function(t){if(t){if(!this.TransformService.haveLocalCoordinateSystem())throw new Error("GeoTransformationService not initialized");return a.Vector2,this.TransformService.globalToLocal.transform(t.clone())}},t.prototype.vectorArrayToLocal=function(t){var e=this;return i.map(t,function(t){return e.vectorToLocal(t)})},t.prototype.toGlobal=function(t){if(console.warn('Deprecated usage of "toGlobal", use "vector2ToGlobal or vectorToGlobal" instead.'),!this.TransformService.haveLocalCoordinateSystem())throw new Error("GeoTransformationService not initialized");var e=this.TransformService.localToGlobal.transform(new a.Vector3(t.x,t.y,0));return void 0!==t.z?[e.x,e.y]:[e.x,e.y,e.z]},t.prototype.vector2ToGlobal=function(t){if(t){if(!this.TransformService.haveLocalCoordinateSystem())throw new Error("GeoTransformationService not initialized");return this.TransformService.localToGlobal.transform(t.clone())}},t.prototype.vectorToGlobal=function(t){if(t){if(!this.TransformService.haveLocalCoordinateSystem())throw new Error("GeoTransformationService not initialized");return this.TransformService.localToGlobal.transform(t.clone())}},t.prototype.toLocalHeight=function(t){return this.TransformService.globalToLocal.transform(new a.Vector3(0,0,t)).z},t.prototype.toGlobalHeight=function(t){return this.TransformService.localToGlobal.transform(new a.Vector3(0,0,t)).z},t.prototype.setOffsetFromGlobal=function(t){this.TransformService.setLocalCoordinateSystem(t)},t.prototype.updateLocalCoordinates=function(){this.offsetChanged.emit()},t.prototype.checkAndFixOffset=function(e){e.location.length()>t.RELOCATE_LOCAL_SYSTEM_THRESHOLD&&this.setOffsetFromGlobal(e.globalLocation)},t.RELOCATE_LOCAL_SYSTEM_THRESHOLD=1e4,t.ɵfac=function(e){return new(e||t)(l.ɵɵinject(u.TransformService))},t.ɵprov=l.ɵɵdefineInjectable({token:t,factory:t.ɵfac,providedIn:"root"}),t}();e.GeoTransformationService=d,l.ɵsetClassMetadata(d,[{type:c.Injectable,args:[{providedIn:"root"}]}],function(){return[{type:u.TransformService}]},null),r.module("IVWebApp").service("GeoTransformationService",s.downgradeInjectable(d))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(16),o=(n(251),n(61),n(1036));n(54),n(251);var a=n(25),s=n(144),c=n(92),l=n(375),u=(n(36),n(6)),d=n(0),p=n(0),h=n(251),f=n(61),g=n(36),m=function(){function t(t,e,n,i,l){var u,d;this.ConfigRepository=t,this.$location=e,this.MessageReportingService=n,this.gettextCatalog=i,this.AuthenticationService=l,this.updated=new r.Signal,this.groupedConfigs=[],this.changedConfigs={},this.configMap={},this.validators=((u={})[a.Configs.LAYERS_POLYGON_VECTOR_MAP_STYLE]=new o.VectorMapStyleSheetValidator(this.gettextCatalog.getString("Vector Map Style Sheet",void 0,"title"),this.gettextCatalog.getString("Failed to parse vector map style sheet:")),u),this.LICENSABLE_CONFIGS=((d={})[c.LicenseFeatureType.ROUTING]=[a.Configs.ROUTING_ENABLED],d[c.LicenseFeatureType.ANALYST]=[a.Configs.TRACKING_CODE,a.Configs.TRACKING_ENABLED],d[c.LicenseFeatureType.USER_MANAGEMENT]=[a.Configs.AUTH_LOCAL_ENABLED],d),this.CONFIG_ALIASES=[{original:a.Configs.LAYERS_POINTCLOUD_VISIBLE,alias:"pc"},{original:a.Configs.CORE_INIT_LAT,alias:"vlat"},{original:a.Configs.CORE_INIT_LON,alias:"vlon"}],this.configDeferred=new s.Deferred,this.fetch()}return t.prototype.getLicensableConfigFeature=function(t){for(var e in this.LICENSABLE_CONFIGS)if(this.LICENSABLE_CONFIGS[e].indexOf(t)>-1)return l.LicenseFeature.getFeatureTypeByCode(e)},t.prototype.fetch=function(t){var e=this;void 0===t&&(t=!1),this.configDeferred=new s.Deferred,this.initialized=this.configDeferred.promise,this.groupedConfigs=[],this.AuthenticationService.isDataAccessible().then(function(t){return t?Promise.resolve():(e.ConfigRepository.resetCache(),e.configArray=[],e.updateConfigMap(),e.buildGroupedConfig(),Promise.reject(void 0))}).then(function(){return e.ConfigRepository.findAll(t)}).then(function(){e.configArray=e.ConfigRepository.data,e.updateConfigMap(),e.buildGroupedConfig()}).catch(function(){e.configDeferred.reject()})},t.prototype.buildGroupedConfig=function(){var t=i.copy(this.configArray).filter(function(t){return t&&t.editInForm}).map(function(t){return"boolean"===t.type&&(t.value="true"===t.value),t});if(0!==t.length){var e=t.sort(function(t,e){return t.category.localeCompare(e.category)}),n=this.groupedConfigs[this.groupedConfigs.push([])-1];n.category=e[0].category;for(var r=0,o=e;r0&&(this.hasNewLinks=!0,n.newLink=!0),new a(this.head,n)},t.prototype.disconnect=function(t){for(var e=this.head.next;e!==this.head;e=e.next)if(e.callback===t)return e.unlink(),!0;return!1},t.prototype.disconnectAll=function(){for(;this.head.next!==this.head;)this.head.next.unlink()},t.prototype.emitInternal=function(){this.emitDepth++;for(var t=this.head.next;t!==this.head;t=t.next)t.isEnabled()&&t.callback&&t.callback.apply(null,arguments);this.emitDepth--,this.unsetNewLink()},t.prototype.emitCollecting=function(t,e){this.emitDepth++;for(var n=this.head.next;n!==this.head;n=n.next)if(n.isEnabled()&&n.callback){var i=n.callback.apply(null,e);if(!t.handleResult(i))break}this.emitDepth--,this.unsetNewLink()},t.prototype.unsetNewLink=function(){if(this.hasNewLinks&&0==this.emitDepth){for(var t=this.head.next;t!==this.head;t=t.next)t.newLink=!1;this.hasNewLinks=!1}},t}();e.Signal=c;var l=function(t){var e=this;this.emit=function(){t.emitCollecting(e,arguments)}};e.Collector=l;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.handleResult=function(t){return this.result=t,!0},e.prototype.getResult=function(){return this.result},e.prototype.reset=function(){delete this.result},e}(l);e.CollectorLast=u;var d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.result=!1,e}return r(e,t),e.prototype.handleResult=function(t){return this.result=t,!!this.result},e.prototype.getResult=function(){return this.result},e.prototype.reset=function(){this.result=!1},e}(l);e.CollectorUntil0=d;var p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.result=!1,e}return r(e,t),e.prototype.handleResult=function(t){return this.result=t,!this.result},e.prototype.getResult=function(){return this.result},e.prototype.reset=function(){this.result=!1},e}(l);e.CollectorWhile0=p;var h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.result=[],e}return r(e,t),e.prototype.handleResult=function(t){return this.result.push(t),!0},e.prototype.getResult=function(){return this.result},e.prototype.reset=function(){this.result.length=0},e}(l);e.CollectorArray=h},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(16),o=n(255),a=(n(15),n(25)),s=n(8),c=n(20),l=n(144),u=n(6),d=n(0),p=n(0),h=n(15),f=function(){function e(t){var e=this;this.ConfigService=t,this.onTransitionStart=new r.Signal,this.onTransitionEnd=new r.Signal,this.onViewSwap=new r.Signal,this.secondaryViewVisibilityChanged=new r.Signal,this.secondaryViewHovered=!1,this.mainViewDeferred=new l.Deferred,this.mapViewDeferred=new l.Deferred,this.viewSwapAllowed=!0,this.primaryView=o.ViewType.PANORAMA,this._showSecondaryView=!0,t.initialized.then(function(){e.showSecondaryView=t.getBoolean(a.Configs.LAYERS_MAP_VISIBLE,e.showSecondaryView)}).catch(s.handleWarning),this.mainViewDeferred.promise.then(function(t){return e.mainView=t}).catch(s.handleWarning),this.mapViewDeferred.promise.then(function(t){return e.mapView=t}).catch(s.handleWarning)}return Object.defineProperty(e.prototype,"showSecondaryView",{get:function(){return this._showSecondaryView},set:function(t){this._showSecondaryView=t,c.invalidateAngular(),this.secondaryViewVisibilityChanged.emit(t)},enumerable:!0,configurable:!0}),e.prototype.setPrimaryView=function(t){this.primaryView!==t&&this.swapViews()},e.prototype.swapViews=function(){var e=t(this.mainView.divContainer.container),n=t(this.mapView.divContainer.container),i=e.parent(),r=n.parent();e.prependTo(r),n.prependTo(i),this.mainView.divContainer.onResize(),this.mapView.divContainer.onResize(),this.primaryView=this.isMapPrimaryView()?o.ViewType.PANORAMA:o.ViewType.MAP,this.onViewSwap.emit(this.primaryView)},e.prototype.canSwapViews=function(){return this.showSecondaryView},e.prototype.isMapVisible=function(){return this.showSecondaryView||this.isMapPrimaryView()},e.prototype.getCurrentMainViewMode=function(){return this.mainView.viewMode},e.prototype.isPanoVisible=function(){return this.showSecondaryView||this.isPanoPrimaryView()},e.prototype.getPrimaryView=function(){return this.primaryView},e.prototype.isMapPrimaryView=function(){return this.primaryView===o.ViewType.MAP},e.prototype.isPanoPrimaryView=function(){return this.primaryView===o.ViewType.PANORAMA},e.ɵfac=function(t){return new(t||e)(p.ɵɵinject(h.ConfigService))},e.ɵprov=p.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}();e.ViewService=f,p.ɵsetClassMetadata(f,[{type:d.Injectable,args:[{providedIn:"root"}]}],function(){return[{type:h.ConfigService}]},null),i.module("IVWebApp").service("ViewService",u.downgradeInjectable(f))}).call(this,n(19))},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i,r,o; /*! * jQuery JavaScript Library v2.2.4 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-05-20T17:23Z */r="undefined"!=typeof window?window:this,o=function(n,r){var o=[],a=n.document,s=o.slice,c=o.concat,l=o.push,u=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,f={},g=function(t,e){return new g.fn.init(t,e)},m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,v=/^-ms-/,y=/-([\da-z])/gi,b=function(t,e){return e.toUpperCase()};function w(t){var e=!!t&&"length"in t&&t.length,n=g.type(t);return"function"!==n&&!g.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}g.fn=g.prototype={jquery:"2.2.4",constructor:g,selector:"",length:0,toArray:function(){return s.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:s.call(this)},pushStack:function(t){var e=g.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return g.each(this,t)},map:function(t){return this.pushStack(g.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n=0},isPlainObject:function(t){var e;if("object"!==g.type(t)||t.nodeType||g.isWindow(t))return!1;if(t.constructor&&!h.call(t,"constructor")&&!h.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||h.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[p.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;(t=g.trim(t))&&(1===t.indexOf("use strict")?((e=a.createElement("script")).text=t,a.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(v,"ms-").replace(y,b)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,i=0;if(w(t))for(n=t.length;i+~]|"+N+")"+N+"*"),H=new RegExp("="+N+"*([^\\]'\"]*?)"+N+"*\\]","g"),W=new RegExp(F),q=new RegExp("^"+j+"$"),K={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+V),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,$=/'|\\/g,tt=new RegExp("\\\\([\\da-f]{1,6}"+N+"?|("+N+")|.)","ig"),et=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},nt=function(){p()};try{k.apply(_=D.call(S.childNodes),S.childNodes),_[S.childNodes.length].nodeType}catch(t){k={apply:_.length?function(t,e){I.apply(t,D.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function it(t,e,i,r){var o,s,l,u,d,f,v,y,x=e&&e.ownerDocument,M=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==M&&9!==M&&11!==M)return i;if(!r&&((e?e.ownerDocument||e:S)!==h&&p(e),e=e||h,g)){if(11!==M&&(f=J.exec(t)))if(o=f[1]){if(9===M){if(!(l=e.getElementById(o)))return i;if(l.id===o)return i.push(l),i}else if(x&&(l=x.getElementById(o))&&b(e,l)&&l.id===o)return i.push(l),i}else{if(f[2])return k.apply(i,e.getElementsByTagName(t)),i;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return k.apply(i,e.getElementsByClassName(o)),i}if(n.qsa&&!A[t+" "]&&(!m||!m.test(t))){if(1!==M)x=e,y=t;else if("object"!==e.nodeName.toLowerCase()){for((u=e.getAttribute("id"))?u=u.replace($,"\\$&"):e.setAttribute("id",u=w),s=(v=a(t)).length,d=q.test(u)?"#"+u:"[id='"+u+"']";s--;)v[s]=d+" "+ft(v[s]);y=v.join(","),x=Q.test(t)&&pt(e.parentNode)||e}if(y)try{return k.apply(i,x.querySelectorAll(y)),i}catch(t){}finally{u===w&&e.removeAttribute("id")}}}return c(t.replace(B,"$1"),e,i,r)}function rt(){var t=[];return function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function ot(t){return t[w]=!0,t}function at(t){var e=h.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function st(t,e){for(var n=t.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=e}function ct(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||1<<31)-(~t.sourceIndex||1<<31);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function lt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ut(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function dt(t){return ot(function(e){return e=+e,ot(function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function pt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=it.support={},o=it.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},p=it.setDocument=function(t){var e,r,a=t?t.ownerDocument||t:S;return a!==h&&9===a.nodeType&&a.documentElement?(f=(h=a).documentElement,g=!o(h),(r=h.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",nt,!1):r.attachEvent&&r.attachEvent("onunload",nt)),n.attributes=at(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=at(function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(h.getElementsByClassName),n.getById=at(function(t){return f.appendChild(t).id=w,!h.getElementsByName||!h.getElementsByName(w).length}),n.getById?(i.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}},i.filter.ID=function(t){var e=t.replace(tt,et);return function(t){return t.getAttribute("id")===e}}):(delete i.find.ID,i.filter.ID=function(t){var e=t.replace(tt,et);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(n.qsa=Z.test(h.querySelectorAll))&&(at(function(t){f.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+N+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+N+"*(?:value|"+L+")"),t.querySelectorAll("[id~="+w+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")}),at(function(t){var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+N+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Z.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(t){n.disconnectedMatch=y.call(t,"div"),y.call(t,"[s!='']:x"),v.push("!=",F)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=Z.test(f.compareDocumentPosition),b=e||Z.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},T=e?function(t,e){if(t===e)return d=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t===h||t.ownerDocument===S&&b(S,t)?-1:e===h||e.ownerDocument===S&&b(S,e)?1:u?R(u,t)-R(u,e):0:4&i?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!r||!o)return t===h?-1:e===h?1:r?-1:o?1:u?R(u,t)-R(u,e):0;if(r===o)return ct(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?ct(a[i],s[i]):a[i]===S?-1:s[i]===S?1:0},h):h},it.matches=function(t,e){return it(t,null,null,e)},it.matchesSelector=function(t,e){if((t.ownerDocument||t)!==h&&p(t),e=e.replace(H,"='$1']"),n.matchesSelector&&g&&!A[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return it(e,h,null,[t]).length>0},it.contains=function(t,e){return(t.ownerDocument||t)!==h&&p(t),b(t,e)},it.attr=function(t,e){(t.ownerDocument||t)!==h&&p(t);var r=i.attrHandle[e.toLowerCase()],o=r&&O.call(i.attrHandle,e.toLowerCase())?r(t,e,!g):void 0;return void 0!==o?o:n.attributes||!g?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},it.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},it.uniqueSort=function(t){var e,i=[],r=0,o=0;if(d=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(T),d){for(;e=t[o++];)e===t[o]&&(r=i.push(o));for(;r--;)t.splice(i[r],1)}return u=null,t},r=it.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=r(e);return n},(i=it.selectors={cacheLength:50,createPseudo:ot,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(tt,et),t[3]=(t[3]||t[4]||t[5]||"").replace(tt,et),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||it.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&it.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return K.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&W.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(tt,et).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=E[t+" "];return e||(e=new RegExp("(^|"+N+")"+t+"("+N+"|$)"))&&E(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(i){var r=it.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,c){var l,u,d,p,h,f,g=o!==a?"nextSibling":"previousSibling",m=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!c&&!s,b=!1;if(m){if(o){for(;g;){for(p=e;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&y){for(b=(h=(l=(u=(d=(p=m)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===x&&l[1])&&l[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(b=h=0)||f.pop();)if(1===p.nodeType&&++b&&p===e){u[t]=[x,h,b];break}}else if(y&&(b=h=(l=(u=(d=(p=e)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===x&&l[1]),!1===b)for(;(p=++h&&p&&p[g]||(b=h=0)||f.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(y&&((u=(d=p[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]=[x,b]),p!==e)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,e){var n,r=i.pseudos[t]||i.setFilters[t.toLowerCase()]||it.error("unsupported pseudo: "+t);return r[w]?r(e):r.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ot(function(t,n){for(var i,o=r(t,e),a=o.length;a--;)t[i=R(t,o[a])]=!(n[i]=o[a])}):function(t){return r(t,0,n)}):r}},pseudos:{not:ot(function(t){var e=[],n=[],i=s(t.replace(B,"$1"));return i[w]?ot(function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}}),has:ot(function(t){return function(e){return it(t,e).length>0}}),contains:ot(function(t){return t=t.replace(tt,et),function(e){return(e.textContent||e.innerText||r(e)).indexOf(t)>-1}}),lang:ot(function(t){return q.test(t||"")||it.error("unsupported lang: "+t),t=t.replace(tt,et).toLowerCase(),function(e){var n;do{if(n=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return Y.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:dt(function(){return[0]}),last:dt(function(t,e){return[e-1]}),eq:dt(function(t,e,n){return[n<0?n+e:n]}),even:dt(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:dt(function(t,e,n){for(var i=n<0?n+e:n;++i1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function vt(t,e,n,i,r){for(var o,a=[],s=0,c=t.length,l=null!=e;s-1&&(o[l]=!(a[l]=d))}}else v=vt(v===a?v.splice(f,v.length):v),r?r(null,a,v,c):k.apply(a,v)})}function bt(t){for(var e,n,r,o=t.length,a=i.relative[t[0].type],s=a||i.relative[" "],c=a?1:0,u=gt(function(t){return t===e},s,!0),d=gt(function(t){return R(e,t)>-1},s,!0),p=[function(t,n,i){var r=!a&&(i||n!==l)||((e=n).nodeType?u(t,n,i):d(t,n,i));return e=null,r}];c1&&mt(p),c>1&&ft(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(B,"$1"),n,c0,r=t.length>0,o=function(o,a,s,c,u){var d,f,m,v=0,y="0",b=o&&[],w=[],S=l,M=o||r&&i.find.TAG("*",u),E=x+=null==S?1:Math.random()||.1,C=M.length;for(u&&(l=a===h||a||u);y!==C&&null!=(d=M[y]);y++){if(r&&d){for(f=0,a||d.ownerDocument===h||(p(d),s=!g);m=t[f++];)if(m(d,a||h,s)){c.push(d);break}u&&(x=E)}n&&((d=!m&&d)&&v--,o&&b.push(d))}if(v+=y,n&&y!==v){for(f=0;m=e[f++];)m(b,w,a,s);if(o){if(v>0)for(;y--;)b[y]||w[y]||(w[y]=P.call(c));w=vt(w)}k.apply(c,w),u&&!o&&w.length>0&&v+e.length>1&&it.uniqueSort(c)}return u&&(x=E,l=S),b};return n?ot(o):o}(o,r))).selector=t}return s},c=it.select=function(t,e,r,o){var c,l,u,d,p,h="function"==typeof t&&t,f=!o&&a(t=h.selector||t);if(r=r||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&n.getById&&9===e.nodeType&&g&&i.relative[l[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(tt,et),e)||[])[0]))return r;h&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(c=K.needsContext.test(t)?0:l.length;c--&&(u=l[c],!i.relative[d=u.type]);)if((p=i.find[d])&&(o=p(u.matches[0].replace(tt,et),Q.test(l[0].type)&&pt(e.parentNode)||e))){if(l.splice(c,1),!(t=o.length&&ft(l)))return k.apply(r,o),r;break}}return(h||s(t,f))(o,e,!g,r,!e||Q.test(t)&&pt(e.parentNode)||e),r},n.sortStable=w.split("").sort(T).join("")===w,n.detectDuplicates=!!d,p(),n.sortDetached=at(function(t){return 1&t.compareDocumentPosition(h.createElement("div"))}),at(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||st("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&&at(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||st("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),at(function(t){return null==t.getAttribute("disabled")})||st(L,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),it}(n);g.find=S,g.expr=S.selectors,g.expr[":"]=g.expr.pseudos,g.uniqueSort=g.unique=S.uniqueSort,g.text=S.getText,g.isXMLDoc=S.isXML,g.contains=S.contains;var x=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&g(t).is(n))break;i.push(t)}return i},M=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},E=g.expr.match.needsContext,C=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,A=/^.[^:#\[\.,]*$/;function T(t,e,n){if(g.isFunction(e))return g.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return g.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(A.test(e))return g.filter(e,t,n);e=g.filter(e,t)}return g.grep(t,function(t){return u.call(e,t)>-1!==n})}g.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?g.find.matchesSelector(i,t)?[i]:[]:g.find.matches(t,g.grep(e,function(t){return 1===t.nodeType}))},g.fn.extend({find:function(t){var e,n=this.length,i=[],r=this;if("string"!=typeof t)return this.pushStack(g(t).filter(function(){for(e=0;e1?g.unique(i):i)).selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(T(this,t||[],!1))},not:function(t){return this.pushStack(T(this,t||[],!0))},is:function(t){return!!T(this,"string"==typeof t&&E.test(t)?g(t):t||[],!1).length}});var O,_=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(g.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||O,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:_.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof g?e[0]:e,g.merge(this,g.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:a,!0)),C.test(i[1])&&g.isPlainObject(e))for(i in e)g.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=a.getElementById(i[2]))&&r.parentNode&&(this.length=1,this[0]=r),this.context=a,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):g.isFunction(t)?void 0!==n.ready?n.ready(t):t(g):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),g.makeArray(t,this))}).prototype=g.fn,O=g(a);var P=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function k(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}g.fn.extend({has:function(t){var e=g(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&g.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?g.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?u.call(g(t),this[0]):u.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(g.uniqueSort(g.merge(this.get(),g(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),g.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return x(t,"parentNode")},parentsUntil:function(t,e,n){return x(t,"parentNode",n)},next:function(t){return k(t,"nextSibling")},prev:function(t){return k(t,"previousSibling")},nextAll:function(t){return x(t,"nextSibling")},prevAll:function(t){return x(t,"previousSibling")},nextUntil:function(t,e,n){return x(t,"nextSibling",n)},prevUntil:function(t,e,n){return x(t,"previousSibling",n)},siblings:function(t){return M((t.parentNode||{}).firstChild,t)},children:function(t){return M(t.firstChild)},contents:function(t){return t.contentDocument||g.merge([],t.childNodes)}},function(t,e){g.fn[t]=function(n,i){var r=g.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=g.filter(i,r)),this.length>1&&(I[t]||g.uniqueSort(r),P.test(t)&&r.reverse()),this.pushStack(r)}});var D,R=/\S+/g;function L(){a.removeEventListener("DOMContentLoaded",L),n.removeEventListener("load",L),g.ready()}g.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return g.each(t.match(R)||[],function(t,n){e[n]=!0}),e}(t):g.extend({},t);var e,n,i,r,o=[],a=[],s=-1,c=function(){for(r=t.once,i=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?g.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=a=[],n||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!i}};return l},g.extend({Deferred:function(t){var e=[["resolve","done",g.Callbacks("once memory"),"resolved"],["reject","fail",g.Callbacks("once memory"),"rejected"],["notify","progress",g.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return g.Deferred(function(n){g.each(e,function(e,o){var a=g.isFunction(t[e])&&t[e];r[o[1]](function(){var t=a&&a.apply(this,arguments);t&&g.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===i?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?g.extend(t,i):i}},r={};return i.pipe=i.then,g.each(e,function(t,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=s.call(arguments),a=o.length,c=1!==a||t&&g.isFunction(t.promise)?a:0,l=1===c?t:g.Deferred(),u=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?s.call(arguments):r,i===e?l.notifyWith(n,i):--c||l.resolveWith(n,i)}};if(a>1)for(e=new Array(a),n=new Array(a),i=new Array(a);r0||(D.resolveWith(a,[g]),g.fn.triggerHandler&&(g(a).triggerHandler("ready"),g(a).off("ready"))))}}),g.ready.promise=function(t){return D||(D=g.Deferred(),"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(g.ready):(a.addEventListener("DOMContentLoaded",L),n.addEventListener("load",L))),D.promise(t)},g.ready.promise();var N=function(t,e,n,i,r,o,a){var s=0,c=t.length,l=null==n;if("object"===g.type(n))for(s in r=!0,n)N(t,e,s,n[s],!0,o,a);else if(void 0!==i&&(r=!0,g.isFunction(i)||(a=!0),l&&(a?(e.call(t,i),e=null):(l=e,e=function(t,e,n){return l.call(g(t),n)})),e))for(;s-1&&void 0!==n&&U.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){U.remove(this,t)})}}),g.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=F.get(t,e),n&&(!i||g.isArray(n)?i=F.access(t,e,g.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=g.queue(t,e),i=n.length,r=n.shift(),o=g._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,function(){g.dequeue(t,e)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return F.get(t,n)||F.access(t,n,{empty:g.Callbacks("once memory").add(function(){F.remove(t,[e+"queue",n])})})}}),g.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function $(t,e){var n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&g.nodeName(t,e)?g.merge([t],n):n}function tt(t,e){for(var n=0,i=t.length;n-1)r&&r.push(o);else if(l=g.contains(o.ownerDocument,o),a=$(d.appendChild(o),"script"),l&&tt(a),n)for(u=0;o=a[u++];)J.test(o.type||"")&&n.push(o);return d}et=a.createDocumentFragment().appendChild(a.createElement("div")),(nt=a.createElement("input")).setAttribute("type","radio"),nt.setAttribute("checked","checked"),nt.setAttribute("name","t"),et.appendChild(nt),f.checkClone=et.cloneNode(!0).cloneNode(!0).lastChild.checked,et.innerHTML="",f.noCloneChecked=!!et.cloneNode(!0).lastChild.defaultValue;var ot=/^key/,at=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,st=/^([^.]*)(?:\.(.+)|)/;function ct(){return!0}function lt(){return!1}function ut(){try{return a.activeElement}catch(t){}}function dt(t,e,n,i,r,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=void 0),e)dt(t,s,n,i,e[s],o);return t}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=lt;else if(!r)return t;return 1===o&&(a=r,(r=function(t){return g().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=g.guid++)),t.each(function(){g.event.add(this,e,r,i,n)})}g.event={global:{},add:function(t,e,n,i,r){var o,a,s,c,l,u,d,p,h,f,m,v=F.get(t);if(v)for(n.handler&&(n=(o=n).handler,r=o.selector),n.guid||(n.guid=g.guid++),(c=v.events)||(c=v.events={}),(a=v.handle)||(a=v.handle=function(e){return void 0!==g&&g.event.triggered!==e.type?g.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;l--;)h=m=(s=st.exec(e[l])||[])[1],f=(s[2]||"").split(".").sort(),h&&(d=g.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=g.event.special[h]||{},u=g.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&g.expr.match.needsContext.test(r),namespace:f.join(".")},o),(p=c[h])||((p=c[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,f,a)||t.addEventListener&&t.addEventListener(h,a)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,u):p.push(u),g.event.global[h]=!0)},remove:function(t,e,n,i,r){var o,a,s,c,l,u,d,p,h,f,m,v=F.hasData(t)&&F.get(t);if(v&&(c=v.events)){for(l=(e=(e||"").match(R)||[""]).length;l--;)if(h=m=(s=st.exec(e[l])||[])[1],f=(s[2]||"").split(".").sort(),h){for(d=g.event.special[h]||{},p=c[h=(i?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)u=p[o],!r&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(p.splice(o,1),u.selector&&p.delegateCount--,d.remove&&d.remove.call(t,u));a&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,v.handle)||g.removeEvent(t,h,v.handle),delete c[h])}else for(h in c)g.event.remove(t,h+e[l],n,i,!0);g.isEmptyObject(c)&&F.remove(t,"handle events")}},dispatch:function(t){t=g.event.fix(t);var e,n,i,r,o,a=[],c=s.call(arguments),l=(F.get(this,"events")||{})[t.type]||[],u=g.event.special[t.type]||{};if(c[0]=t,t.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,t)){for(a=g.event.handlers.call(this,t,l),e=0;(r=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,void 0!==(i=((g.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,c))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,a=[],s=e.delegateCount,c=t.target;if(s&&c.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&(!0!==c.disabled||"click"!==t.type)){for(i=[],n=0;n-1:g.find(r,this,null,[c]).length),i[r]&&i.push(o);i.length&&a.push({elem:c,handlers:i})}return s]*)\/>/gi,ht=/\s*$/g;function vt(t,e){return g.nodeName(t,"table")&&g.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function yt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function bt(t){var e=gt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function wt(t,e){var n,i,r,o,a,s,c,l;if(1===e.nodeType){if(F.hasData(t)&&(o=F.access(t),a=F.set(e,o),l=o.events))for(r in delete a.handle,a.events={},l)for(n=0,i=l[r].length;n1&&"string"==typeof m&&!f.checkClone&&ft.test(m))return t.each(function(r){var o=t.eq(r);v&&(e[0]=m.call(this,r,o.html())),St(o,e,n,i)});if(p&&(o=(r=rt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(s=(a=g.map($(r,"script"),yt)).length;d")},clone:function(t,e,n){var i,r,o,a,s,c,l,u=t.cloneNode(!0),d=g.contains(t.ownerDocument,t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||g.isXMLDoc(t)))for(a=$(u),i=0,r=(o=$(t)).length;i0&&tt(a,!d&&$(t,"script")),u},cleanData:function(t){for(var e,n,i,r=g.event.special,o=0;void 0!==(n=t[o]);o++)if(j(n)){if(e=n[F.expando]){if(e.events)for(i in e.events)r[i]?g.event.remove(n,i):g.removeEvent(n,i,e.handle);n[F.expando]=void 0}n[U.expando]&&(n[U.expando]=void 0)}}}),g.fn.extend({domManip:St,detach:function(t){return xt(this,t,!0)},remove:function(t){return xt(this,t)},text:function(t){return N(this,function(t){return void 0===t?g.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return St(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||vt(this,t).appendChild(t)})},prepend:function(){return St(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=vt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return St(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return St(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(g.cleanData($(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return g.clone(this,t,e)})},html:function(t){return N(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!ht.test(t)&&!Q[(Z.exec(t)||["",""])[1].toLowerCase()]){t=g.htmlPrefilter(t);try{for(;n")).appendTo(e.documentElement))[0].contentDocument).write(),e.close(),n=Ct(t,e),Mt.detach()),Et[t]=n),n}var Tt=/^margin/,Ot=new RegExp("^("+H+")(?!px)[a-z%]+$","i"),_t=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Pt=function(t,e,n,i){var r,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];for(o in r=n.apply(t,i||[]),e)t.style[o]=a[o];return r},It=a.documentElement;function kt(t,e,n){var i,r,o,a,s=t.style;return""!==(a=(n=n||_t(t))?n.getPropertyValue(e)||n[e]:void 0)&&void 0!==a||g.contains(t.ownerDocument,t)||(a=g.style(t,e)),n&&!f.pixelMarginRight()&&Ot.test(a)&&Tt.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o),void 0!==a?a+"":a}function Dt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){var t,e,i,r,o=a.createElement("div"),s=a.createElement("div");function c(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",It.appendChild(o);var a=n.getComputedStyle(s);t="1%"!==a.top,r="2px"===a.marginLeft,e="4px"===a.width,s.style.marginRight="50%",i="4px"===a.marginRight,It.removeChild(o)}s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(s),g.extend(f,{pixelPosition:function(){return c(),t},boxSizingReliable:function(){return null==e&&c(),e},pixelMarginRight:function(){return null==e&&c(),i},reliableMarginLeft:function(){return null==e&&c(),r},reliableMarginRight:function(){var t,e=s.appendChild(a.createElement("div"));return e.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",s.style.width="1px",It.appendChild(o),t=!parseFloat(n.getComputedStyle(e).marginRight),It.removeChild(o),s.removeChild(e),t}}))}();var Rt=/^(none|table(?!-c[ea]).+)/,Lt={position:"absolute",visibility:"hidden",display:"block"},Nt={letterSpacing:"0",fontWeight:"400"},jt=["Webkit","O","Moz","ms"],Vt=a.createElement("div").style;function Ft(t){if(t in Vt)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=jt.length;n--;)if((t=jt[n]+e)in Vt)return t}function Ut(t,e,n){var i=W.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function Bt(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=g.css(t,n+q[o],!0,r)),i?("content"===n&&(a-=g.css(t,"padding"+q[o],!0,r)),"margin"!==n&&(a-=g.css(t,"border"+q[o]+"Width",!0,r))):(a+=g.css(t,"padding"+q[o],!0,r),"padding"!==n&&(a+=g.css(t,"border"+q[o]+"Width",!0,r)));return a}function zt(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=_t(t),a="border-box"===g.css(t,"boxSizing",!1,o);if(r<=0||null==r){if(((r=kt(t,e,o))<0||null==r)&&(r=t.style[e]),Ot.test(r))return r;i=a&&(f.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+Bt(t,e,n||(a?"border":"content"),i,o)+"px"}function Gt(t,e){for(var n,i,r,o=[],a=0,s=t.length;a1)},show:function(){return Gt(this,!0)},hide:function(){return Gt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){K(this)?g(this).show():g(this).hide()})}}),g.Tween=Ht,Ht.prototype={constructor:Ht,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||g.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(g.cssNumber[n]?"":"px")},cur:function(){var t=Ht.propHooks[this.prop];return t&&t.get?t.get(this):Ht.propHooks._default.get(this)},run:function(t){var e,n=Ht.propHooks[this.prop];return this.options.duration?this.pos=e=g.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ht.propHooks._default.set(this),this}},Ht.prototype.init.prototype=Ht.prototype,Ht.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=g.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){g.fx.step[t.prop]?g.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[g.cssProps[t.prop]]&&!g.cssHooks[t.prop]?t.elem[t.prop]=t.now:g.style(t.elem,t.prop,t.now+t.unit)}}},Ht.propHooks.scrollTop=Ht.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},g.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},g.fx=Ht.prototype.init,g.fx.step={};var Wt,qt,Kt=/^(?:toggle|show|hide)$/,Xt=/queueHooks$/;function Yt(){return n.setTimeout(function(){Wt=void 0}),Wt=g.now()}function Zt(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=q[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function Jt(t,e,n){for(var i,r=(Qt.tweeners[e]||[]).concat(Qt.tweeners["*"]),o=0,a=r.length;o1)},removeAttr:function(t){return this.each(function(){g.removeAttr(this,t)})}}),g.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?g.prop(t,e,n):(1===o&&g.isXMLDoc(t)||(e=e.toLowerCase(),r=g.attrHooks[e]||(g.expr.match.bool.test(e)?$t:void 0)),void 0!==n?null===n?void g.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=g.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&g.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(R);if(o&&1===t.nodeType)for(;n=o[r++];)i=g.propFix[n]||n,g.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)}}),$t={set:function(t,e,n){return!1===e?g.removeAttr(t,n):t.setAttribute(n,n),n}},g.each(g.expr.match.bool.source.match(/\w+/g),function(t,e){var n=te[e]||g.find.attr;te[e]=function(t,e,i){var r,o;return i||(o=te[e],te[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,te[e]=o),r}});var ee=/^(?:input|select|textarea|button)$/i,ne=/^(?:a|area)$/i;g.fn.extend({prop:function(t,e){return N(this,g.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[g.propFix[t]||t]})}}),g.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&g.isXMLDoc(t)||(e=g.propFix[e]||e,r=g.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=g.find.attr(t,"tabindex");return e?parseInt(e,10):ee.test(t.nodeName)||ne.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(g.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),g.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){g.propFix[this.toLowerCase()]=this});var ie=/[\t\r\n\f]/g;function re(t){return t.getAttribute&&t.getAttribute("class")||""}g.fn.extend({addClass:function(t){var e,n,i,r,o,a,s,c=0;if(g.isFunction(t))return this.each(function(e){g(this).addClass(t.call(this,e,re(this)))});if("string"==typeof t&&t)for(e=t.match(R)||[];n=this[c++];)if(r=re(n),i=1===n.nodeType&&(" "+r+" ").replace(ie," ")){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(s=g.trim(i))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,i,r,o,a,s,c=0;if(g.isFunction(t))return this.each(function(e){g(this).removeClass(t.call(this,e,re(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(R)||[];n=this[c++];)if(r=re(n),i=1===n.nodeType&&(" "+r+" ").replace(ie," ")){for(a=0;o=e[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(s=g.trim(i))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):g.isFunction(t)?this.each(function(n){g(this).toggleClass(t.call(this,n,re(this),e),e)}):this.each(function(){var e,i,r,o;if("string"===n)for(i=0,r=g(this),o=t.match(R)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=re(this))&&F.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":F.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+re(n)+" ").replace(ie," ").indexOf(e)>-1)return!0;return!1}});var oe=/\r/g,ae=/[\x20\t\r\n\f]+/g;g.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=g.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,g(this).val()):t)?r="":"number"==typeof r?r+="":g.isArray(r)&&(r=g.map(r,function(t){return null==t?"":t+""})),(e=g.valHooks[this.type]||g.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))})):r?(e=g.valHooks[r.type]||g.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(oe,""):null==n?"":n:void 0}}),g.extend({valHooks:{option:{get:function(t){var e=g.find.attr(t,"value");return null!=e?e:g.trim(g.text(t)).replace(ae," ")}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||r<0,a=o?null:[],s=o?r+1:i.length,c=r<0?s:o?r:0;c-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),g.each(["radio","checkbox"],function(){g.valHooks[this]={set:function(t,e){if(g.isArray(e))return t.checked=g.inArray(g(t).val(),e)>-1}},f.checkOn||(g.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var se=/^(?:focusinfocus|focusoutblur)$/;g.extend(g.event,{trigger:function(t,e,i,r){var o,s,c,l,u,d,p,f=[i||a],m=h.call(t,"type")?t.type:t,v=h.call(t,"namespace")?t.namespace.split("."):[];if(s=c=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!se.test(m+g.event.triggered)&&(m.indexOf(".")>-1&&(m=(v=m.split(".")).shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[g.expando]?t:new g.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:g.makeArray(e,[t]),p=g.event.special[m]||{},r||!p.trigger||!1!==p.trigger.apply(i,e))){if(!r&&!p.noBubble&&!g.isWindow(i)){for(l=p.delegateType||m,se.test(l+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),c=s;c===(i.ownerDocument||a)&&f.push(c.defaultView||c.parentWindow||n)}for(o=0;(s=f[o++])&&!t.isPropagationStopped();)t.type=o>1?l:p.bindType||m,(d=(F.get(s,"events")||{})[t.type]&&F.get(s,"handle"))&&d.apply(s,e),(d=u&&s[u])&&d.apply&&j(s)&&(t.result=d.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),e)||!j(i)||u&&g.isFunction(i[m])&&!g.isWindow(i)&&((c=i[u])&&(i[u]=null),g.event.triggered=m,i[m](),g.event.triggered=void 0,c&&(i[u]=c)),t.result}},simulate:function(t,e,n){var i=g.extend(new g.Event,n,{type:t,isSimulated:!0});g.event.trigger(i,null,e)}}),g.fn.extend({trigger:function(t,e){return this.each(function(){g.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return g.event.trigger(t,e,n,!0)}}),g.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){g.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),g.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),f.focusin="onfocusin"in n,f.focusin||g.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){g.event.simulate(e,t.target,g.event.fix(t))};g.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=F.access(i,e);r||i.addEventListener(t,n,!0),F.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=F.access(i,e)-1;r?F.access(i,e,r):(i.removeEventListener(t,n,!0),F.remove(i,e))}}});var ce=n.location,le=g.now(),ue=/\?/;g.parseJSON=function(t){return JSON.parse(t+"")},g.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||g.error("Invalid XML: "+t),e};var de=/#.*$/,pe=/([?&])_=[^&]*/,he=/^(.*?):[ \t]*([^\r\n]*)$/gm,fe=/^(?:GET|HEAD)$/,ge=/^\/\//,me={},ve={},ye="*/".concat("*"),be=a.createElement("a");function we(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(R)||[];if(g.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Se(t,e,n,i){var r={},o=t===ve;function a(s){var c;return r[s]=!0,g.each(t[s]||[],function(t,s){var l=s(e,n,i);return"string"!=typeof l||o||r[l]?o?!(c=l):void 0:(e.dataTypes.unshift(l),a(l),!1)}),c}return a(e.dataTypes[0])||!r["*"]&&a("*")}function xe(t,e){var n,i,r=g.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&g.extend(!0,t,i),t}be.href=ce.href,g.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ce.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ce.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ye,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":g.parseJSON,"text xml":g.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?xe(xe(t,g.ajaxSettings),e):xe(g.ajaxSettings,t)},ajaxPrefilter:we(me),ajaxTransport:we(ve),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,r,o,s,c,l,u,d,p=g.ajaxSetup({},e),h=p.context||p,f=p.context&&(h.nodeType||h.jquery)?g(h):g.event,m=g.Deferred(),v=g.Callbacks("once memory"),y=p.statusCode||{},b={},w={},S=0,x="canceled",M={readyState:0,getResponseHeader:function(t){var e;if(2===S){if(!s)for(s={};e=he.exec(o);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===S?o:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return S||(t=w[n]=w[n]||t,b[t]=e),this},overrideMimeType:function(t){return S||(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(S<2)for(e in t)y[e]=[y[e],t[e]];else M.always(t[M.status]);return this},abort:function(t){var e=t||x;return i&&i.abort(e),E(0,e),this}};if(m.promise(M).complete=v.add,M.success=M.done,M.error=M.fail,p.url=((t||p.url||ce.href)+"").replace(de,"").replace(ge,ce.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=g.trim(p.dataType||"*").toLowerCase().match(R)||[""],null==p.crossDomain){l=a.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=be.protocol+"//"+be.host!=l.protocol+"//"+l.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=g.param(p.data,p.traditional)),Se(me,p,e,M),2===S)return M;for(d in(u=g.event&&p.global)&&0==g.active++&&g.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!fe.test(p.type),r=p.url,p.hasContent||(p.data&&(r=p.url+=(ue.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(p.url=pe.test(r)?r.replace(pe,"$1_="+le++):r+(ue.test(r)?"&":"?")+"_="+le++)),p.ifModified&&(g.lastModified[r]&&M.setRequestHeader("If-Modified-Since",g.lastModified[r]),g.etag[r]&&M.setRequestHeader("If-None-Match",g.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&M.setRequestHeader("Content-Type",p.contentType),M.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+ye+"; q=0.01":""):p.accepts["*"]),p.headers)M.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(h,M,p)||2===S))return M.abort();for(d in x="abort",{success:1,error:1,complete:1})M[d](p[d]);if(i=Se(ve,p,e,M)){if(M.readyState=1,u&&f.trigger("ajaxSend",[M,p]),2===S)return M;p.async&&p.timeout>0&&(c=n.setTimeout(function(){M.abort("timeout")},p.timeout));try{S=1,i.send(b,E)}catch(t){if(!(S<2))throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,a,s){var l,d,b,w,x,E=e;2!==S&&(S=2,c&&n.clearTimeout(c),i=void 0,o=s||"",M.readyState=t>0?4:0,l=t>=200&&t<300||304===t,a&&(w=function(t,e,n){for(var i,r,o,a,s=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){c.unshift(r);break}if(c[0]in n)o=c[0];else{for(r in n){if(!c[0]||t.converters[r+" "+c[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==c[0]&&c.unshift(o),n[o]}(p,M,a)),w=function(t,e,n,i){var r,o,a,s,c,l={},u=t.dataTypes.slice();if(u[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=u.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!c&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=o,o=u.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(a=l[c+" "+o]||l["* "+o]))for(r in l)if((s=r.split(" "))[1]===o&&(a=l[c+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[r]:!0!==l[r]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+c+" to "+o}}}return{state:"success",data:e}}(p,w,M,l),l?(p.ifModified&&((x=M.getResponseHeader("Last-Modified"))&&(g.lastModified[r]=x),(x=M.getResponseHeader("etag"))&&(g.etag[r]=x)),204===t||"HEAD"===p.type?E="nocontent":304===t?E="notmodified":(E=w.state,d=w.data,l=!(b=w.error))):(b=E,!t&&E||(E="error",t<0&&(t=0))),M.status=t,M.statusText=(e||E)+"",l?m.resolveWith(h,[d,E,M]):m.rejectWith(h,[M,E,b]),M.statusCode(y),y=void 0,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[M,p,l?d:b]),v.fireWith(h,[M,E]),u&&(f.trigger("ajaxComplete",[M,p]),--g.active||g.event.trigger("ajaxStop")))}return M},getJSON:function(t,e,n){return g.get(t,e,n,"json")},getScript:function(t,e){return g.get(t,void 0,e,"script")}}),g.each(["get","post"],function(t,e){g[e]=function(t,n,i,r){return g.isFunction(n)&&(r=r||i,i=n,n=void 0),g.ajax(g.extend({url:t,type:e,dataType:r,data:n,success:i},g.isPlainObject(t)&&t))}}),g._evalUrl=function(t){return g.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},g.fn.extend({wrapAll:function(t){var e;return g.isFunction(t)?this.each(function(e){g(this).wrapAll(t.call(this,e))}):(this[0]&&(e=g(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return g.isFunction(t)?this.each(function(e){g(this).wrapInner(t.call(this,e))}):this.each(function(){var e=g(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=g.isFunction(t);return this.each(function(n){g(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){g.nodeName(this,"body")||g(this).replaceWith(this.childNodes)}).end()}}),g.expr.filters.hidden=function(t){return!g.expr.filters.visible(t)},g.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var Me=/%20/g,Ee=/\[\]$/,Ce=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,Te=/^(?:input|select|textarea|keygen)/i;function Oe(t,e,n,i){var r;if(g.isArray(e))g.each(e,function(e,r){n||Ee.test(t)?i(t,r):Oe(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)});else if(n||"object"!==g.type(e))i(t,e);else for(r in e)Oe(t+"["+r+"]",e[r],n,i)}g.param=function(t,e){var n,i=[],r=function(t,e){e=g.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=g.ajaxSettings&&g.ajaxSettings.traditional),g.isArray(t)||t.jquery&&!g.isPlainObject(t))g.each(t,function(){r(this.name,this.value)});else for(n in t)Oe(n,t[n],e,r);return i.join("&").replace(Me,"+")},g.fn.extend({serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=g.prop(this,"elements");return t?g.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!g(this).is(":disabled")&&Te.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!Y.test(t))}).map(function(t,e){var n=g(this).val();return null==n?null:g.isArray(n)?g.map(n,function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}}):{name:e.name,value:n.replace(Ce,"\r\n")}}).get()}}),g.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var _e={0:200,1223:204},Pe=g.ajaxSettings.xhr();f.cors=!!Pe&&"withCredentials"in Pe,f.ajax=Pe=!!Pe,g.ajaxTransport(function(t){var e,i;if(f.cors||Pe&&!t.crossDomain)return{send:function(r,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);e=function(t){return function(){e&&(e=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(_e[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),i=s.onerror=e("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&i()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return g.globalEval(t),t}}}),g.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),g.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(i,r){e=g("